Is there a way to create a new draft from the command line? Like either add a text file as a new draft or save the command output as a new draft?
I can think of a few ways, but the simplest would probably be to output to a text file in the import folder.
Ah yes, that’ll work, thanks!
An interesting idea would be a command line utility that took tags and the draft contents. Probably doable in AppleScript.
My other thoughts were indeed some some AppleScript (run via
osascript), and also triggering addition via a URL call. The write to the import folder just seemed the simplest option for getting the data in.
I know. And, having perused the options for this the other day, I know you can assign tags on import.
newDraft tag1 tag2 -d “This is the title\n\nThis is the body\n* Item 1\n* Item2”
would be really nice. I can imagine code of mine issuing that command.
use python and the url
- typer handles the agreements
- url calls should be easy
- xcall.app on github
and a thread date in march 2020
there is a wrapper in python (seems to be python 2.7 though)
or a rust implementation
I will look into it sometime in the future.