I have a list of links that I store in a subtree in an org file. Is there a way to export this to an HTML file using the command line? I figure it's something like emacsclient --eval ...
with an elisp command for exporting that header, but I'm not sure how best to go about this.
1 Answer
Here's one way to do it using org-id
(there are, of course, other ways of finding a subtree in the buffer).
emacsclient -e "(progn (find-file \"$1\") \
(org-id-goto \"$2\") \
(org-html-export-to-html nil t))"
First you have to create an ID for the entry you want to export using org-id-get-create
and then:
$ htmlexport '~/file.org' 'd00d2d9e-8e48-4c60-898e-7b91b12302cf'`