Skip to content

Pandocomatic 1.0!

Compare
Choose a tag to compare
@htdebeer htdebeer released this 19 Aug 14:55
· 31 commits to master since this release

Over the past years, pandocomatic has grown into a useful tool. I now release version 1.0 to signal that the current state of pandocomatic is stable. Given pandoc's development to include features for which I developed pandocomatic in the first place, like the --defaults file feature, pandocomatic needs to be rethought and rewritten. But that's for version 2.0. If you have any ideas for this future version, let me know in the discussions.

For now, I'll maintain the current state of pandocomatic in version 1.x, fix bugs, ensure compatibility with new pandoc versions, and add useful features to keep improving pandocomatic.

Changes for version 1.0

With version 1.0, pandocomatic's behavior has changed a little, but the conversions themselves should not be affected. Still, given the number and character of changes, see below, I cannot guarantee that pandocomatic hasn't changes some behavior you've come to rely on. If there's something going amiss after upgrading to pandocomatic 1.0, please downgrade to the latest 0.x version and submit a bug report.

Use environment variables in templates (#103)

Pandocomatic now replaces all occurrences of the form $(X)$ in internal and external templates by the value of the environment variable X. You can use these environment variables anywhere in a template, so this is quite a powerful feature. If an environment variable does not exists, pandocomatic halts with an error message.

Output to STDOUT (#71)

Added command-line option --stdout to pandocomatic. If you use this option, pandocomatic writes to STDOUT instead to a file. This option doesn't work together with the --output option, nor when using pandocomatic as a static-site generator and converting whole directories.

For this feature, I changed pandocomatic behavior to be quiet by default. If you want to have verbose output use pandocomatic's --verbose command-line option.

Ignore pandoc's --verbose option (#102)

Pandoc's --verbose option can write to STDOUT. Because pandocomatic uses STDOUT to communicate between processors and pandoc, this option can interfere with the working of pandocomatic. To resolve this issue, pandoc's --verbose option is ignored. Whenever pandocomatic ignores this option, a warning is printed.

Global template inheritance and improved messages (#96)

If you extend or use a template, pandocomatic searches for the first occurrence of that template in the configuration hierarchy. This hierarchy is always:

  1. internal template
  2. external template in a configuration file
  3. external template in pandocomatic.yaml in a data directory
  4. external template in pandocomatic.yaml in the user's pandoc configuration directory
  5. external template in pandocomatic's default configuration.

If resolution of an inherited template is impossible, an error message is printed pointing to the file with the template reference that cannot be resolved.

Furthermore, the configuration hierarchy is printed for easier debugging of your templates.

Various bug fixes and improvements

Among others:

  • #100 Process date properties in YAML
  • #98 Properly handle empty YAML properties