Scriptable on iOS is so good. I’m building out an Obsidian library in JavaScript and there is just so much there.

Got my initial library up. Was able to append text to a header section.

Next up: geolocation links that integrate with the MapView plugin.

Who knew Scriptable was so good?

#obsidian #javascript #scriptable #ios

@rob I’m intrigued to hear more about this.

Let's start with the baseline: iOS shortcuts are great and they are terrible. They are great because they are so powerful, but they give a terrible user experience both when programming (the Shortcuts UI is so bad) and also at run time, depending on the shortcut. For instance, I purchased Actions for Obsidian and while they work great, the fact that it opens Obsidian and shortcuts and whatever else made it a non-starter for me.

@cctechwiz

Scriptable gives you the headless shortcuts runs, has access to a lot of the iPhone, and is all wrapped in a Javascript library.

So far, I have written the following objects:

* ObsidianFile
* FrontMatter
* Section
* ObsidianNote (subclass of ObsidianFile)

I have about 30 methods. And what I have really tested is to see if I could write text to the end of a section (I can). So now I have to circle back and test the other methods.

@cctechwiz

@rob Oh interesting. Are you working with the md files directly then?

Yes. I'm just loading the file into memory, scanning it for what I want to do, and then writing it back with changes. There is no reason to really call Obsidian at this point.

@cctechwiz

I'd say that is one of the big benefits of Actions for Obsidian in that it kicks off the native syncing. That said, Obsidian syncing has been a real pain in my behind. I tried rolling my own sync using Remotely Save. It worked, but was painful.

So I paid for Obsidian Sync. And wow - in my experience it is horrible. So many duplicated files. It says I have used a GB when my vault is tens of MB. Obsidian Sync is one of the slowest and worst services I remember paying for.

@cctechwiz