redhataccess / pantheon-cmd

Pantheon CMD is an open source and freely distributed program for validating and building local previews of modular documentation.
GNU General Public License v3.0
2 stars 5 forks source link

Add support for PDF output #28

Closed adahms closed 3 years ago

adahms commented 3 years ago

Add support for PDF output.

adahms commented 3 years ago

Note to self - see if fonts can be included as remote resources at build time.

Also, need to test location of font files in relation to the template. Because these are defined in the template itself, I suspect we'll need to ensure the fonts are in a path relative to the template, which means the 'fonts' directory should fall under the 'templates' directory.

adahms commented 3 years ago

Note to self - we can store fonts in their own directory, alongside their corresponding licensing details.

PDFs won't include images unless the images are relative to the build directory, which they're not today. Will need to consider creating all temporary files under a 'source' directory in the 'build' directory rather than in place so that we can control the environment more directly and allow users to see their base, coalesced content, too.

That requires some of the logic in #21, which will have to be merged first.

adahms commented 3 years ago

Hey @Levi-Leah - putting this one up for review before too much time goes on.

This PR adds a lot of files, but the majority of changes are to options in pcmd.py and to the build routine in pcbuild.py. Mostly to add PDF as an option, along with all the related resources (fonts, a template, etc.), register the same in the make.sh script, and improve on the language and other options so that they're a bit more robust.

adahms commented 3 years ago

Hey @Levi-Leah - ping to see if you can give this one a once over.

If not, I might go ahead and merge things for now so that we can move on to some other updates such as updating the code structure and strengthening some of the existing functions. :)

Levi-Leah commented 3 years ago

@adahms other than the minor comment LGTM

adahms commented 3 years ago

Thanks, @Levi-Leah!

Suggestion accepted, and merging.

We'll need to make some adjustments to the OSX script and elsewhere as well, but we can get to those once these changes are in.