I’m an old-time DevonThink 2.x Pro user from a decade ago.
Since then I’ve become a backend developer, and I’m interested in mixing REST API work with something like DT3.
I have a service that I collect tagged files from, and I’d like to put them into DT, and have them properly tagged for coalition, and sync them in the cloud so I have quick access from my phone. I could do this in the Finder and iCloud, but I don’t want to trash my taggings across all my iCloud computers.
DT3 seems like it might solve a lot of problems easily. But to be honest, I kinda hate AppleScript.
Is there anything like a query language, or an API to DT for uploading or editing content/tags in the database?
Or am I barking up the wrong tree, and should I just commit the time to something like a custom SQLite solution?
So yes, you can use JS/AS for
For example, I use JS in Hazel to sort incoming documents into the appropriate groups in DT.
However, this is not at all in the ballpark of a REST API. DT is usually not running as a server unless you have the special server edition. Even in this case, I doubt that it would provide a REST API. The JS/AS APIs mentioned before do not require DT to be running, they can start it if necessary (as opposed to a REST API). On the other hand, they are strictly limited to the current machine – there’s not protocol to talk to a DT instance on another machine (which again would require DT to be running as a server, i.e. listening on some port etc.).
That would not give you any advantage over DT, I’d say. SQLite is also limited to the current machine (no server capabilities), SQL is a beast (even more so then AppleScript ;-), and in my opinion DT is much easier to use.
I appreciate the attention, I think I have the answer to my curiosities.
Good point. I was considering -maybe- upgrading from my 2.x to a 3.x server license if that wasn’t the case.
I think SQL is just fine:
MariaDB is really cool, and seems to be remarkably fast on millions of records (provided the right columns are indexed). Plus, I have an obsession for execution time in my scripts, so I don’t mind hand crafting a temp table in order to left join results faster server-side than in code.
To be honest, I’m emotionally done with AS, and I have no intention in learning the “JS” implementation for OSA.
I think I’m looking for the solution with the wrong tool.
For relational data, sure. For anything else? And this anything else is what you’d usually put into DEVONthink. Querying blobs with SQL might be feasible, but it’s certainly not what it was intended for.