RhetTbull / macnotesapp

Work with Apple MacOS Notes.app from the command line. Also includes python interface for scripting Notes.app from your own python code.
MIT License
142 stars 6 forks source link

Add export command #23

Open RhetTbull opened 1 year ago

RhetTbull commented 1 year ago

Add notes export DIRECTORY to export all or some notes to DIRECTORY:

--json: export to JSON --sqlite: export to SQLite DB --txt: export to text --html: export to HTML --attachments: export attachments (link in HTML) --folders: export by folder --markdown: export as markdown

--filename TEMPLATE: use metadata template language template for specifying the file path, e.g:

--filename "{account}/{folder}/{title} - {date}"

RhetTbull commented 1 year ago

See also #20, could be done as --sqlite

RhetTbull commented 1 year ago

Also when exporting individual notes, the creation date and modification date of the file should be set

touch -t will change creation date touch -mt will change modification date

Also add --no-touch option which doesn't change the dates.