[tw5] Clipboard hook- convert dates into TiddlyWiki format

TiddlyWiki has it’s own format for representing dates for created and modified fields. To be consistent, I wanted to use this date format for other fields, but didn’t feel like manually converting them myself.

So I wrote a Python script and uploaded it for others to try :): GitHub - cr1901/tw-timestamp: Clipboard hook to convert copy/pasted dates into TiddlyWiki format.

To install, git clone https://github.com/cr1901/tw-timestamp, and then use pip install . or pip install -e . (if you want to hack on it) to add a tw-timestamp command to your path. I will upload a package to PyPI soon enough, but I’d like people to test-drive this first to flush out any problems.

An example session looks like this, for instance, when I copy the text “11/12/2021, 4:35 PM” to the clipboard. This gets converted to “20211112213500000” (notice that the time is UTC), and will be pasted as such when the user pastes:


$ tw-timestamp -t US/Eastern
TW date conversion active
11/12/2021, 4:35 PM => 20211112213500000
TW date conversion disabled

I hope other people find this useful.

I saw your post here [tw5] Clipboard hook- convert dates into TiddlyWiki format
Join us https://talk.tiddlywiki.org (the new TW forum)

I like your solution and I see potential to do more!