Sunday, May 4, 2014

New Scratch File for ConnectedText

I discovered this Website today. The Scratchpad will replace the one I created the more simple-minded script I wrote some years ago. The best thing I like about it is that it can create new content from a template. The script runs saves files in the same directory in which it runs. Templates are in a template directory underneath it. I run the script from a Dropbox directory.

I am not using the exe file, but the AhK script, and made a few changes to it. I had to change some of the Gui boxes because they did not display correctly. I also changed the file extension from "txt" to "cbk," and I wrote the following template:

##CT##

[[created:=%a_yyyy%%A_MM%%A_dd%]]
[[$CATEGORY:|]]


The program/script saves in UTF-8. The file names look like this: "04 May 2014 1005.cbk" where "1005" refers to the time

I can now import files created in this way as ConnectedText backup files. "##CT##" needs to be followed by the name of the topic. I have set the the ConnectedText import option to overwrite, if a topic with the same name exists. The expression "[[created:=%a_yyyy%%A_MM%%A_dd%]]" creates the topic with the creation time as an attribute. It all works correctly. ConnectedText takes the name of the topic from whatever follows "##CT##", not from the file name.

One cautionary note. If you choose the import option "overwrite," you have to be careful not to choose a topic that already exists, but you can always add a modifier to the topic that identifies it as imported, however.




What do I need it for? I use it as a way of "backing up" or rather of writing to an import directory in Dropbox when I don't have ConnectedText available (or when I have forgotten to sync the office computer with the home computer). It's the best solution I have found so far.[1]



1. I am very thankful to Desi Quitans who wrote the original script. Apparently it has been downloaded more than 4500 times. The other programs referenced on the Webpage are also very interesting.

No comments: