Zim

How to create a single html page from command line?

Asked by Ralf Hersel on 2017-01-06

I would like to generate a single html page from the command line using the --export feature but I don't know how. I'm able to generate html for the whole ZIM notebook with:

zim --export --format=html --template=ZeroFiveEight --output=./build --overwrite Notes

Is there a way to do the same but just for one single page?
Just to avoid misunderstandings, I know how to generate the complete Notes into one single html file but that's not what I want. I want one single ZIM page in one single html file via command line. Similar to pressing Ctrl+p but from CLI.

Question information

Language:
English Edit question
Status:
Open
For:
Zim Edit question
Assignee:
No assignee Edit question
Last query:
2017-01-15
Last reply:
2017-01-12
K Ray Vranken (k-ray-v) said : #1

just add the wanted pagename add the end of the command.

Ralf Hersel (ralf.hersel) said : #2

This does not work. For example this command:

zim --export --format=html --template=ZeroFiveEight --output=./build --overwrite Notizen Maxima

leads to this error:

File "/usr/lib/python2.7/dist-packages/zim/export/template.py", line 282, in index_function
    elif ignore_empty and not (path.hascontent or path.haschildren):
AttributeError: 'Path' object has no attribute 'hascontent'

I guess that the page name must be somehow qualified. Can you please post an example?

Can you help with this problem?

Provide an answer of your own, or ask Ralf Hersel for more information if necessary.

To post a message you must log in.