Workflow and files to automatically create new tiddlers in response to new files: A reference management example

301 views
Skip to first unread message

Diego Mesa

unread,
May 3, 2018, 9:51:37 AM5/3/18
to TiddlyWiki
Hey everyone, 

Just wanted to share a useful directory watching workflow I've come up with. I am working on a mac and running TW on node. I read a lot of papers, and have taken to using TW to keep track of them - a homegrown reference manager. My workflow is the following: 
  • Find a bunch of papers I want to add to my library and downloaded them into a "Papers" directory (I keep this somewhere in my dropbox).
  • I've setup a "Folder Action" on my "Papers" folder, which runs the watchFolder.scpt applescript file every time this folder has new items added. 
  • That applescript will go through each PDF, and call a newPaperTid bash file, responsible for creating a new .tid file
  • Those tid files are created in the appropriate tiddlers/ directory (which is also on my dropbox)
  • Restart node and voila!
This has been working very well for me and I wanted to share in case others might find it useful. Both files can be found on github:


Note: These files/workflow can easily be changed to accommodate anything where you want to respond to some action somewhere by creating a new tiddler. 

If anyone has any suggestions/improvements/questions I'd be happy to discuss. 

Best,
Diego

Diego Mesa

unread,
May 3, 2018, 10:03:08 AM5/3/18
to TiddlyWiki
I also have some customizations on my TW itself to handle papers that I can share if someone is interested.

Jed Carty

unread,
May 3, 2018, 5:14:23 PM5/3/18
to TiddlyWiki
I like this idea. I think that it wouldn't be hard to add to the multiuser plugin in a way that doesn't require external scripts and wouldn't require a server restart. I may look into that over the weekend.

Diego Mesa

unread,
May 3, 2018, 5:16:34 PM5/3/18
to TiddlyWiki
awesome Jed!

TonyM

unread,
May 3, 2018, 10:51:41 PM5/3/18
to TiddlyWiki
Jed

I will be happy to write the windows batch to monitor a folder and create the tid file if given the requirements. I have written a few baches I call sentenials, that react to a file arriving. However it would be better inside node if possible.

Keep in mind if this solution can work outside node it would be even better but unlikely.

Regards
Tony

Diego Mesa

unread,
May 16, 2018, 11:03:20 AM5/16/18
to TiddlyWiki
Hey Jed,

Just checking up on this? Curious if you were able to incorporate it!


On Thursday, May 3, 2018 at 4:14:23 PM UTC-5, Jed Carty wrote:

Jed Carty

unread,
May 16, 2018, 11:17:21 AM5/16/18
to TiddlyWiki
I haven't had a chance to make this. I added a feature request to the repo for Bob but I don't know how long it will be until it is worked out.

As it is, if you can make your script create the .tid files in the tiddlers folder of a wiki using Bob than they should appear in the wiki without any restart. It isn't as clean and elegant as I would like but it may work as an interim solution.

Rahul Kashyap

unread,
May 17, 2020, 12:33:28 PM5/17/20
to TiddlyWiki
Hello everyone, 

@Diego: I wasn't aware of your script but, came up with another using python -- https://github.com/rahulkashyap411/tw_scripts.git 
It also contains a link to the tiddler and a hidden note section where you can store your notes about a paper. This is helpful to transclude them elsewhere so that you can go to your reference without opening another tiddler. 

My workflow is following: 
  • scans the directory _all_papers_Refs/<year> under each year and checks if this tiddler has already been created and exists in the directory old_all_papers_Refs_tiddlers.
  • If such tiddler doesn't exist already, script creates new tiddlers in new_all_papers_Refs_tiddlers old_all_papers_Refs_tiddlers
  • Then you can manually drag the tiddler to your TW and then put them in old_all_papers_Refs_tiddlers. 
NOTE: it does not check if the tiddler has been already exported in the TW. So, after importing the tiddlers, copy them into old directory for next time succesful update. Otherwise you'll be importing them again which will remove any changes/tagging that you've done to last imported tiddler since then. 


Best,
-Rahul Kashyap
Reply all
Reply to author
Forward
0 new messages