diff options
| author | pinoaffe <pinoaffe@gmail.com> | 2025-08-28 15:26:23 +0200 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-01-12 22:42:10 +0100 |
| commit | 4aef912f826f8fb773d9f5ba3ff4d1bed2ca337f (patch) | |
| tree | d3aea9b4d0dbb5bd9f06f6f966bdfef21bac3d4c /gnu | |
| parent | 9df4ee0e6bfc9643813f436b90b5dbb509387a49 (diff) | |
gnu: Add pdf-tocgen.
* gnu/packages/pdf.scm (pdf-tocgen): New variable.
Change-Id: Icf78f177e87d35de00d5c4a50224dcc1a7a9273a
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/pdf.scm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 64e77c270ae..431b57021e5 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm | |||
| @@ -101,6 +101,7 @@ | |||
| 101 | #:use-module (gnu packages nss) | 101 | #:use-module (gnu packages nss) |
| 102 | #:use-module (gnu packages ocaml) | 102 | #:use-module (gnu packages ocaml) |
| 103 | #:use-module (gnu packages ocr) | 103 | #:use-module (gnu packages ocr) |
| 104 | #:use-module (gnu packages package-management) | ||
| 104 | #:use-module (gnu packages pcre) | 105 | #:use-module (gnu packages pcre) |
| 105 | #:use-module (gnu packages perl) | 106 | #:use-module (gnu packages perl) |
| 106 | #:use-module (gnu packages photo) | 107 | #:use-module (gnu packages photo) |
| @@ -1144,6 +1145,58 @@ Open XML Paper Specification}, @acronym{CBZ, Comic Book ZI}P, @acronym{EPUB, | |||
| 1144 | Electronic Publication} and @acronym{FB2, Fiction Book 2} (e-books) format.") | 1145 | Electronic Publication} and @acronym{FB2, Fiction Book 2} (e-books) format.") |
| 1145 | (license license:agpl3))) | 1146 | (license license:agpl3))) |
| 1146 | 1147 | ||
| 1148 | (define-public pdf-tocgen | ||
| 1149 | (package | ||
| 1150 | (name "pdf-tocgen") | ||
| 1151 | (version "1.3.4") | ||
| 1152 | (source | ||
| 1153 | (origin | ||
| 1154 | (method git-fetch) | ||
| 1155 | (uri (git-reference | ||
| 1156 | (url "https://github.com/Krasjet/pdf.tocgen") | ||
| 1157 | (commit (string-append "v" version)))) | ||
| 1158 | (file-name (git-file-name name version)) | ||
| 1159 | (sha256 | ||
| 1160 | (base32 "0sqqnrw6zw2awcf9g6v66fm9nnrv2xm3l5ql1liq9skilkjkgkx3")))) | ||
| 1161 | (build-system pyproject-build-system) | ||
| 1162 | (arguments | ||
| 1163 | (list | ||
| 1164 | ;; A required file is missing, seemingly causing the test suite to fail, | ||
| 1165 | ;; see https://github.com/Krasjet/pdf.tocgen/issues/41 | ||
| 1166 | #:tests? #f | ||
| 1167 | #:phases #~(modify-phases %standard-phases | ||
| 1168 | (add-after 'unpack 'patch-tests | ||
| 1169 | ;; The test suite wants to run all commands with poetry, | ||
| 1170 | ;; this is superfluous and causes errors, so we disable that. | ||
| 1171 | (lambda _ | ||
| 1172 | (substitute* "Makefile" | ||
| 1173 | (("@poetry run ") "")))) | ||
| 1174 | (replace 'check | ||
| 1175 | (lambda* (#:key tests? #:allow-other-keys) | ||
| 1176 | (when tests? | ||
| 1177 | (invoke "make" "test"))))))) | ||
| 1178 | (native-inputs (list poetry | ||
| 1179 | python-poetry-core | ||
| 1180 | python-mamba | ||
| 1181 | python-pylint)) | ||
| 1182 | (propagated-inputs (list | ||
| 1183 | python-chardet | ||
| 1184 | python-jedi | ||
| 1185 | python-pymupdf | ||
| 1186 | python-toml)) | ||
| 1187 | (home-page "https://krasjet.com/voice/pdf.tocgen/") | ||
| 1188 | (synopsis "Automatically generate table of contents for pdf files") | ||
| 1189 | (description "pdf.tocgen is a set of command-line tools for automatically | ||
| 1190 | extracting and generating the table of contents of a PDF file. It uses | ||
| 1191 | the embedded font attributes and position of headings to deduce the basic | ||
| 1192 | outline of a PDF file. | ||
| 1193 | |||
| 1194 | It works best for PDF files produced from a TeX document, but it's designed to | ||
| 1195 | work with any software-generated PDF files (i.e. you shouldn't expect it to | ||
| 1196 | work with scanned PDFs). Some examples include troff/groff, Adobe InDesign, | ||
| 1197 | LibreOffice Writer, and probably more.") | ||
| 1198 | (license license:gpl3+))) | ||
| 1199 | |||
| 1147 | (define-public qpdf | 1200 | (define-public qpdf |
| 1148 | (package | 1201 | (package |
| 1149 | (name "qpdf") | 1202 | (name "qpdf") |
