File format for import

Yes, probably.

But I find a shell script and 2 JSON capable binaries (from MacPorts or HomeBrew) way more easy than JavaScript :sweat_smile:

One is an on-board tool, the others are not. That’s the main difference, in my mind. OTOH, reading from stdin with JavaScript is not obvious, so for a pure CLI solution, your way might be easier.

I’m working daily on the command line and bash, so that’s quite natural to me :slight_smile:

1 Like

That’s not so natural for many, many people in our clientele. Just so you know.

And bash, not zsh ? :thinking:

This was just about converting from JSON to Markdown, so just some generic workflow - nothing to do with DT!
I just mentioned it, because a member wanted to convert JSON to XML, which I see not much use in.

Yes, bash.
I prefer it over other shells.

Some of us use fish. :slight_smile:

1 Like

I need shells that are available everywhere (on most OS) and best don’t need to be installed explicitly :sweat_smile:
Also, I am just used to bash.

The strength of fish is auto-completion?

This feature is strictly remove from the shells I work with, I just don’t like it :hugs:

I actually use zsh since it’s the default shell on a Mac nowadays.
Our company president uses fish, so he’d have to comment on that.

1 Like

Regarding extracting the information:
Afaik JSON is simply a structured textdocument and uses predefined keys. You can use smartrules (right in DT with one per key + RegEx) or Applescript (right in DT) to write those details to the document fields (or custom meta data fields) on import. No need to do any external conversion.

Regarding importing JSON Doctypes:
I haven’t tried importing a *.json to DT but in the end you could just export them as *.txt if that’s a blocker for DT.

JSON is a serialization format for JavaScript Objects (ā€œJavaScript Object Notationā€). And it does not use ā€œpre-defined keysā€ but whatever properties the objects to serialize contain. It has not been devised to be a general purpose text format, though.

https://www.json.org/json-en.html

or JavaScript (right in DT)

1 Like

Yes, thanks for the clarification. My intention is to emphasize that this is solvable within DevonThink assuming that the properties are known beforehand. I mean you could even create a custom metadatafield for any property in the JSON File while importing (while not advisable).