by pkulak · 2y ago · 0 comments
cd ~/notes
if [[ ''$(git status --porcelain) ]]; then
git stash save
git pull --rebase
git stash pop || true
git add .
git -c "user.name=Phil Kulak" -c "user.email=nope@kulak.us" commit -m "''$(date)"
git push origin main
else
git pull
fiI realised that I already spend at minimum 8-10 hours a day in VS Code, why learn another app with all the different quirks, UI and key bindings...
Preferably offline with syncing.
Today I use Joplin but it has custom file format.
I also use vdirsyncer with DavX to sync my phone's calendar and contacts to my notes directory, so that is backed up as well - all in the same syncing script.
#!/usr/bin/env bash
cp -a ~/.vdirsyncer/calendars/ ~/Notes/pim/
cp -a ~/.vdirsyncer/contacts/ ~/Notes/pim/
git add \*
git commit -am "$(hostname)"
git pull
git push
echo ''
git status> ... "''$(date)"
What is the purpose of the '' syntax?
Simplenote used to solve this. Then, recently, they started to become less reliable at the same time as having a very large subscription price increase. Apple Notes is now okay, but awkward to log in or sync with a non-Apple device. I tried having a bunch of .txt files synced via Dropbox, but while the Dropbox mobile app will let you view offline files, it won't let you edit them unless online.
My thought here is it that the app is going to be saving simple text files either plaintext or richtext (markdown/html), so it should be able to provide this for you, but I haven't even considered that as a feature so I would want to test it to see if there were any rough edges to polish. Any suggestions you have would be appreciated!
It’s paid, your notes are in a database (easily exportable as .txt), but I’ve used it for years and years and it’s one of those rare apps that ‘just works’.
And it’s something like $25 a year. Utterly reasonable.
The dual folder structure helps identify the collisions and manage them appropriately, versus whatever handling iCloud would do.
It’s probably still awkward on a non-Apple device as I’m sure iCloud web access is not great, but it works.
All it would take to be awesome would be to find a mobile git app that required fewer button presses, so I'm hopeful.
Updates are triggered from the git repo push, so as long as I remember to sync before I run off(or wait for it to auto-sync)
Any git client for your mobile would also let you view your notes. Maybe even edit, depending on the git client.
ddiederi@ddiederi-mac notes % while [ 1 ]
do
git add -A .
git commit -am wip;git push;git pull
sleep 6
donehttps://git.sr.ht/~pkulak/nix/tree/main/item/home/default.ni...
https://git.sr.ht/~pkulak/nix/tree/main/item/home/default.ni...
Perhaps the `|| true` on the `git stash pop` could have a bit more handling :)