I want use emacsclient -e "command" to covert org mode file to html file, such as:
emacsclient -e "(org-html-export-as-html ./mynote.org)" > ./mynote.html
hope it will be save output to mynote.html file.
But I'm not familiar with elisp yet. Actually, org-html-export-as-html has many parameter I don't know how to use it.
A/ You can do it "yourself" with:
Caveat: to make it works you should have started Emacs with
or if you already have an Emacs running, type
M-x server-startB/ use a github package
https://github.com/nhoffman/org-export
which creates some compiled lisp executables:
However my personnal experience is that the command line approach is faster.
C/ Bonus, tangling file
You can tangle files with the same command line approach:
Update, gives more details about C/
"tangling" is a term coined from literate programming
You have a unique file:
You can html export it (parts A/ or B/), but but can also export the code it contains, here a shell script. From Emacs this can be done with
C-c C-v tor, from shell, using the command I provided in C/ part. The result is the automatic generation of thetangled.shfile.You can have a look here: Babel: active code in Org-mode for further details.