avalanche
avalanche copied to clipboard
Example presentation.cfg is not python 3 compatible
The comment in the example presentation.cfg is treated as part of the value for the css filepath when run under python 3.
In python 2:
(landslide2)➜ example_presentation git:(master) landslide presentation.cfg;
Config presentation.cfg
Using configured theme ../avalanche
Adding example.md (markdown)
Embedded image elephpant.jpg
Embedded image elephpant.jpg
Generated file: ./example.html
(YAY!)
In python 3:
(landslide)➜ example_presentation git:(master) landslide presentation.cfg
Config presentation.cfg
Using configured theme ../avalanche
Error: ../custom_css/pygments/default.css ; source code highlighting user css file not found
(BOO!)
That's probably because, at least according to the docs, configparser in Python 2 allows comments to share a line with a key/value pair:
Configuration files may include comments, prefixed by specific characters (# and ;). Comments may appear on their own in an otherwise empty line, or may be entered in lines holding values or section names. In the latter case, they need to be preceded by a whitespace character to be recognized as a comment. (For backwards compatibility, only ; starts an inline comment, while # does not.)
whereas the python 3 docs only describe full-line comments as valid:
Configuration files may include comments, prefixed by specific characters (# and ; by default [1]). Comments may appear on their own on an otherwise empty line, possibly indented. [1]
Simplest fix #17
or
General cleanup of example configs #18