Skip to content

Build automation - Break down script components. #6

@Kerbalnut

Description

@Kerbalnut

This is a spin-off of Issue #4 Documentation Improvement.

Break down the current batch script into sub-components, place those components into a "source" folder, then create a "build" script that patches them all together.

As the saying goes, "never run any code from the internet, if you don't understand in general what it does". This issue would make this repo more accessible for technical users who wish to do exactly that: review the script's code before they run it. Currently, all pieces & parts of this project are contained in the one batch file, which is becoming monolithic and difficult to consume all at once. I'm the author, and I'm finding it difficult to navigate. That's how bad this is becoming.

Essentially, this script is a specialized automation wrapper for Ghostscript, it formats the switches & parameters sent to it, and handles file output. It's purpose, very explicitly (well maybe not currently laid out in the readme, but it can be added in the future) is only to flatten a 'Resume/CV/Portfolio'-ish PDF document. In theory, it should be a very short, simple script. In reality, have a look at it today, the thing is neither very short nor simple.

A big contributing factor is all the error and dependency handling code that I've added. Just the block for verifying the ghostscript dependency takes up about half the script size.

Either the largest functions should be made external functions, but that would be require an external "dependencies" folder, and would ruin the fact that currently, all code is self-contained in this one script. Or, the script should be set up in a source folder, separate files for each part, and a build script developed.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions