useblocks / sphinx-simplepdf

A simple PDF builder for Sphinx documentations
https://sphinx-simplepdf.readthedocs.io
MIT License
36 stars 15 forks source link

Output file Naming #41

Closed kreuzberger closed 1 year ago

kreuzberger commented 1 year ago

The output file name is determined from the config project value. This is different to other builders an can cause problems in "surrounding" build systems triggering for dependencies and installations.

E.g. the html builders use the root_doc/master_doc value from the conf.py to write to .html. The pdf/latex builders us the sphinx.util.osutils function make_filename_from_project to generate filename friendly output filenames. Should this be "sanitized" like for the pdf builder or does this make no sense?

This could e.g be a problem using spaces, unicode or German Umlaute....

danwos commented 1 year ago

I think we should provide a simplepdf_output option for conf.py, which sets a name defined by the user. If not given, the current behavior shall be used.

This would make the usage in CI more stable, as the final pdf filename does not change, even if the project name go changed slightly.

kreuzberger commented 1 year ago

As i see the project name refers to a title (cover) and therefore you are right. :+1: for the option to specify output name in config. The name of the option may be similar to an existing configuration value, but here is no conformity in the builders. Best approach seems to be latex_ oder texinfo_documents where these options are set via "nice" names. But you are totaly free