[PATCH] gnu: Add stapler.

  • Done
  • quality assurance status badge
Details
2 participants
  • Arun Isaac
  • Ludovic Courtès
Owner
unassigned
Submitted by
Arun Isaac
Severity
normal
A
A
Arun Isaac wrote on 9 Sep 2019 17:01
(address . guix-patches@gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
20190909150100.20014-1-arunisaac@systemreboot.net
* gnu/packages/pdf.scm (stapler): New variable.
---
gnu/packages/pdf.scm | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)

Toggle diff (53 lines)
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index d45a78222c..af915422de 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2016, 2019 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com>
@@ -1116,3 +1116,37 @@ presentation. The input files processed by pdfpc are PDF documents.")
rendering of the file. The rendering is done by creating outline curves
through the Pango @code{ft2} backend.")
(license license:lgpl2.0+))))
+
+(define-public stapler
+ (package
+ (name "stapler")
+ (version "0.3.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hellerbarde/stapler")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "06w7xanzr7cicqik62g7zqs57j4y6fc7hflrc1rlmphxx40hkg6r"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python2-pypdf2" ,python2-pypdf2)))
+ (arguments
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-pypdf-version-requirement
+ ;; A PyPDF2 version requirement of 1.25.1 is hard-coded in
+ ;; setup.py. Relax it to work with any version of PyPDF2.
+ (lambda _
+ (substitute* "setup.py"
+ (("PyPDF2==1.25.1") "PyPDF2"))
+ #t)))))
+ (home-page "https://github.com/hellerbarde/stapler")
+ (synopsis "PDF manipulation tool")
+ (description "Stapler is a pure Python alternative to PDFtk, a tool for
+manipulating PDF documents from the command line.")
+ (license license:bsd-3)))
--
2.23.0
L
L
Ludovic Courtès wrote on 26 Sep 2019 11:40
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 37356@debbugs.gnu.org)
877e5vpf8u.fsf@gnu.org
Hello,

Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/pdf.scm (stapler): New variable.

[...]

Toggle quote (5 lines)
> + (synopsis "PDF manipulation tool")
> + (description "Stapler is a pure Python alternative to PDFtk, a tool for
> +manipulating PDF documents from the command line.")

Perhaps add a few words on the kind of PDF manipulations it supports.

Otherwise LGTM, thanks!

Ludo’.
A
A
Arun Isaac wrote on 28 Sep 2019 08:51
Re: [PATCH] gnu: Add stapler.
(address . 37356-done@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
cu7r240kj68.fsf@systemreboot.net
Thanks for the review! I added a complete list of features to the
description and pushed to master.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl2PAvEACgkQLiXui2GA
K7OdRgf+LxS5THXxI36jL2Cc1ucnI/Vl25EJ9TPzbVFBdvgpeuNwBCAA0TPr5FPp
QY+MC3uWzLnbjXdHke+nx8psuxJS+17+dIhlnaz+5510LDCwYBmsvy0n4mDizsWK
1vwBQ1Hxp6yPjpRIJMWDi4Pa/sl2qNHjHoJHsTTjkQarKwxpuvb39pPHnA6GbA1o
Ev1osOyzv/rupUpCbSebRQLdicZh6ArLubY4H8NH1FPYOGKwt6cMn3AGSQgRtY/j
Tpq3B8Fby5+iyMXAmD4FJv5f27IH0SJGg8xDVKKdxNvsnU0cxSXr0kvDLwKgnnq5
o3OL9ijKsb6pbaVGvtUM8xVtsOylNA==
=vRU/
-----END PGP SIGNATURE-----

Closed
?