forked from josch/img2pdf
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

Running img2pdf from source
img2pdf can be run directly from the cloned git repository:
$ python3 src/ img.jpg -o out.pdf
Running the testsuite
$ python3 test
$ ./
Fixing the testsuite
Sometimes your changes will break the testsuite. The testsuite works by
comparing the images found in `src/tests/input` with the corresponding PDF
documents in `src/tests/output`. The filename of the output file will be the
same name the input has with the `.pdf` suffix appended to it. To generate the
files in the `src/tests/output` directory via the command line, run:
$ src/ --producer="" --nodate src/tests/input/normal.jpg -o src/tests/output/normal.jpg.pdf
This makes it easier to spot where the differences are and how to fix the
Fixing the testsuite
If your changes break, then the script will abort immediately and tell
you where it left the temporary files for you to inspect. You can also try
running the script like this for maximum verbosity:
$ sh -x ./
Making a new release
- CHANGES.rst: Add a new entry
- src/ Bump __version__
- Commit:
$ git add CHANGES.rst src/
$ git commit -m "release version X.Y.Z"
- Add git tag:
$ git tag X.Y.Z
- Build and upload to pypi:
$ rm dist/*
$ python3 sdist
$ twine upload --sign dist/*