in Code

Simplenote Yojimbo Sync v0.3(1)

As the previous post suggest I’ve uploaded a new version of SNYS, 0.3. This has some more extensive logging options as some people are still having issues, but for those who aren’t, this version stays running and repeats the sync once per hour. You might wish to have it run on startup if you are that way inclined; I am.

Download from the dedicated page as usual.

Edit: Please can you post (a) the version of OS X you are using and (b) the version of Yojimbo you are using, when reporting a bug? I have a feeling that there may be some subtle Applescript differences involved here, and even if there aren’t, I’d like to eliminate that possibility.

  • I get the following error:

    I really hope that I’m getting it to work, sounds just great! Thanks in advance.

    Best regards Johannes

  • Okay, no HTML Tags in the Comments 🙂

    http://project23.net/snys.png

  • Oh, and that was the error I got before I created the Simplenote Yojimbo Sync Folder in Application Support manually.

    http://project23.net/syns2.png

    Johannes

  • Ah thank you – I will double-check that it is creating the directory properly.

  • I get the same error as Johannes Freund two comments above. This is Snow Leopard.

  • I got an error that it couldn’t log into Simplenote, so I removed the non-alphanumeric characters in my password. It got as far as syncing one note, then Growl’d at me with this:

    2009-10-13T22:12:26+00:00|Note|Last sync at Thu, 01 Jan 1970 00:00:00 +0000. 2009-10-13T22:12:26+00:00|Note|Reading Yojimbo data… 2009-10-13T22:12:27+00:00|Note|Notes found in Yojimbo: 1 2009-10-13T22:12:27+00:00|Note|Reading Simplenote data… 2009-10-13T22:12:28+00:00|Note|Notes found in Simplenote: 54 2009-10-13T22:12:28+00:00|Note|No key pairs to delete. 2009-10-13T22:12:28+00:00|Note|Key pairs read from sync database: 0 2009-10-13T22:12:28+00:00|Note|yojimbo item 0AA15348-F352-4BE0-BF35-D714EF8E8FB9 is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRirxxIM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiVvg4M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjuvxIM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRijvxIM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiIuBIM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiimRIM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRingRIM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjOtREM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjttBEM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRj6qBEM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRimowkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRj4mQoM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjEkxEM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjyjxEM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRj28RAM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjFggwM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi-yAsM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjN7Q0M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjctw8M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiO8BAM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiU7xAM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjP7BAM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjf6BAM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRijrAkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjJjhAM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi24A0M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjKvg4M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiLiA4M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiLkQ4M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRj1hA4M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi78g0M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiv8woM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi9kgsM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi_mQ0M is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRifkgwM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjZlgwM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRic1QsM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi28wkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjeyAsM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi68gkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi8iwsM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRj3zwkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi43woM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRijlwoM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRi6ygoM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiCowkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjNggoM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiU8gkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRifzgkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiGxAkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjVygkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRiRsgkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjwrwkM is new. 2009-10-13T22:12:28+00:00|Note|simplenote item agtzaW1wbGUtbm90ZXIMCxIETm90ZRjMmwkM is new. 2009-10-13T22:12:28+00:00|Note|Reconciling changes and conflicts… 2009-10-13T22:12:28+00:00|Note|Creating note agtzaW1wbGUtbm90ZXIMCxIETm90ZRjjpBMM in Simplenote. 2009-10-13T22:12:29+00:00|Note|Creating note F125B84F-54BF-4CB1-9C81-D998D8A78C50 in Yojimbo. 2009-10-13T22:12:30+00:00|Error|ERROR: Applescript returned a blank value.

  • It growled all that at you? That’s supposed to be in the log file!

    Thanks, I will take a look at that too. There seem to be some situations where Yojimbo seems to be creating a note properly, but is returning a blank id for that note, which confuses matters quite a bit.

  • The app does not seem to do any writing to the disk over here. There’s no folder in the Application Support folder and when I run the script manually from the AppleScript editor, it points me to a log file in /Logs/ which does not exist either.

    When I run the app by double-clicking its icon, I get the message the the sqlite database cannot be found (of course, since it didn’t create the folder nor the database).

  • I now created the folder in Application Support manually. After running the script manually, it contains an empty sqlite database. When I run the app, I get “SQL error – no such table: vars”

  • M Casey

    Works great, no errors at all. Yojimbo tags are intact. Is there any way to force sync without restarting the app?

  • M Casey: not at the moment, but I agree that it would be a handy thing to have (I’ve wanted it myself) so I’ll try and work out some way to get that into the next version.

    Andreas Kalt and others: This is very odd, yes, for some people it doesn’t seem to want to create the folder or write to it. I’m trying to think of a reason that might be taking place but I’m stumped. Are people using Filevault by any chance? And that’s just a shot in the dark, based on the fact that I have a Filevault machine I can test this on.

  • I don’t use Filevault. What else could interfere with file operations?

  • kristian

    hi, great idea to sync simplenote with yojimbo! i don’t get it to work though, running snow leopard, yojimbo 1.5.1 and the 0.3 syns i get the following growl: ERROR: could not set content of Yojimbo note EE5C16D1-9584-4D1A-A49A-6DFBAA3DD69A

    what happens is that syns copies the first note (only title, no content) and then stops. what can be done? thanks, kristian

  • kristian

    to add to my previous post: unlike above comments, the “Simplenote Yojimbo Sync” folder in application support got created automatically and contains a sqlite file.

    in yojimbo, the firt note that got imported with title only (no content) shows the creation date as the date of import, as opposed to the actual creation date of the simplenote file, is this normal or an error? would be good to maintain the original creation date. also, while in yojimbo a “simplenote” folder is created, the one note that got imported does not show up in that folder but just in the general “Notes” section.

    hope this helps, kristian

    mac os 10.6.1, yojimbo 1.5.1

  • At the moment it doesn’t change the creation date to the Simplenote one, but yes, you’re right, that would seem more sensible. It shouldn’t be hard to do and I’ll add that to the next update.

    I think the fact that it can’t change the note content may be to do with scripting differences between Y 1.5.1 and Y 2.0 (which I’m using). I’m going to try to get hold of an older version to test this theory.

    As for the file creation, I’m still stuck there. I can’t think of any reason why it wouldn’t let a script do these simple things, and the fact that it can’t make a log either makes it hard to debug! Could everybody who encounters the directory/log creation problem post their OS version and Yojimbo version?

  • kristian

    ok, i downloaded the yojimbo 2.0 trial version and the same error repeated also with yojimbo 2. might it be snow leapoard then? growl again says: ERROR: could not set content of Yojimbo note EE5C16D1-9584-4D1A-A49A-6DFBAA3DD69A

    looking into the console these messages are produced, perhaps this helps:

    24/10/09 12:55:55 PM Yojimbo[25053] Initializer-based scripting additions have been deprecated. Please update this addition: “/Library/ScriptingAdditions/Adobe Unit Types.osax” 24/10/09 12:55:55 PM Yojimbo[25053] Initializer-based scripting additions have been deprecated. Please update this addition: “/Users/kristiankloeckl/Library/ScriptingAdditions/Default Folder X Addition.osax” 24/10/09 12:55:55 PM Yojimbo[25053] Initializer-based scripting additions have been deprecated. Please update this addition: “/Users/kristiankloeckl/Library/ScriptingAdditions/List & Record Tools.osax” 24/10/09 12:56:00 PM applet[25062] Initializer-based scripting additions have been deprecated. Please update this addition: “/Library/ScriptingAdditions/Adobe Unit Types.osax” 24/10/09 12:56:00 PM applet[25062] Initializer-based scripting additions have been deprecated. Please update this addition: “/Users/kristiankloeckl/Library/ScriptingAdditions/Default Folder X Addition.osax” 24/10/09 12:56:00 PM applet[25062] Initializer-based scripting additions have been deprecated. Please update this addition: “/Users/kristiankloeckl/Library/ScriptingAdditions/List & Record Tools.osax” 24/10/09 12:56:05 PM osascript[25070] Initializer-based scripting additions have been deprecated. Please update this addition: “/Library/ScriptingAdditions/Adobe Unit Types.osax” 24/10/09 12:56:05 PM osascript[25070] Initializer-based scripting additions have been deprecated. Please update this addition: “/Users/kristiankloeckl/Library/ScriptingAdditions/Default Folder X Addition.osax” 24/10/09 12:56:05 PM osascript[25070] Initializer-based scripting additions have been deprecated. Please update this addition: “/Users/kristiankloeckl/Library/ScriptingAdditions/List & Record Tools.osax” 24/10/09 12:56:09 PM osascript[25073] Initializer-based scripting additions have been deprecated. Please update this addition: “/Library/ScriptingAdditions/Adobe Unit Types.osax” 24/10/09 12:56:09 PM osascript[25073] Initializer-based scripting additions have been deprecated. Please update this addition: “/Users/kristiankloeckl/Library/ScriptingAdditions/Default Folder X Addition.osax” 24/10/09 12:56:09 PM osascript[25073] Initializer-based scripting additions have been deprecated. Please update this addition: “/Users/kristiankloeckl/Library/ScriptingAdditions/List & Record Tools.osax”

  • Ah, okay then, perhaps that’s not the reason.

    I think those are messages to do with scripting additions provided by other programs – some Adobe product, Default Folder X, and List & Record Tools. I don’t have those installed and I don’t get those messages. I don’t think they’re contributing here, but I’ll bear it in mind, thanks.

  • kristian

    hello archon, what do you reccomend me to do? anything i can try doing on my end to get it work or wait for your next update to snys?

    your script is very interesting for two reasons: 1. i take many cronologically ordered notes in journler… and since journler has unfortunately just been discontinued, a switch to an alternative (yojimbo or macjournal) seems inevitable in the near/mid future

    1. i love the speed and immediacy of simplenote on the iphone and finding a way to sync it with a note program on mac is very interesting for me.

    tx, kristian

  • I’ll continue to try to get this to work for everyone – it’s just a bit difficult when I can’t reproduce the issue myself! I’ve done a new version which might help to narrow down the problem with a few new error messages.

    Oh, and by the way, I’m afraid that creation date and modification date of Yojimbo records is read-only to Applescript, so I can’t change those, I’ve just found out.

  • WIth version .031 I still don’t have a Log file and I still don’t get it to create the database. 🙁

  • kristian

    neither working here with mac os 10.6.1 same error message in growl as before, only the first note is created in yojimbo and the simplenote folder.

    the only difference, in the console i get this additional message: 24/10/09 5:09:06 PM Firewall[70] Stealth Mode connection attempt to UDP 192.168.20.2:51844 from 83.224.66.134:53

  • Arko

    I get the following error:

    http://twitpic.com/n4vp3

    Thanks, Simplenote sounds really great, can wait to try it!

    best regards

  • Rick

    I get the same error as Arko (October 27th).

  • AndrÊs

    I get the same error as Arko (October 27th).

  • Darren Stueber

    I too get the same error as Arko: Fatal error: Class ‘SQLite3’ not found in ~/Applications/Simplenote Yojimbo Sync.app/Contents/Resources/Scripts/simplenote_sync.php on line 85

    I am using Yojimbo 1.5.2 with OS X 10.5.8. I received this message after inputting the password.

    Thanks!

  • Same error as Arko (Class ‘SQLite3’ not found…).

    Yojimbo 2.1 (108) with Mac OS X 10.5.8 (Build 9L30).

    Note that I only have the Mac OS X 10.5 built-in version of PHP installed. Here’s what phpinfo() reports for SQLite:

    SQLite support enabled PECL Module version 2.0-dev $Id: sqlite.c 282740 2009-06-25 00:07:20Z scottmac $ SQLite Library 2.8.17 SQLite Encoding iso8859

    I can’t tell from the code if that’s the version of SQLite you’re expecting to find, but should there be a require xxx statement to ensure it’s loaded? Or some other kind of test?

  • Right, yes, I think that is the issue with SQLite – I’m using the PHP SQLite3 module rather than SQLite. Apparently that is not present in PHP versions for Leopard. It’s possible to work round that by using sqlite3 from the command line though – a lot easier than asking people to install SQLite3! – so I will put that into the next version.

  • This is a handy script. I use it regularly – although I’ve modified it to restore it to the old functionality (running on command) as I find it a bit cumbersome to have the icon open in my dock all the time.

    Any chance it can be updated to include Simplenote’s new tag support? It would also be great to have this run as a service, though I don’t suspect Applescript supports that kind of thing.

  • I definitely aim to support the new API with tags, yes, though it’s a question of finding the time as always.

  • Bob

    Thanks so much! Worked great.

  • Trevor Meier

    Something appears to be amiss with SNYS. It insists on re-syncing my entire library, creating duplicates for all entries. Anyone else seeing this? Any thoughts on how to avoid it?

    I’ve deleted the offending entries and resynced to no avail.

  • archon

    I’ve been having trouble as well, but have also been having trouble using Notational Velocity on two machines and duplicating text files in Dropbox (a long boring story) so had put it down to that.

    I’ll take a look into it. It sounds like there may have been an API change or other issue somewhere which means the script isn’t getting the IDs of the Simplenotes properly, and thinks they’re all new each time.

  • Trevor Meier

    Any findings?

  • Trevor Meier

    For the record I am using a) OS X 10.6.6 and b) Yojimbo 3.0.1. I’ve updated to 3.0.2 with the same problem/result.

  • archon

    I’ve tested it back and forward for a while and it seems to be working fine at the moment. I’m not sure what the original issue was – perhaps some sort of Simplenote blip – but deleting all my Simplenotes and resyncing has, over the last few days, produced no issues.

    I added a post about this and uploaded the latest version.