in Code

SNYS v0.4, “Delete all Simplenotes” script, sundry data duplication issues

A few people have mentioned that SNYS seems to be duplicating notes recently, which I experienced myself. I’m not entirely sure what caused this – perhaps a brief Simplenote blip – but after some testing, I can say that after resetting sync by deleting all my Simplenotes and re-uploading, SNYS is behaving fine for me.

I’ve added a page that explains how to reset sync – basically, quit SNYS, delete everything in either Yojimbo or Simplenote, and then run SNYS again. Because it is a pain to delete everything in Simplenote manually, and there are often metadata worth preserving in Yojimbo, I’ve also uploaded the script I use to delete all of my Simplenotes automatically, which I’ve had to use while testing a few times.

Finally, I’ve uploaded version 0.4 of SNYS, which is basically the same as the previous one but has some more data checks to try to make sure that, if there is a communication issue, it is less likely to duplicate your notes. If it finds what it thinks is a zero note count in either Yojimbo or Simplenote, it will ask you to confirm before syncing. The auto-update function should alert you of this, or you can get it from the usual page.

  • Trevor Meier

    Thanks for the update!

  • Martin

    I just discovered this script and I really like the idea to have a sync between these two apps, but sadly I can’t get it to work. Everytime I start the script I run into an error that reads:

    “unable to open database “/Users/my_name/Library/Application Support/Simplenote Yojimbo Sync/SimplenoteSync.sqlite” unable to open database file”

    I am no programmer so I don’t know what to do. I am using OS X 10.6.6. The only thing I could think of that may causes problems is that I have a user account and an adminstrator account with different rights (nothing fancy).

    Any help would be appreciated. 🙂

  • Martin

    I tried to investigate the problem and I found out, that neither the folder nor the .sqlite has been created. I created the folder and an empty file that I named accordingly. Now the error is different and I think I am stuck:

    “SQL error: no such table: vars”

    P.S.: I also forgot to mention that I have never been asked for my username and password for simplenote

  • archon

    It may well be an issue with the administrator vs user account. Have you tried running it as the administrator?

  • same problem here, also with 10.6.6 no suggestions?!

  • This blog is well written, I’m like, come on-[url=]cheap Milgauss replicas[/url]

  • Trevor Meier

    I recently changed my password on Simplenote and am getting this same issue.

  • Dafydd Hughes

    Hi! This script looks awesome, but I’m having the same problem as above. My AppleScript is weak, but it looks like there’s no folder/table creation going on – is that handled automatically in applescript/sqlite?

  • ordinal

    Creating the database is done via a PHP script called by the Applescript (the main work in SNYS is done by PHP).

    I suspect there are issues regarding permissions and locations of files but I can’t tell very well unless I know of any unusual situations – such as not running with an admin account, perhaps, or using FileVault.

  • Dafydd Hughes

    Hmm – neither of those two situations fit here, but it looks like the php scripts for sure aren’t running. I wonder if they need to be in my Sites folder so they have access to the server. I’ll try that.

  • Dafydd Hughes

    Found it – or at least for me: I had to move 

    p.p1 {margin: 0.0px 0.0px 0.0px 78.6px; text-indent: -78.6px; font: 12.0px Verdana} span.s1 {color: #438f2b} span.Apple-tab-span {white-space:pre}

    sqliteQuery(“CREATE TABLE IF NOT EXISTS vars (name VARCHAR(32), value TEXT)”)up into checkVersion(). Now it’s good, but it’s duplicating my notes with every sync. Working on it…

  • ordinal

    Apparently it has permission to create tables for you, but something is failing between that point and where the creation used to be. I will take a look when I have a moment to see if I can work out what that might be.

  • did you find a solution yet?