Juan F. Meleiro

Syncthing + Todo.txt

I recently scanned through Public Voit blog tag 'pim' (personal information management), and got to thinking about tagging my own files.

But one of the things I didn't antecipate then was that I could combine the Todo.txt 'done' format for with Syncthing to handle Podcasts on my phone easily.

Here's how I did it:

- First, I have a directory on my computer with all archived podcast episodes. They are neatly organized within subdirectories, but that's irrelevant.

- On my phone, I have a directory where I want the podcasts to end up.

- On Syncthing, I setup the folders on both machines to be Send & Receive

- On my computer, I added a .stignore file with the following contents:

x *

- I also have a script called 'syncthing-done' on my PATH which reads:

#!/bin/sh
mv $(dirname "$1/$2")'/x '$(basename "$1/$2")

- I setup the Syncthing folder on my computer to use external file versioning, with a command reading:

syncthing-done %FOLDER_PATH% %FILE_PATH%

And that's it!

Now, when I delete an episode 'NAME' on my phone, my computer picks it up and renames it to 'x NAME' in whatever directory it was, and then Syncthing ignores it. That way, it doesn't get sync'ed back to my phone.

Easy peasy.