add documentation; license header

This commit is contained in:
Tilman Kranz 2023-12-10 23:31:23 +01:00
parent 77f79038da
commit 63e2c0228e
2 changed files with 62 additions and 1 deletions

42
README.md Normal file
View File

@ -0,0 +1,42 @@
# photos2pdf - Create PDF from Series of Photos
## Description
Optimized for the processing of ad-hoc photos of flipcharts and whiteboards,
this converter utility scans a given directory for each file with the `.jpg`
filename extension, post-processes it (stretching contrast and trimming content
to the actual drawings. From the resulting pictures a PDF is generated, one
picture per page.
## Dependencies
This utility requires the following tools to be installed:
```shell
apt install imagemagick pdfjam pdftk
```
## Installation
```shell
git clone https://tk-sls.de/git/tk-sls.de/photos2pdf.git
cd photos2pdf
sudo make install
```
## Usage
Given a directory `some_directory` containing one or more JPEG pictures (the
filenames have to end with `.jpg`):
```shell
photos2pdf --result-filename output.pdf some_directory
```
The utility offers some options that control the aspects of the conversion;
use the `--help` option for usage instructions.
## Author and Copyright
©2023 Tilman Kranz <(t.kranz@tk-sls.de)[mailto:t.kranz@tk-sls.de]>

View File

@ -1,7 +1,26 @@
#!/bin/bash #!/bin/bash
# photos2pdf - Convert Flipchart/Whiteboard Photos to PDF
##
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the “Software”), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
## ##
# Configuration # Configuration Defaults
# Before morphology analysis, reduce image dimensions by this factor # Before morphology analysis, reduce image dimensions by this factor
simplify=2 simplify=2