diff options
author | Michael Düll | 2015-07-04 14:02:07 +0200 |
---|---|---|
committer | Michael Düll | 2015-07-04 14:02:07 +0200 |
commit | 9fdb5e211e00020d106193eef3ce7e5282e949d5 (patch) | |
tree | a7203aa8891c6f7ae8dba2c32b927e3c174bd663 | |
download | aur-9fdb5e211e00020d106193eef3ce7e5282e949d5.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | LICENSE | 2 | ||||
-rw-r--r-- | PKGBUILD | 23 | ||||
-rw-r--r-- | pdf2book | 22 |
4 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bf79396a2abf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = pdf2book + pkgdesc = Rearranges the pages in a PDF to be printed as a book (or booklet). Print double-sided in "short-edge" mode. + pkgver = 1 + pkgrel = 3 + url = http://www.documentroot.net/linux/linux-buecher-broschueren-drucken + arch = any + license = custom + depends = psutils + source = pdf2book + source = LICENSE + sha512sums = 49f32407f6511cac4070ec07259d2c25622b7856d29b3fb9c6de697f79df0df6b111cde2e4fe485869603299690f08493b926a378ffd9e00bd82a76f17bab89c + sha512sums = dc2e70c3e8bc5d135b694bad786258ef29437d23ce5919039ae5848a0aa29b0a336d1a501f58e348202b47cf031081d2a3ed391b17532d24f9b8a05008c60a17 + +pkgname = pdf2book + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..bba7a50188e4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +© Kopieren erlaubt, aber bitte Quellenangabe +Source: http://www.documentroot.net/linux/linux-buecher-broschueren-drucken diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6fa50003c2db --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Michael Düll <mail@akurei.me> PGP-Key: AAAEE882 +pkgname=pdf2book +pkgver=1 +pkgrel=3 +pkgdesc="Rearranges the pages in a PDF to be printed as a book (or booklet). Print double-sided in \"short-edge\" mode." +arch=('any') +url="http://www.documentroot.net/linux/linux-buecher-broschueren-drucken" +license=('custom') +depends=('psutils') +source=('pdf2book' + 'LICENSE') + +package() { + cd "$srcdir/" + install -d ${pkgdir}/usr/bin/ + install -d ${pkgdir}/usr/share/licenses/pdf2book + install -Dm 755 pdf2book ${pkgdir}/usr/bin/ + install -Dm 644 LICENSE ${pkgdir}/usr/share/licenses/pdf2book/ +} + +# vim:set ts=2 sw=2 et: +sha512sums=('49f32407f6511cac4070ec07259d2c25622b7856d29b3fb9c6de697f79df0df6b111cde2e4fe485869603299690f08493b926a378ffd9e00bd82a76f17bab89c' + 'dc2e70c3e8bc5d135b694bad786258ef29437d23ce5919039ae5848a0aa29b0a336d1a501f58e348202b47cf031081d2a3ed391b17532d24f9b8a05008c60a17') diff --git a/pdf2book b/pdf2book new file mode 100644 index 000000000000..5fe1c4ce0824 --- /dev/null +++ b/pdf2book @@ -0,0 +1,22 @@ +#!/bin/sh + +filename=$(ls "$1" | sed 's/\(.*\)\..*/\1/') + +if [ "" = "$filename" ] +then + echo "Datei nicht gefunden. Ende." + exit 1 +fi + +tempname="/tmp/pdf2book" + +pdf2ps "$filename.pdf" "$tempname.1.ps" + +if [ "$2" = "" ] + then psbook -q "$tempname.1.ps" "$tempname.2.ps"; + else psbook -q -s$2 "$tempname.1.ps" "$tempname.2.ps"; +fi + +psnup -q -2 "$tempname.2.ps" "$tempname.1.ps" + +ps2pdf "$tempname.1.ps" "$filename.book.pdf"
\ No newline at end of file |