Zim

Regressions in zim 0.44? Exporting Bugs

Asked by Li-aung Yip ("Lewis")

Before I file a bug (because I'm too tired to actually do a proper test case and verify it's real), I've been testing the new 0.44 release of Zim on linux, and there appears to be a few features that went AWOL since zim was rewritten in Python.

Note : I could be on crack and imagining things. Need to test using a fresh notebook and see if I can replicate the behaviours...

----

1) When exporting the notebook to HTML via the export dialog, specifying a template with a syntax error causes anomalous behaviour. More specifically, clicking the 'Export' button does nothing (silent failure.)

I tried doing the same operation via command line, and some exceptions are getting thrown around without being handled properly. Log of my terminal session follows:

----

[Mon Mar 22 - 02:15:32] ~
[lws.demiurge] $ zim --export --output=./tmp/Zim-2010_HTML/ --format=html --template=~/Zims/Zim-2010/Template.html ~/Zims/Zim-2010
WARNING: Invalid config value for slow_fs: "0" - should be of type <type 'bool'>
Traceback (most recent call last):
  File "/usr/bin/zim", line 41, in <module>
    zim.main(argv)
  File "/usr/lib/python2.6/site-packages/zim/__init__.py", line 259, in main
    method(**optsdict)
  File "/usr/lib/python2.6/site-packages/zim/__init__.py", line 443, in cmd_export
    exporter = zim.exporter.Exporter(self.notebook, format, template, document_root_url=root_url)
  File "/usr/lib/python2.6/site-packages/zim/exporter.py", line 42, in __init__
    self.template = get_template(format, template)
  File "/usr/lib/python2.6/site-packages/zim/templates.py", line 106, in get_template
    return Template(file.readlines(), format, name=file)
  File "/usr/lib/python2.6/site-packages/zim/templates.py", line 249, in __init__
    GenericTemplate.__init__(self, input, name)
  File "/usr/lib/python2.6/site-packages/zim/templates.py", line 152, in __init__
    self._parse(input)
  File "/usr/lib/python2.6/site-packages/zim/templates.py", line 238, in _parse
    raise error
zim.templates.TemplateSyntaxError

----

2) Unrelated to above : Index page generation / backlinks generation appears to be broken.

When exporting a notebook using the default HTML template, no index page is generated (the Index link links to file:///, which is of course fairly useless.) Additionally, no backlinks are detected for any page.

I whipped up a test for this one - made a blank new notebook with a few pages and a few links between the pages, then exported it using default settings. Resulting HTML pages had no backlinks and there was no index.html generated (even though I asked for it); additionally, the [Index] link on each page linked to '/' or similar.

----

- Lewis.
(<email address hidden>)

Revision history for this message
Best Jaap Karssenberg (jaap.karssenberg) said :
#1

1) Issue with error handling, seems a clear bug, syntax error should
have resulted in a error dialog - please file a bug report
2
)
  a) Backlink functionality in templates is indeed not yet supported
in this branch - please open a bug report to remind us
  b) Index page should be generated correctly, please test it a bit
more and if you see a problem please open a separate bug report for
that.

-- Jaap

Revision history for this message
Li-aung Yip ("Lewis") (littleweseth) said :
#2

Thanks Jaap Karssenberg, that solved my question.