diff mbox

[3/3] gnu: Add pdfposter.

Message ID 1478641022-30723-3-git-send-email-h.goebel@crazy-compilers.com
State New
Headers show

Commit Message

Hartmut Goebel Nov. 8, 2016, 9:37 p.m. UTC
* gnu/packages/pdf.scm(pdfposter): New variable.
---
 gnu/packages/pdf.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

Comments

Leo Famulari Nov. 9, 2016, 12:02 a.m. UTC | #1
On Tue, Nov 08, 2016 at 10:37:02PM +0100, Hartmut Goebel wrote:
> * gnu/packages/pdf.scm(pdfposter): New variable.

I see you are the author of this software :)

https://gitlab.com/pdftools/pdfposter/blob/develop/README.txt#L11

> +              (uri (string-append "https://pypi.python.org/packages/source/p"
> +                                  "/pdftools.pdfposter/"
> +                                  "pdftools.pdfposter-" version ".tar.bz2"))
> +              ;(uri (pypi-uri "pdftools.pdfposter" version))

Can we use pypi-uri? It takes an optional extension argument that might
be required in this case.

> +    (arguments
> +     `(#:tests? #f  ; no tests

How about these files:

https://gitlab.com/pdftools/pdfposter/tree/develop/test
Hartmut Goebel Nov. 9, 2016, 10:19 p.m. UTC | #2
Am 09.11.2016 um 01:02 schrieb Leo Famulari:
> I see you are the author of this software :)
:-)
> Can we use pypi-uri? It takes an optional extension argument that might
> be required in this case.

This did the trick. Thanks.

> How about these files:
> https://gitlab.com/pdftools/pdfposter/tree/develop/test

These are only for visual control, not a test-suite.
diff mbox

Patch

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index ca3f830..eed37d6 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -855,3 +855,38 @@  of:
 Note: This module isn't maintained anymore.  For new projects please use
 python-pypdf2 instead.")
     (license license:bsd-3)))
+
+(define-public pdfposter
+  (package
+    (name "pdfposter")
+    (version "0.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://pypi.python.org/packages/source/p"
+                                  "/pdftools.pdfposter/"
+                                  "pdftools.pdfposter-" version ".tar.bz2"))
+              ;(uri (pypi-uri "pdftools.pdfposter" version))
+              (sha256
+               (base32
+                "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f  ; no tests
+       #:python ,python-2))
+    (inputs
+     ;; pdfposter 0.6.0 still uses the old pyPdf
+     `(("python2-pypdf" ,python2-pypdf)))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))
+    (home-page "https://pythonhosted.org/pdftools.pdfposter/")
+    (synopsis "Scale and tile PDF images/pages to print on multiple pages")
+    (description " @command{pdfposter} can be used to create a large poster by
+building it from multple pages and/or printing it on large media.  It expects
+as input a PDF file, normally printing on a single page.  The output is again
+a PDF file, maybe containing multiple pages together building the poster.  The
+input page will be scaled to obtain the desired size.
+
+This is much like @command{poster} does for Postscript files, but working with
+PDF. Since sometimes @command{poster} does not like your files converted from
+PDF. :-) Indeed @command{pdfposter} was inspired by @command{poster}.")
+    (license license:gpl3+)))