Just sitting down this morning to move all my note-taking over from FT to FT4Atom.
First thing I need is a script which creates a date-stamped file for today’s rough notes and planning.
I’m starting with something like:
#!/bin/bash
wkg="$HOME/Notes"
notePrefix="notes-"
fileExtn="ftml"
app="Atom"
# See (in BASH date, the -v flag)
# "-v-1d" --> yesterday
# "-v+1d" --> tomorrow
# "" --> today (default)
dateAdjusts=""
dayfile="$wkg/$notePrefix$(date $dateAdjusts "+%Y-%m-%d").ftml"
touch "$dayfile"
open -a "$app" "$dayfile"
( which assumes that OS X has been told to open any .ftml
files with Atom )
So far so good, I think, but while experimenting I noticed that a naive user might have a problem if they tried to simply edit the extension of an existing .txt | .ft | .md
file to .ftml
, and then simply open it in FT4Atom, expecting to see their existing file contents in some form …
( FT4Atom seems at the moment to essentially drop any existing contents if this happens, and offer a fresh blank FT4Atom buffer. There is a warning of file change if the user saves at this point, but if they accepted, then the earlier data, would, I think, be overwritten).
I wonder if it might be worth thinking about error handling which:
- detected to the opening of an MD or plain text file that has an
.ftml
extension, - and responded in some way ?
Perhaps, for example:
- Warning that the contents an’t be opened as FTML ?
- or opening as TXT, with explanation ?
- or converting and opening as FTML ?