Backdate Yojimbo Items
An issue that has recently arisen on the Yojimbo mailing list is that imported items are considered created at the time of import. This is logical, but some people would prefer to retain the creation date of the original file. Enter “Backdate Items,” an AppleScript for Yojimbo that gives you the ability to change the creation date of existing items:
A word of warning: this script modifies Yojimbo’s database directly using sqlite3. This is quite certainly an unsupported way to manipulate your data. In fact, Apple clearly states that Core Data files like this should not be tinkered with:
While it is easy enough to look under the covers and see what is going on with the XML and SQLite data formats, you should never modify the data in these files yourself.
But I tinker. If you do, too, please back up your
~/Library/Application Support/Yojimbo/Database.sqlite file first. Consider yourself warned that this script could potentially mangle that database.
Install the script in
- Select some items in Yojimbo’s list pane.
- Invoke the Backdate Items script.
- Enter the desired date and time in any supported format.
- Click “Creation” or “Creation & Modification” to reset the corresponding timestamps.
- Changes will not be visible until you restart Yojimbo. You may backdate more than once before restarting Yojimbo, but don’t edit a backdated item until you’ve restarted Yojimbo or your changes may be lost.
Examine the script for more information about how it works. The SQLite Database Browser can also be used for this purpose, but you’ll have to manually convert dates to seconds since January 1, 2001 00:00:00 GMT (the NSDate epoch). With any luck, the option to preserve creation dates will eventually be added to Yojimbo’s import facility and this hack can be retired.