4

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.

3

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'`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.