Compare commits

..

No commits in common. "dc0b2f4df7428a7e5d13a35c7f6e3c45b0d2ed4b" and "4a8f48e49163d136c25abcc37dfc9f0ed7719607" have entirely different histories.

2 changed files with 5 additions and 48 deletions

View file

@ -12,11 +12,11 @@ ignore_messages:
# Every commit message matching one of the regular expressions defined
# in here will cause a patch-version increase (1.0.0 -> 1.0.1).
match_patch:
- "\[CI\]"
- "[dD]ep:"
- "[fF]ix:"
- "[lL]int:"
- "[rR]efactor:"
- "^CI"
- "^[dD]ep"
- "^[fF]ix"
- "^[lL]int"
- "^[rR]efactor"
# Every commit message matching one of the regular expressions defined
# in here will cause a major-version increase (1.0.0 -> 2.0.0).

View file

@ -1,43 +0,0 @@
#!/usr/bin/env zsh
set -euo pipefail
source ~/bin/script_framework.sh
usage="$(basename $0) [-d DPI] [-f] [-h] [-l] <outfile.pdf> <...infile.jpg|png|...>"
A4H=11.7 # inch
A4W=8.3 # inch
DPI=150
h=${A4H}
w=${A4W}
scalearg=""
while getopts "d:fhl" opt; do
case "${opt}" in
d) DPI=${OPTARG} ;;
f) scalearg="^" ;;
h) fatal "${usage}" ;;
l)
h=${A4W}
w=${A4H}
;;
esac
done
shift $((OPTIND - 1))
outfile=${1:-}
[[ -n $outfile ]] || fatal "${usage}"
shift
exec convert "$@" \
-compress jpeg \
-resize $((w * DPI))x$((h * DPI))${scalearg} \
-gravity center \
-extent $((w * DPI))x$((h * DPI)) \
-units PixelsPerInch \
-density ${DPI} \
"${outfile}"
# vim: set ft=sh :