From 1c71b4f0384a4df9dc74cf40e9efcf3d3886c0dc Mon Sep 17 00:00:00 2001 From: Ben Woods Date: Sat, 12 Aug 2017 05:43:46 +0000 Subject: [PATCH] Add new port print/py-stapler Stapler is a pure Python alternative to PDFtk, a tool for manipulating PDF documents from the command line. Like pdftk, stapler is a command-line tool. With the select command, you can cherry-pick pages from pdfs and concatenate them into a new pdf file. The delete command works almost exactly the same as select, but inverse. It uses the pages and ranges which you didn't specify. The split command splits the specified pdf files into their single pages and writes each page into it's own pdf file. With the zip command, you can cherry-pick pages from pdfs (like select). The pages from each pdf are merged together in an interleaving manner. This can be used to collate a pdf with odd pages and a pdf with even pages into a single file. The info command shows information on the metadata stored inside a PDF file. WWW: https://github.com/hellerbarde/stapler --- print/Makefile | 1 + print/py-stapler/Makefile | 23 +++++++++++++++++++++++ print/py-stapler/distinfo | 3 +++ print/py-stapler/pkg-descr | 20 ++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 print/py-stapler/Makefile create mode 100644 print/py-stapler/distinfo create mode 100644 print/py-stapler/pkg-descr diff --git a/print/Makefile b/print/Makefile index ce5be0683681..9d2d751d07f6 100644 --- a/print/Makefile +++ b/print/Makefile @@ -201,6 +201,7 @@ SUBDIR += py-reportlab SUBDIR += py-reportlab1 SUBDIR += py-rtf + SUBDIR += py-stapler SUBDIR += py-trml2pdf SUBDIR += py3-fonttools SUBDIR += py3-pycups diff --git a/print/py-stapler/Makefile b/print/py-stapler/Makefile new file mode 100644 index 000000000000..9ad5b0c7bd0f --- /dev/null +++ b/print/py-stapler/Makefile @@ -0,0 +1,23 @@ +# Created by: Ben Woods +# $FreeBSD$ + +PORTNAME= stapler +PORTVERSION= 0.3.3 +CATEGORIES= print python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +#DISTNAME= PyPDF2-${PORTVERSION} + +MAINTAINER= woodsb02@FreeBSD.org +COMMENT= Manipulate PDF documents from the command line + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}more-itertools>=2.2:devel/py-more-itertools \ + ${PYTHON_PKGNAMEPREFIX}pdf2>=1.24:print/py-pdf2 + +USES= python:2.7+ +USE_PYTHON= autoplist distutils + +.include diff --git a/print/py-stapler/distinfo b/print/py-stapler/distinfo new file mode 100644 index 000000000000..4519ebd3fbd0 --- /dev/null +++ b/print/py-stapler/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1502515886 +SHA256 (stapler-0.3.3.tar.gz) = 326d2eeb2556e98162d1c2671f944deb912f757469cf0316de121a25d16a6e4a +SIZE (stapler-0.3.3.tar.gz) = 8130 diff --git a/print/py-stapler/pkg-descr b/print/py-stapler/pkg-descr new file mode 100644 index 000000000000..320b6c83d275 --- /dev/null +++ b/print/py-stapler/pkg-descr @@ -0,0 +1,20 @@ +Stapler is a pure Python alternative to PDFtk, a tool for manipulating PDF +documents from the command line. Like pdftk, stapler is a command-line tool. + +With the select command, you can cherry-pick pages from pdfs and concatenate +them into a new pdf file. + +The delete command works almost exactly the same as select, but inverse. +It uses the pages and ranges which you didn't specify. + +The split command splits the specified pdf files into their single pages and +writes each page into it's own pdf file. + +With the zip command, you can cherry-pick pages from pdfs (like select). +The pages from each pdf are merged together in an interleaving manner. +This can be used to collate a pdf with odd pages and a pdf with even pages +into a single file. + +The info command shows information on the metadata stored inside a PDF file. + +WWW: https://github.com/hellerbarde/stapler