Deprecated: Function jetpack_form_register_pattern is deprecated since version jetpack-13.4! Use Automattic\Jetpack\Forms\ContactForm\Util::register_pattern instead. in /home4/rahulsit/public_html/wp-includes/functions.php on line 6078
Safari to Markdown and automatic archival – Rahul Gaitonde
Categories
Uncategorized

Safari to Markdown and automatic archival

I finally created an iOS Shortcut I’ve wanted for a while. Here’s the description:

200527
– Saves Markdown-formatted article to iCloud Drive → Shortcuts → To Read for further cataloging.
– Prepends title and URL to article body
– Prepends yymmdd to the file name
– Adds today’s date, article title and article URL to iCloud Drive → Shortcuts → Lists → Instapaper Log.txt
– Optionally adds the article to Instapaper OR Pocket OR Evernote

This is the iCloud URL to the Shortcut.

The genesis of this was my desire to create an open-format archive of articles for the long-term. This was to be separate from a reading queue, which I send to Instapaper. This was also separate from my browser bookmarks, which are articles of interest I may want to return to at some future point.

At the same time, I had a monthly schedule to back up my Instapaper and Pocket by export each of them, as well as exporting the bookmarks. Both manual processes.

Eventually I wondered why I couldn’t just merge all of these – long-term archives and short-term reading list and unknown-term bookmarks. The latter two’d benefit from being in open-format Markdown. And because they’d be saved in iCloud Drive, they’d all be automatically backed up.

This Shortcut is a big step towards it. It saves any article I want into an iCloud Drive folder for future processing: I can either move those articles into folders for my Projects or Areas, or add them to a new folder I created for my reading queue, or I can move them to bookmarks. In addition, every article I add also gets logged to a CSV, thereby creating an easily searchable list for the future. Finally, the Shortcut also asks my if I want to add the article to any read-it-later service anyway.

The Shortcut in action
Left: the markdown file in the processing queue. Centre: the clean, stripped markdown. Right: the URL and article title in the log CSV

It’s wonderful and I’ve used it dozens of times already.

The immediate next step is to more clearly separately the three use cases. Essentially, ask up front if the save is for a bookmark, to read later, or long-term archival. It’s a simple enough matter to then save the files in different locations and log them to separate files.

What I’d really like to do for my read-later queue is to present myself with a list of all active projects and areas of responsibility, pick from one of them and have the markdown file moved there, obviating any manual processing later, even if it only takes a couple of minutes daily. I’m not comfortable with manipulating dictionaries yet, so this will make for a good project. I can either populate the list on-the-fly by reading my top-level project and areas folders, or I can store them in a persistent key-value-pair store like Data Jar

I can also imagine myself using the very interesting Charty to generate visualisations of the number of articles I’ve sent to projects, bookmarks and archives during a given month. Which sites I’ve saved the most articles from. And the volume over time.

In closing – just like we’ve said that the iPad is the computer of the future, like it or not, Shortcuts are the future of programming.