diff options
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | akordy.do | 1 | ||||
-rw-r--r-- | akordy1.xcf | bin | 0 -> 1780130 bytes | |||
-rw-r--r-- | akordy2.xcf | bin | 0 -> 1854158 bytes | |||
-rwxr-xr-x | bin/xcf-to-pdf | 23 | ||||
-rw-r--r-- | print.do | 5 |
6 files changed, 34 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore index 9d78a49..07406d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ .redo -spiewnik-book.pdf + +akordy1.pdf +akordy2.pdf + +spiewnik-all.pdf +spiewnik-all-book.pdf + spiewnik.pdf spiewnik.ps spiewnik.idx diff --git a/akordy.do b/akordy.do new file mode 100644 index 0000000..98e45ca --- /dev/null +++ b/akordy.do @@ -0,0 +1 @@ +./bin/xcf-to-pdf akordy1.xcf akordy2.xcf 1> /dev/stderr diff --git a/akordy1.xcf b/akordy1.xcf new file mode 100644 index 0000000..8bdcf12 --- /dev/null +++ b/akordy1.xcf Binary files differdiff --git a/akordy2.xcf b/akordy2.xcf new file mode 100644 index 0000000..2632ca3 --- /dev/null +++ b/akordy2.xcf Binary files differdiff --git a/bin/xcf-to-pdf b/bin/xcf-to-pdf new file mode 100755 index 0000000..34da9c8 --- /dev/null +++ b/bin/xcf-to-pdf @@ -0,0 +1,23 @@ +#!/bin/sh +{ +cat <<EOF +(define (convert-xcf-to-pdf filename outfile) + (let* ( + (image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) + (drawable (car (gimp-image-merge-visible-layers image CLIP-TO-IMAGE))) + ) + (file-pdf-save RUN-NONINTERACTIVE image drawable outfile outfile TRUE TRUE TRUE) + (gimp-image-delete image) ; ... or the memory will explode + ) +) + +(gimp-message-set-handler 1) ; Messages to standard output +EOF + +for i in $*; do + echo "(gimp-message \"$i\")" + echo "(convert-xcf-to-pdf \"$i\" \"${i%%.xcf}.pdf\")" +done + +echo "(gimp-quit 0)" +} | gimp -i -b - diff --git a/print.do b/print.do index 92b1c97..d662d1c 100644 --- a/print.do +++ b/print.do @@ -1,2 +1,3 @@ -redo-ifchange spiewnik.pdf -pdfbook2 --paper=a4paper -s --inner-margin=100 spiewnik.pdf 1> /dev/null +redo-ifchange spiewnik.pdf akordy +pdfunite spiewnik.pdf akordy1.pdf akordy2.pdf spiewnik-all.pdf +pdfbook2 --paper=a4paper -s --inner-margin=100 spiewnik-all.pdf 1> /dev/null |