https://github.com/arc42/PDFminion
An experimental utility to wrap some simple PDF functions, e.g. for stamping page numbers onto existing pdfs, adding header + footer text etc.
https://github.com/arc42/PDFminion
arc42 cli documents golang handout pdf
Last synced: about 1 year ago
JSON representation
An experimental utility to wrap some simple PDF functions, e.g. for stamping page numbers onto existing pdfs, adding header + footer text etc.
- Host: GitHub
- URL: https://github.com/arc42/PDFminion
- Owner: arc42
- License: mit
- Created: 2021-05-02T14:36:26.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-12T16:06:14.000Z (over 1 year ago)
- Last Synced: 2025-03-18T20:54:07.104Z (about 1 year ago)
- Topics: arc42, cli, documents, golang, handout, pdf
- Language: Go
- Homepage: https://pdfminion.arc42.org/
- Size: 18 MB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# 
Helper (_minion_) for some mundane tasks with PDF documents, among others:
* add page numbers
* add header and/or footer text
* concatenate (combine multiple PDF files into a single file)
It shall have a (multi-platform) graphical user interface, at least for Mac-OS, Windows and maybe Linux.
> minion: a servile dependent, follower, or underling.
> "He's one of the boss's minions."
> From: [Merriam-Webster Dictionary](https://www.merriam-webster.com/dictionary/minion)
## Status
[](https://github.com/gernotstarke/PDFminion/actions/workflows/feature-linter.yml)
[](https://github.com/gernotstarke/PDFminion/actions/workflows/go_test.yml)
[](https://goreportcard.com/report/github.com/gernotstarke/PDFminion)
[](https://sonarcloud.io/dashboard?id=gernotstarke_PDFminion)
[](https://codeclimate.com/github/gernotstarke/PDFminion/maintainability)
[](https://opensource.org/licenses/Apache-2.0)
I'm currently experimenting with an MVP version of PDFminion, therefore most of the information given here is **NOT** valid any longer.
## Why PDFminion?
## Development
#### The following paragraphs are outdated!!
We're using BDD (behavior driven development) with Cucumber to specify at least part of the requirements as _scenarios_.
These scenarios can be executed, similar to automated unit tests.
* [Godog](https://github.com/cucumber/godog), the official Cucumber tool
* [Cucumber HTML Reporter](https://www.npmjs.com/package/cucumber-html-reporter)
* [Cucumber Multi Reporter (more detailed)](https://github.com/wswebcreation/multiple-cucumber-html-reporter)
Use `./create-detailed-cucumber-report.sh` to generate a detailed BDD Cucumber report.
### Deviation from Standard golang practices
As of June 2021, the `godog` bdd tool does not respect the standard golang layout practice
of putting test files next to the tested-code.
Instead, the step definitions need to be present in the root folder!
To avoid confusion, I prefixed the step definitions with `stepdef_` - so they are easily recognizable.
Other (non-bdd/cucumber) automated tests will reside within the appropriate package folders.
See this [Cucumber/godog issue](https://github.com/cucumber/godog/issues/373).
### Godog
````shell
go get github.com/cucumber/godog/cmd/godog@v0.12.0
````
### Cucumber HTML Reporter
It's written in JavaScript and requires `npm` and `node` to be available on your machine.
```shell
npm install cucumber-html-reporter --save-dev
```
### Cucumber Multi Reporter
Again, JavaScript, see above:
```shell
npm install multiple-cucumber-html-reporter --save-dev
```
## Usage of Development Tools
I squeezed the required commands into the files `create-cucumber-report.sh`
and `create-detailed-cucumber-report.sh`.
### Godog
```shell
godog --format cucumber:test-results-results/cucumber-report.json
```
Notes:
* godog requires features and scenarios to be written in a `features` directory.
* the `--format` switch can take a file and/or directory name
### Cucumber Report
```shell
node ./assets/simple-cucumber-report.js
```