gnu: Remove ".git" from "https://github/…/….git".
[jackhill/guix/guix.git] / gnu / packages / textutils.scm
CommitLineData
7939e70a
TUBK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
0ad0ecee 3;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
a64a8c46 4;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
e522d840 5;;; Copyright © 2015 Roel Janssen <roel@gnu.org>
2d8cf0b3 6;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
f17a5447 7;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
30024a1e 8;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
3c986a7d 9;;; Copyright © 2016 Nikita <nikita@n0.is>
07d6003b 10;;; Copyright © 2016, 2020 Marius Bakke <marius@gnu.org>
5353cea0 11;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
7fdca77e 12;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
7577ab55 13;;; Copyright © 2017,2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
3c8ba11a 14;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
bfcdf887 15;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
9a71213e 16;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4715f92e 17;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
1a0363cf 18;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
933ac939 19;;; Copyright © 2019 Yoshinori Arai <kumagusu08@gmail.com>
f9488b70 20;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
24719e8a 21;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
7f05493d 22;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
7939e70a
TUBK
23;;;
24;;; This file is part of GNU Guix.
25;;;
26;;; GNU Guix is free software; you can redistribute it and/or modify it
27;;; under the terms of the GNU General Public License as published by
28;;; the Free Software Foundation; either version 3 of the License, or (at
29;;; your option) any later version.
30;;;
31;;; GNU Guix is distributed in the hope that it will be useful, but
32;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34;;; GNU General Public License for more details.
35;;;
36;;; You should have received a copy of the GNU General Public License
37;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38
39(define-module (gnu packages textutils)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix packages)
42 #:use-module (guix download)
43 #:use-module (guix git-download)
ff3f6766 44 #:use-module (guix build-system ant)
7939e70a 45 #:use-module (guix build-system gnu)
03f801aa 46 #:use-module (guix build-system go)
c8d969b5 47 #:use-module (guix build-system cmake)
03639d03 48 #:use-module (guix build-system python)
9116f126 49 #:use-module (gnu packages)
f571e1c3 50 #:use-module (gnu packages autotools)
a6baae74 51 #:use-module (gnu packages base)
148585c2 52 #:use-module (gnu packages compression)
f9488b70 53 #:use-module (gnu packages gcc)
2f6e988d 54 #:use-module (gnu packages gettext)
ff3f6766 55 #:use-module (gnu packages java)
8888fe82 56 #:use-module (gnu packages ncurses)
7f05493d 57 #:use-module (gnu packages pcre)
8888fe82 58 #:use-module (gnu packages perl)
59 #:use-module (gnu packages pkg-config)
f17a5447 60 #:use-module (gnu packages python)
44d10b1f 61 #:use-module (gnu packages python-xyz)
8888fe82 62 #:use-module (gnu packages readline)
1506d491
EF
63 #:use-module (gnu packages slang)
64 #:use-module (gnu packages web))
7939e70a 65
2f6e988d
KK
66(define-public dos2unix
67 (package
68 (name "dos2unix")
ac95bd97 69 (version "7.4.1")
2f6e988d
KK
70 (source
71 (origin
72 (method url-fetch)
96b96ec6
TGR
73 (uri (string-append "https://waterlan.home.xs4all.nl/dos2unix/"
74 "dos2unix-" version ".tar.gz"))
2f6e988d 75 (sha256
ac95bd97 76 (base32 "08w6yywzirsxq8bh87jycvvw922ybhc2l426j2iqzliyn1h8mm8w"))))
2f6e988d
KK
77 (build-system gnu-build-system)
78 (arguments
79 '(#:make-flags (list "CC=gcc"
80 (string-append "prefix=" (assoc-ref %outputs "out")))
81 #:phases
82 (modify-phases %standard-phases
83 (delete 'configure)))) ; no configure script
84 (native-inputs
85 `(("gettext" ,gettext-minimal)
86 ("perl" ,perl)))
87 (home-page "https://waterlan.home.xs4all.nl/dos2unix.html")
88 (synopsis "DOS/Mac to Unix and vice versa text file format converter")
89 (description
90 "dos2unix is a tool to convert line breaks in a text file from Unix format
91to DOS format and vice versa.")
92 (license license:bsd-2)))
93
7939e70a
TUBK
94(define-public recode
95 (package
96 (name "recode")
f4a1de00 97 (version "3.7.6")
7939e70a
TUBK
98 (source
99 (origin
20a792b5
EF
100 (method url-fetch)
101 (uri (string-append "https://github.com/rrthomas/recode/releases/"
6f2f7bc8 102 "download/v" version "/recode-" version ".tar.gz"))
7939e70a 103 (sha256
f4a1de00 104 (base32 "0m59sd1ca0zw1aydpc3m8sw03nc885knmccqryg7byzmqs585ia6"))))
7939e70a 105 (build-system gnu-build-system)
20a792b5 106 (native-inputs
5ca1900b
TGR
107 `(("python" ,python)
108 ("python-cython" ,python-cython)))
20a792b5 109 (home-page "https://github.com/rrthomas/recode")
7939e70a
TUBK
110 (synopsis "Text encoding converter")
111 (description "The Recode library converts files between character sets and
112usages. It recognises or produces over 200 different character sets (or about
113300 if combined with an iconv library) and transliterates files between almost
114any pair. When exact transliteration are not possible, it gets rid of
115offending characters or falls back on approximations. The recode program is a
116handy front-end to the library.")
20a792b5 117 (license license:gpl3+)))
688fe865
TUBK
118
119(define-public enca
120 (package
121 (name "enca")
1462b456 122 (version "1.19")
688fe865
TUBK
123 (source
124 (origin
30024a1e
EF
125 (method git-fetch)
126 (uri (git-reference
127 (url "https://github.com/nijel/enca")
128 (commit version)))
129 (file-name (git-file-name name version))
688fe865 130 (sha256
30024a1e 131 (base32 "19q7cwwxmmk5j9438bsqdpjvdjawsd3zmw1zyqgi7s4m0rasr3ah"))))
688fe865 132 (build-system gnu-build-system)
1462b456
EF
133 ;; enca-1.19 tests fail with recent recode.
134 ;(inputs `(("recode" ,recode)))
688fe865
TUBK
135 (home-page "https://github.com/nijel/enca")
136 (synopsis "Text encoding detection tool")
137 (description "Enca (Extremely Naive Charset Analyser) consists of libenca,
138an encoding detection library, and enca, a command line frontend, integrating
139libenca and several charset conversion libraries and tools.")
140 (license license:gpl2)))
cd15ad82
RW
141
142(define-public utf8proc
143 (package
144 (name "utf8proc")
cbae2049 145 (version "2.5.0")
cd15ad82
RW
146 (source
147 (origin
39ff1d89
MB
148 (method git-fetch)
149 (uri (git-reference
150 (url "https://github.com/JuliaStrings/utf8proc")
151 (commit (string-append "v" version))))
152 (file-name (git-file-name name version))
cd15ad82 153 (sha256
cbae2049 154 (base32 "1xlkazhdnja4lksn5c9nf4bln5gjqa35a8gwlam5r0728w0h83qq"))))
cd15ad82 155 (build-system gnu-build-system)
63f2de03 156 (native-inputs
cbae2049 157 (let ((UNICODE_VERSION "13.0.0")) ; defined in data/Makefile
63f2de03
TGR
158 ;; Test data that is otherwise downloaded with curl.
159 `(("NormalizationTest.txt"
160 ,(origin
161 (method url-fetch)
162 (uri (string-append "https://www.unicode.org/Public/"
163 UNICODE_VERSION "/ucd/NormalizationTest.txt"))
164 (sha256
cbae2049 165 (base32 "07g0ya4f6zfzvpp24ccxkb2yq568kh83gls85rjl950nv5fya3nn"))))
63f2de03
TGR
166 ("GraphemeBreakTest.txt"
167 ,(origin
168 (method url-fetch)
169 (uri (string-append "https://www.unicode.org/Public/"
170 UNICODE_VERSION
171 "/ucd/auxiliary/GraphemeBreakTest.txt"))
172 (sha256
cbae2049 173 (base32 "07f8rrvcsq4pibdz6zxggxy8w7zjjqyw2ggclqlhalyv45yv7prj"))))
99293380 174
63f2de03
TGR
175 ;; For tests.
176 ("perl" ,perl))))
cd15ad82 177 (arguments
5353cea0 178 '(#:make-flags (list "CC=gcc"
f1e3a8ae 179 (string-append "prefix=" (assoc-ref %outputs "out")))
cd15ad82 180 #:phases
f1e3a8ae 181 (modify-phases %standard-phases
5353cea0
EB
182 (delete 'configure)
183 (add-before 'check 'check-data
184 (lambda* (#:key inputs #:allow-other-keys)
185 (for-each (lambda (i)
186 (copy-file (assoc-ref inputs i)
187 (string-append "data/" i)))
188 '("NormalizationTest.txt" "GraphemeBreakTest.txt"))
189 (substitute* "data/GraphemeBreakTest.txt"
190 (("÷") "/")
99293380
MB
191 (("×") "+"))
192 #t)))))
22cc598b 193 (home-page "https://juliastrings.github.io/utf8proc/")
cd15ad82
RW
194 (synopsis "C library for processing UTF-8 Unicode data")
195 (description "utf8proc is a small C library that provides Unicode
196normalization, case-folding, and other operations for data in the UTF-8
9b72ce60 197encoding, supporting Unicode version 9.0.0.")
cd15ad82 198 (license license:expat)))
f571e1c3 199
205df739
TGR
200(define-public libconfuse
201 (package
202 (name "libconfuse")
07d6003b 203 (version "3.3")
205df739
TGR
204 (source
205 (origin
206 (method url-fetch)
207 (uri (string-append "https://github.com/martinh/libconfuse/"
208 "releases/download/v" version
209 "/confuse-" version ".tar.xz"))
210 (sha256
07d6003b 211 (base32 "043hqqykpprgrkw9s2hbdlxr308a7yxwsgxj4m8aadg1401hmm8x"))))
205df739 212 (build-system gnu-build-system)
e36c4d0b
MB
213 (arguments
214 '(#:configure-flags '("--disable-static")))
205df739
TGR
215 (home-page "https://github.com/martinh/libconfuse")
216 (synopsis "Configuration file parser library")
217 (description "libconfuse is a configuration file parser library. It
218supports sections and (lists of) values (strings, integers, floats, booleans
219or other sections), as well as some other features (such as
220single/double-quoted strings, environment variable expansion, functions and
221nested include statements).")
222 (license license:isc)))
223
f571e1c3
RW
224(define-public libgtextutils
225 (package
226 (name "libgtextutils")
227 (version "0.7")
228 (source
229 (origin
230 (method url-fetch)
231 (uri (string-append
232 "https://github.com/agordon/libgtextutils/releases/download/"
233 version "/libgtextutils-" version ".tar.gz"))
234 (sha256
235 (base32 "0jiybkb2z58wa2msvllnphr4js2hvjvh988pavb3mzkgr6ihwbkr"))))
236 (build-system gnu-build-system)
e005ddc2
EF
237 (arguments
238 '(#:phases
239 (modify-phases %standard-phases
240 (replace 'bootstrap
241 (lambda _ (invoke "sh" "reconf"))))))
f571e1c3
RW
242 (native-inputs
243 `(("autoconf" ,autoconf)
244 ("automake" ,automake)
f9488b70 245 ("gcc" ,gcc-5) ;; doesn't build with later versions
f571e1c3
RW
246 ("libtool" ,libtool)))
247 (home-page "https://github.com/agordon/libgtextutils")
248 (synopsis "Gordon's text utils library")
249 (description
250 "libgtextutils is a text utilities library used by the fastx toolkit from
251the Hannon Lab.")
252 (license license:agpl3+)))
aae2b445
BW
253
254(define-public cityhash
a64a8c46 255 (let ((commit "8af9b8c"))
aae2b445
BW
256 (package
257 (name "cityhash")
a64a8c46 258 (version (string-append "1.1-2." commit))
aae2b445
BW
259 (source (origin
260 (method git-fetch)
261 (uri (git-reference
b0e7b699 262 (url "https://github.com/google/cityhash")
aae2b445
BW
263 (commit commit)))
264 (file-name (string-append name "-" version ".tar.gz"))
265 (sha256
266 (base32
267 "0n6skf5dv8yfl1ckax8dqhvsbslkwc9158zf2ims0xqdvzsahbi6"))))
a64a8c46
BW
268 (build-system gnu-build-system)
269 (arguments
270 '(#:make-flags (list "CXXFLAGS=-g -O3")
271 #:phases
272 (modify-phases %standard-phases
273 ;; citycrc is not installed by default but is used by some
274 ;; programs.
275 (add-after 'install 'install-citycrc
276 (lambda* (#:key outputs #:allow-other-keys)
277 (let* ((out (assoc-ref outputs "out"))
278 (include (string-append out "/include")))
279 (install-file "src/citycrc.h" include))
280 #t)))))
281 (home-page "https://github.com/google/cityhash")
282 (synopsis "C++ hash functions for strings")
283 (description
284 "CityHash provides hash functions for strings. The functions mix the
aae2b445 285input bits thoroughly but are not suitable for cryptography.")
a64a8c46 286 (license license:expat))))
e522d840 287
9128db21
RW
288(define-public ustr
289 (package
290 (name "ustr")
291 (version "1.0.4")
292 (source (origin
293 (method url-fetch)
294 (uri (string-append "http://www.and.org/ustr/" version
295 "/ustr-" version ".tar.bz2"))
296 (sha256
297 (base32
7fdca77e
RS
298 "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx"))
299 (patches (search-patches "ustr-fix-build-with-gcc-5.patch"))))
9128db21
RW
300 (build-system gnu-build-system)
301 (arguments
302 `(#:make-flags
303 (list "CC=gcc"
304 "HIDE="
305 ;; Override "/sbin/ldconfig" with "echo" because we don't need
306 ;; "ldconfig".
307 "LDCONFIG=echo"
308 (string-append "prefix=" (assoc-ref %outputs "out"))
309 "all-shared")
310 #:phases
311 (modify-phases %standard-phases
312 (add-after 'unpack 'disable-check-for-stdint
313 (lambda _
314 ;; Of course we have stdint.h, just not in /usr/include
315 (substitute* '("Makefile"
316 "ustr-import.in")
317 (("-f \"/usr/include/stdint.h\"") "-z \"\""))
318 #t))
319 ;; No configure script
320 (delete 'configure))))
321 (home-page "http://www.and.org/ustr/")
322 (synopsis "String library with very low memory overhead")
323 (description
324 "Ustr is a string library for C with very low memory overhead.")
325 ;; Quoted from the home page: "The License for the code is MIT, new-BSD,
326 ;; LGPL, etc. ... if you need another license to help compatibility, just
327 ;; ask for it. It's basically public domain, without all the legal
328 ;; problems for everyone that trying to make something public domain
329 ;; entails."
330 (license license:public-domain)))
331
7577ab55
HG
332(define-public ascii2binary
333 (package
334 (name "ascii2binary")
335 (version "2.14")
336 (source
337 (origin
338 (method url-fetch)
339 (uri (string-append "http://billposer.org/Software/Downloads/"
340 "ascii2binary-" version ".tar.bz2"))
341 (sha256
342 (base32 "0dc9fxcdmppbs9s06jvq61zbk552laxps0xyk098gj41697ihd96"))))
343 (build-system gnu-build-system)
344 (native-inputs
345 `(("gettext" ,gettext-minimal)))
346 (home-page "https://billposer.org/Software/a2b.html")
347 (synopsis "Convert between ASCII, hexadecimal and binary representations")
348 (description "The two programs are useful for generating test data, for
349inspecting binary files, and for interfacing programs that generate textual
350output to programs that require binary input and conversely. They can also be
351useful when it is desired to reformat numbers.
352
353@itemize
354
355@item @command{ascii2binary} reads input consisting of ascii or hexadecimal
356 representation numbers separated by whitespace and produces as output
357 the binary equivalents. The type and precision of the binary output
358 is selected using command line flags.
359
360@item @command{binary2ascii} reads input consisting of binary numbers
361 and converts them to their ascii or hexadecimal representation.
362 Command line flags specify the type and size of the binary numbers
363 and provide control over the format of the output.
364 Unsigned integers may be written out in binary, octal, decimal,
365 or hexadecimal.
366
367 Signed integers may be written out only in binary or decimal. Floating
368 point numbers may be written out only decimal, either in standard or
369 scientific notation. (If you want to examine the binary representation
370 of floating point numbers, just treat the input as a sequence of unsigned
371 characters.)
372
a6baae74
HG
373@end itemize")
374 (license license:gpl3)))
375
376(define-public uniutils
377 (package
378 (name "uniutils")
379 (version "2.27")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (string-append "http://billposer.org/Software/Downloads/"
384 "uniutils-" version ".tar.bz2"))
385 (sha256
386 (base32 "19w1510w87gx7n4qy3zsb0m467a4rn5scvh4ajajg7jh6x5xri08"))))
387 (build-system gnu-build-system)
388 (arguments
389 '(#:configure-flags '("--disable-dependency-tracking")
390 #:phases
391 (modify-phases %standard-phases
392 (add-after 'build 'fix-paths
393 (lambda* (#:key outputs inputs #:allow-other-keys)
394 (let ((out (assoc-ref outputs "out"))
395 (a2b (assoc-ref inputs "ascii2binary"))
396 (iconv (assoc-ref inputs "libiconv")))
397 (substitute* "utf8lookup"
398 (("^ascii2binary ") (string-append a2b "/bin/ascii2binary "))
399 (("^uniname ") (string-append out "/bin/uniname "))
400 (("^iconv ") (string-append iconv "/bin/iconv ")))
401 #t))))))
402 (inputs
403 `(("ascii2binary" ,ascii2binary)
404 ("libiconv" ,libiconv)))
405 (home-page "https://billposer.org/Software/unidesc.html")
406 (synopsis "Find out what is in a Unicode file")
407 (description "Useful tools when working with Unicode files when one
408doesn't know the writing system, doesn't have the necessary font, needs to
409inspect invisible characters, needs to find out whether characters have been
410combined or in what order they occur, or needs statistics on which characters
411occur.
412
413@itemize
414
415@item @command{uniname} defaults to printing the character offset of each
416character, its byte offset, its hex code value, its encoding, the glyph
417itself, and its name. It may also be used to validate UTF-8 input.
418
419@item @command{unidesc} reports the character ranges to which different
420portions of the text belong. It can also be used to identify Unicode encodings
421(e.g. UTF-16be) flagged by magic numbers.
422
423@item @command{unihist} generates a histogram of the characters in its input.
424
425@item @command{ExplicateUTF8} is intended for debugging or for learning about
426Unicode. It determines and explains the validity of a sequence of bytes as a
427UTF8 encoding.
428
429@item @command{utf8lookup} provides a handy way to look up Unicode characters
430from the command line.
431
432@item @command{unireverse} reverse each line of UTF-8 input
433character-by-character.
434
7577ab55
HG
435@end itemize")
436 (license license:gpl3)))
437
e522d840
RJ
438(define-public libconfig
439 (package
440 (name "libconfig")
1b362016
MB
441 (version "1.7.2")
442 (home-page "https://hyperrealm.github.io/libconfig/")
e522d840
RJ
443 (source (origin
444 (method url-fetch)
1b362016
MB
445 (uri (string-append home-page "/dist/libconfig-"
446 version ".tar.gz"))
e522d840
RJ
447 (sha256
448 (base32
1b362016 449 "1ngs2qx3cx5cbwinc5mvadly0b5n7s86zsc68c404czzfff7lg3w"))))
e522d840 450 (build-system gnu-build-system)
e522d840
RJ
451 (synopsis "C/C++ configuration file library")
452 (description
453 "Libconfig is a simple library for manipulating structured configuration
454files. This file format is more compact and more readable than XML. And
455unlike XML, it is type-aware, so it is not necessary to do string parsing in
456application code.")
457 (license license:lgpl2.1+)))
c8d969b5
PP
458
459(define-public pfff
460 (package
461 (name "pfff")
462 (version "1.0")
463 (source (origin
bc117787
EF
464 (method git-fetch)
465 (uri (git-reference
466 (url "https://github.com/pfff/pfff")
467 (commit (string-append "v" version))))
468 (file-name (git-file-name name version))
c8d969b5
PP
469 (sha256
470 (base32
bc117787 471 "1nxkfm7zliq3rmr7yp871sppwfnz71iz364m2sgazny71pzykggc"))))
c8d969b5 472 (build-system cmake-build-system)
86bbfc50 473 (home-page "https://biit.cs.ut.ee/pfff/")
c8d969b5
PP
474 (synopsis "Probabilistic fast file fingerprinting tool")
475 (description
476 "pfff is a tool for calculating a compact digital fingerprint of a file
477by sampling randomly from the file instead of reading it in full.
478Consequently, the computation has a flat performance characteristic,
479correlated with data variation rather than file size. pfff can be as reliable
480as existing hashing techniques, with provably negligible risk of collisions.")
481 (license license:bsd-3)))
2d8cf0b3
JL
482
483(define-public oniguruma
484 (package
485 (name "oniguruma")
7eb823c6 486 (version "6.9.5-rev1")
2d8cf0b3
JL
487 (source (origin
488 (method url-fetch)
489 (uri (string-append "https://github.com/kkos/"
7eb823c6
MB
490 "oniguruma/releases/download/v"
491 ;; If there is a "-" in the version, convert
492 ;; to underscore for this part of the URI.
493 (string-map (lambda (c) (if (char=? #\- c) #\_ c))
494 version)
2d8cf0b3
JL
495 "/onig-" version ".tar.gz"))
496 (sha256
497 (base32
7eb823c6 498 "17m92k1n6bvza6m35fpd5g36zwpwm3hfz3478iwj5bvj2sfq8g6k"))))
2d8cf0b3 499 (build-system gnu-build-system)
28b55a51 500 (arguments '(#:configure-flags '("--disable-static")))
2d8cf0b3
JL
501 (home-page "https://github.com/kkos/oniguruma")
502 (synopsis "Regular expression library")
503 (description "Oniguruma is a regular expressions library. The special
504characteristic of this library is that different character encoding for every
505regular expression object can be specified.")
506 (license license:bsd-2)))
1b90e57e
RW
507
508(define-public antiword
509 (package
510 (name "antiword")
511 (version "0.37")
512 (source (origin
513 (method url-fetch)
514 (uri (string-append "http://www.winfield.demon.nl/linux"
515 "/antiword-" version ".tar.gz"))
516 (sha256
517 (base32
9116f126
EF
518 "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f"))
519 (patches (search-patches "antiword-CVE-2014-8123.patch"))))
1b90e57e
RW
520 (build-system gnu-build-system)
521 (arguments
522 `(#:tests? #f ; There are no tests
523 #:make-flags
524 (list "-f" "Makefile.Linux"
525 (string-append "GLOBAL_INSTALL_DIR="
526 (assoc-ref %outputs "out") "/bin")
527 (string-append "GLOBAL_RESOURCES_DIR="
528 (assoc-ref %outputs "out") "/share/antiword"))
529 #:phases
530 (modify-phases %standard-phases
b28e05d4
RW
531 (replace 'configure
532 (lambda* (#:key outputs #:allow-other-keys)
533 ;; Ensure that mapping files can be found in the actual package
534 ;; data directory.
535 (substitute* "antiword.h"
536 (("/usr/share/antiword")
537 (string-append (assoc-ref outputs "out") "/share/antiword")))
538 #t))
1b90e57e
RW
539 (replace 'install
540 (lambda* (#:key make-flags #:allow-other-keys)
0ad0ecee 541 (apply invoke "make" `("global_install" ,@make-flags)))))))
1b90e57e
RW
542 (home-page "http://www.winfield.demon.nl/")
543 (synopsis "Microsoft Word document reader")
544 (description "Antiword is an application for displaying Microsoft Word
545documents. It can also convert the document to PostScript or XML. Only
546documents made by MS Word version 2 and version 6 or later are supported. The
547name comes from: \"The antidote against people who send Microsoft Word files
548to everybody, because they believe that everybody runs Windows and therefore
549runs Word\".")
550 (license license:gpl2+)))
f17a5447 551
d0abaf89
HG
552(define-public catdoc
553 (package
554 (name "catdoc")
555 (version "0.95")
556 (source (origin
557 (method url-fetch)
558 (uri (string-append "http://ftp.wagner.pp.ru/pub/catdoc/"
559 "catdoc-" version ".tar.gz"))
bfcdf887 560 (patches (search-patches "catdoc-CVE-2017-11110.patch"))
d0abaf89
HG
561 (sha256
562 (base32
563 "15h7v3bmwfk4z8r78xs5ih6vd0pskn0rj90xghvbzdjj0cc88jji"))))
564 (build-system gnu-build-system)
565 ;; TODO: Also build `wordview` which requires `tk` – make a separate
566 ;; package for this.
567 (arguments
568 '(#:tests? #f ; There are no tests
569 #:configure-flags '("--disable-wordview")
570 #:phases
571 (modify-phases %standard-phases
572 (add-before 'install 'fix-install
573 (lambda* (#:key outputs #:allow-other-keys)
574 (let ((out (assoc-ref outputs "out")))
575 (mkdir-p (string-append out "/share/man/man1"))))))))
13607002 576 (home-page "https://www.wagner.pp.ru/~vitus/software/catdoc/")
d0abaf89
HG
577 (synopsis "MS-Word to TeX or plain text converter")
578 (description "@command{catdoc} extracts text from MS-Word files, trying to
579preserve as many special printable characters as possible. It supports
580everything up to Word-97. Also supported are MS Write documents and RTF files.
581
582@command{catdoc} does not preserve complex word formatting, but it can
583translate some non-ASCII characters into TeX escape codes. It's goal is to
584extract plain text and allow you to read it and, probably, reformat with TeX,
585according to TeXnical rules.
586
587This package also provides @command{xls2csv}, which extracts data from Excel
588spreadsheets and outputs it in comma-separated-value format, and
589@command{catppt}, which extracts data from PowerPoint presentations.")
590 (license license:gpl2+)))
591
f17a5447
AG
592(define-public utfcpp
593 (package
594 (name "utfcpp")
f9c84cd4 595 (version "2.3.5")
f17a5447 596 (source (origin
d0f3ccf6
EF
597 (method git-fetch)
598 (uri (git-reference
599 (url "https://github.com/nemtrif/utfcpp")
600 (commit (string-append "v" version))))
601 (file-name (git-file-name name version))
f17a5447
AG
602 (sha256
603 (base32
d0f3ccf6 604 "1gr98d826z6wa58r1s5i7rz7q2x3r31v7zj0pjjlrc7gfxwklr4s"))))
f9c84cd4 605 (build-system cmake-build-system)
f17a5447 606 (arguments
f9c84cd4
TGR
607 `(#:out-of-source? #f
608 #:phases
609 (modify-phases %standard-phases
610 (replace 'install ; no install target
611 (lambda* (#:key outputs #:allow-other-keys)
612 (let* ((out (assoc-ref outputs "out"))
613 (include (string-append out "/include"))
614 (doc (string-append out "/share/doc/" ,name)))
615 (copy-recursively "source" include)
616 (install-file "README.md" doc)
617 #t))))))
f17a5447
AG
618 (home-page "https://github.com/nemtrif/utfcpp")
619 (synopsis "Portable C++ library for handling UTF-8")
620 (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
621in a portable way.")
622 (license license:boost1.0)))
8888fe82 623
624(define-public dbacl
625 (package
626 (name "dbacl")
9a71213e 627 (version "1.14.1")
8888fe82 628 (source
629 (origin
630 (method url-fetch)
9a71213e 631 (uri (string-append "mirror://sourceforge/dbacl/dbacl/" version "/"
50b01dcf 632 "dbacl-" version ".tar.gz"))
8888fe82 633 (sha256
9a71213e
TGR
634 (base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
635 (patches (search-patches "dbacl-include-locale.h.patch"))))
8888fe82 636 (build-system gnu-build-system)
637 (arguments
638 `(#:make-flags
639 (list
640 (string-append "-I" (assoc-ref %build-inputs "slang")
641 "/include/slang")
642 (string-append "-I" (assoc-ref %build-inputs "ncurses")
643 "/include/ncurses"))
644 #:phases
645 (modify-phases %standard-phases
646 (add-after 'unpack 'delete-sample6-and-japanese
647 (lambda _
648 (substitute* "doc/Makefile.am"
649 (("sample6.txt") "")
650 (("japanese.txt") ""))
651 (delete-file "doc/sample6.txt")
652 (delete-file "doc/japanese.txt")
653 (substitute* (list "src/tests/Makefile.am"
654 "src/tests/Makefile.in")
655 (("dbacl-jap.shin") "")
656 (("dbacl-jap.sh") ""))
657 #t))
658 (add-after 'unpack 'delete-test
659 ;; See comments about the license.
660 (lambda _
db317b38
TGR
661 (delete-file "src/tests/dbacl-jap.shin")
662 #t))
8888fe82 663 (add-after 'unpack 'fix-test-files
664 (lambda* (#:key inputs outputs #:allow-other-keys)
665 (let* ((out (assoc-ref outputs "out"))
666 (bin (string-append out "/bin")))
667 (substitute* (find-files "src/tests/" "\\.shin$")
668 (("PATH=/bin:/usr/bin")
669 "#PATH=/bin:/usr/bin")
670 (("diff") (string-append (which "diff")))
671 (("tr") (string-append (which "tr"))))
9a71213e
TGR
672 #t)))
673 (replace 'bootstrap
674 (lambda _
675 (invoke "autoreconf" "-vif")
676 #t)))))
8888fe82 677 (inputs
678 `(("ncurses" ,ncurses)
679 ("perl" ,perl)
680 ("readline" ,readline)
681 ("slang" ,slang)))
682 (native-inputs
683 `(("libtool" ,libtool)
684 ("autoconf" ,autoconf)
685 ("automake" ,automake)
686 ("pkg-config" ,pkg-config)))
7314a547 687 (home-page "https://www.lbreyer.com/dbacl.html")
8888fe82 688 (synopsis "Bayesian text and email classifier")
689 (description
690 "dbacl is a fast Bayesian text and email classifier. It builds a variety
691of language models using maximum entropy (minimum divergence) principles, and
692these can then be used to categorize input data automatically among multiple
693categories.")
694 ;; The software is licensed as GPLv3 or later, but
695 ;; includes various sample texts in the doc dir:
696 ;; - sample1.txt, sample3 and sampe5.txt are in the public domain,
697 ;; by Mark Twain.
698 ;; - sample2.txt, sample4.txt are in the public domain, by Aristotle.
699 ;; - sample6.txt is a forwarded email, copyright unknown.
700 ;; Guix does exclude sample6.txt.
701 ;; - japanese.txt is a Japanese unoffical translation of the
702 ;; GNU General Public License, (c) by the Free Software Foundation.
703 ;; Guix excludes this file.
704 (license (list license:gpl3+ license:public-domain))))
0905048a
MB
705
706(define-public dotconf
707 (package
708 (name "dotconf")
709 (version "1.3")
710 (source (origin
08bc7f26
RW
711 (method git-fetch)
712 (uri (git-reference
b0e7b699 713 (url "https://github.com/williamh/dotconf")
08bc7f26
RW
714 (commit (string-append "v" version))))
715 (file-name (git-file-name name version))
0905048a
MB
716 (sha256
717 (base32
08bc7f26 718 "1sc95hw5k2xagpafny0v35filmcn05k1ds5ghkldfpf6xw4hakp7"))))
0905048a 719 (build-system gnu-build-system)
7a52d0e0 720 (arguments `(#:tests? #f)) ; FIXME maketest.sh does not work.
0905048a
MB
721 (native-inputs
722 `(("autoconf" ,autoconf)
723 ("automake" ,automake)
724 ("libtool" ,libtool)))
725 (home-page "https://github.com/williamh/dotconf")
726 (synopsis "Configuration file parser library")
727 (description
728 "C library for creating and parsing configuration files.")
729 (license (list license:lgpl2.1 ; Main distribution.
730 license:asl1.1)))) ; src/readdir.{c,h}
ff3f6766 731
7f05493d
MC
732(define-public drm-tools
733 (package
734 (name "drm-tools")
735 (version "1.1.33")
736 (source (origin
737 (method url-fetch)
738 (uri (string-append "mirror://sourceforge/drmtools/drm_tools-"
739 version ".tar.gz"))
740 (sha256
741 (base32
742 "187zbxw21zcg8gpyc13gxlycfw0n05a6rmqq6im5wr9zk1v1wj80"))))
743 (build-system cmake-build-system)
744 (arguments
745 `(#:tests? #f ;the test suite fails
746 #:phases (modify-phases %standard-phases
747 (add-after 'unpack 'set-install-prefixes
748 (lambda* (#:key outputs #:allow-other-keys)
749 (let* ((out (assoc-ref outputs "out")))
750 (substitute* "CMakeLists.txt"
751 (("tmp/testinstall")
752 (string-drop out 1))
753 (("/man/man1")
754 "/share/man/man1"))
755 #t)))
756 (add-after 'unpack 'adjust-test-paths
757 (lambda _
758 (substitute* '("test_extract_increment.sh"
759 "test_extract_features.sh"
760 "test_extract_features2.sh"
761 "test_dmath.sh")
762 (("\\./extract") "extract")
763 (("\\./dmath") "dmath")
764 (("/usr/local/bin/") "")
765 (("/bin/rm") "rm")
766 (("/bin/cp") "cp"))
767 #t))
768 (delete 'check)
769 ;; The produced binaries are written directly to %output/bin.
770 (delete 'install)
771 (add-after 'build 'check
772 (lambda* (#:key outputs tests? #:allow-other-keys)
773 (when tests?
774 (let* ((out (assoc-ref outputs "out"))
775 (bin (string-append out "/bin")))
776 (setenv "PATH" (string-append bin ":"
777 (getenv "PATH")))
778 (with-directory-excursion
779 (format #f "../drm_tools-~a" ,version)
780 (invoke "sh" "test_all.sh")))))))))
781 (native-inputs `(("which" ,which))) ;for tests
782 (inputs `(("pcre" ,pcre)))
783 (home-page "http://drmtools.sourceforge.net/")
784 (synopsis "Utilities to manipulate text and binary files")
785 (description "The drm_tools package contains the following commands:
786@table @command
787@item accudate
788An extended version of the \"date\" program that has sub-second accuracy.
789@item binformat
790Format complex binary data into text.
791@item binload
792Load data into a binary file using simple commands from the input.
793@item binorder
794Sort, merge, search, retrieve or generate test data consisting of fixed size
795binary records.
796@item binreplace
797Find or find/replace in binary files.
798@item binsplit
799Split test data consisting of fixed size binary records into one or more
800output streams.
801@item chardiff
802Find changes between two files at the character level. Unlike \"diff\", it
803lists just the characters that differ, so if the 40,000th character is
804different only that one character will be shown, not the entire line.
805@item columnadd
806Add columns of integers, decimals, and/or times.
807@item datasniffer
808A utility for formatting binary data dumps.
809@item dmath
810Double precision interactive command line math calculator.
811@item extract
812Extract and emit data from text files based on character or token position.
813@item execinput
814A utility that reads from STDIN and executes each line as a command in a
815sub-process.
816@item indexed_text
817A utility for rapid retrieval of text by line numbers, in any order, from a
818text file.
819@item mdump
820Format binary data.
821@item msgqueue
822Create message queues and send/receive messages.
823@item mbin
824@itemx mbout
825Multiple buffer in and out. Used for buffering a lot of data between a slow
826device and a fast device. Mostly for buffering streaming tape drives for use
827with slower network connections, so that streaming is maintained as much as
828possible to minimize wear on the tape device.
829@item pockmark
830Corrupt data streams - useful for testing error correction and data recovery.
831@item tarsieve
832Filter, list, or split a tar file.
833@end table")
834 (license license:gpl2+)))
835
ff3f6766
RW
836(define-public java-rsyntaxtextarea
837 (package
838 (name "java-rsyntaxtextarea")
839 (version "2.6.1")
840 (source (origin
841 (method url-fetch)
842 (uri (string-append "https://github.com/bobbylight/"
843 "RSyntaxTextArea/archive/"
844 version ".tar.gz"))
845 (file-name (string-append name "-" version ".tar.gz"))
846 (sha256
847 (base32
848 "0c5mqg2klj5rvf8fhycrli8rf6s37l9p7a8knw9gpp65r1c120q2"))))
849 (build-system ant-build-system)
850 (arguments
851 `(;; FIXME: some tests fail because locale resources cannot be found.
852 ;; Even when I add them to the class path,
853 ;; RSyntaxTextAreaEditorKitDumbCompleteWordActionTest fails.
854 #:tests? #f
855 #:jar-name "rsyntaxtextarea.jar"))
856 (native-inputs
857 `(("java-junit" ,java-junit)
858 ("java-hamcrest-core" ,java-hamcrest-core)))
859 (home-page "https://bobbylight.github.io/RSyntaxTextArea/")
860 (synopsis "Syntax highlighting text component for Java Swing")
861 (description "RSyntaxTextArea is a syntax highlighting, code folding text
862component for Java Swing. It extends @code{JTextComponent} so it integrates
863completely with the standard @code{javax.swing.text} package. It is fast and
864efficient, and can be used in any application that needs to edit or view
865source code.")
866 (license license:bsd-3)))
03639d03
RW
867
868;; We use the sources from git instead of the tarball from pypi, because the
869;; latter does not include the Cython source file from which bycython.cpp is
870;; generated.
871(define-public python-editdistance
872 (let ((commit "3ea84a7dd3258c76aa3be851ef3d50e59c886846")
873 (revision "1"))
874 (package
875 (name "python-editdistance")
876 (version (string-append "0.3.1-" revision "." (string-take commit 7)))
877 (source
878 (origin
879 (method git-fetch)
880 (uri (git-reference
b0e7b699 881 (url "https://github.com/aflc/editdistance")
03639d03 882 (commit commit)))
54335b59 883 (file-name (git-file-name name version))
03639d03
RW
884 (sha256
885 (base32
886 "1l43svsv12crvzphrgi6x435z6xg8m086c64armp8wzb4l8ccm7g"))))
887 (build-system python-build-system)
888 (arguments
889 `(#:phases
890 (modify-phases %standard-phases
891 (add-after 'unpack 'build-cython-code
892 (lambda _
893 (with-directory-excursion "editdistance"
894 (delete-file "bycython.cpp")
54d5b27e 895 (invoke "cython" "--cplus" "bycython.pyx")))))))
03639d03
RW
896 (native-inputs
897 `(("python-cython" ,python-cython)))
898 (home-page "https://www.github.com/aflc/editdistance")
899 (synopsis "Fast implementation of the edit distance (Levenshtein distance)")
900 (description
901 "This library simply implements Levenshtein distance algorithm with C++
902and Cython.")
903 (license license:expat))))
03f801aa
CB
904
905(define-public go-github.com-mattn-go-runewidth
d050000a
BL
906 (let ((commit "703b5e6b11ae25aeb2af9ebb5d5fdf8fa2575211")
907 (version "0.0.4")
908 (revision "1"))
909 (package
910 (name "go-github.com-mattn-go-runewidth")
911 (version (git-version version revision commit))
912 (source
913 (origin
914 (method git-fetch)
915 (uri (git-reference
916 (url "https://github.com/mattn/runewidth")
917 (commit commit)))
918 (file-name (git-file-name name version))
919 (sha256
920 (base32
921 "0znpyz71gajx3g0j2zp63nhjj2c07g16885vxv4ykwnrfmzbgk4w"))))
922 (build-system go-build-system)
923 (arguments
924 '(#:import-path "github.com/mattn/go-runewidth"))
925 (synopsis "@code{runewidth} provides Go functions to work with string widths")
926 (description
927 "The @code{runewidth} library provides Go functions for padding,
928measuring and checking the width of strings, with support for East Asian
929text.")
930 (home-page "https://github.com/mattn/runewidth")
931 (license license:expat))))
74fa77e9
PN
932
933(define-public docx2txt
934 (package
935 (name "docx2txt")
936 (version "1.4")
937 (source (origin
938 (method url-fetch)
939 (uri (string-append
940 "mirror://sourceforge/docx2txt/docx2txt/v"
941 version "/docx2txt-" version ".tgz"))
942 (sha256
943 (base32
944 "06vdikjvpj6qdb41d8wzfnyj44jpnknmlgbhbr1w215420lpb5xj"))))
945 (build-system gnu-build-system)
946 (inputs
947 `(("unzip" ,unzip)
948 ("perl" ,perl)))
949 (arguments
950 `(#:tests? #f ; No tests.
951 #:make-flags (list (string-append "BINDIR="
952 (assoc-ref %outputs "out") "/bin")
953 (string-append "CONFIGDIR="
954 (assoc-ref %outputs "out") "/etc")
955 ;; Makefile seems to be a bit dumb at guessing.
956 (string-append "INSTALL=install")
957 (string-append "PERL=perl"))
958 #:phases
959 (modify-phases %standard-phases
960 (delete 'configure)
961 (add-after 'install 'fix-install
962 (lambda* (#:key outputs inputs #:allow-other-keys)
963 (let* ((out (assoc-ref outputs "out"))
964 (bin (string-append out "/bin"))
965 (config (string-append out "/etc/docx2txt.config"))
966 (unzip (assoc-ref inputs "unzip")))
967 ;; According to INSTALL, the .sh wrapper can be skipped.
968 (delete-file (string-append bin "/docx2txt.sh"))
969 (rename-file (string-append bin "/docx2txt.pl")
970 (string-append bin "/docx2txt"))
971 (substitute* config
972 (("config_unzip => '/usr/bin/unzip',")
973 (string-append "config_unzip => '"
974 unzip
975 "/bin/unzip',")))
976 ;; Makefile is wrong.
f6ccb95a
TGR
977 (chmod config #o644)
978 #t))))))
74fa77e9
PN
979 (synopsis "Recover text from @file{.docx} files, with good formatting")
980 (description
981 "@command{docx2txt} is a Perl based command line utility to convert
982Microsoft Office @file{.docx} documents to equivalent text documents. Latest
983version supports following features during text extraction.
984
985@itemize
986@item Character conversions; currency characters are converted to respective
987names like Euro.
988@item Capitalisation of text blocks.
989@item Center and right justification of text fitting in a line of
990(configurable) 80 columns.
991@item Horizontal ruler, line breaks, paragraphs separation, tabs.
992@item Indicating hyperlinked text along with the hyperlink (configurable).
993@item Handling (bullet, decimal, letter, roman) lists along with (attempt at)
994indentation.
995@end itemize\n")
996 (home-page "http://docx2txt.sourceforge.net")
997 (license license:gpl3+)))
1a0363cf 998
bc5aa386
VC
999(define-public odt2txt
1000 (package
1001 (name "odt2txt")
1002 (version "0.5")
1003 (source
1004 (origin
1005 (method git-fetch)
1006 (uri (git-reference
1007 (url "https://github.com/dstosberg/odt2txt/")
1008 (commit (string-append "v" version))))
1009 (file-name (git-file-name name version))
1010 (sha256
1011 (base32
1012 "0im3kzvhxkjlx57w6h13mc9584c74ma1dyymgvpq2y61av3gc35v"))))
1013 (build-system gnu-build-system)
1014 (arguments
1015 `(#:tests? #f ; no make check
1016 #:make-flags (list "CC=gcc"
1017 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
1018 #:phases
1019 (modify-phases %standard-phases
1020 ;; no configure script
1021 (delete 'configure))))
1022 (inputs
1023 `(("zlib" ,zlib)))
1024 (home-page "https://github.com/dstosberg/odt2txt/")
1025 (synopsis "Converter from OpenDocument Text to plain text")
1026 (description "odt2txt is a command-line tool which extracts the text out
1027of OpenDocument Texts, as produced by OpenOffice.org, KOffice, StarOffice and
1028others.
1029
1030odt2txt can also extract text from some file formats similar to OpenDocument
1031Text, such as OpenOffice.org XML (*.sxw), which was used by OpenOffice.org
1032version 1.x and older StarOffice versions. To a lesser extent, odt2txt may be
1033useful to extract content from OpenDocument spreadsheets (*.ods) and
1034OpenDocument presentations (*.odp).")
1035 (license license:gpl2)))
1036
1a0363cf
MP
1037(define-public opencc
1038 (package
1039 (name "opencc")
1040 (version "1.0.5")
1041 (source
1042 (origin
bf5af934
EF
1043 (method git-fetch)
1044 (uri (git-reference
1045 (url "https://github.com/BYVoid/OpenCC")
1046 (commit (string-append "ver." version))))
1047 (file-name (git-file-name name version))
1a0363cf 1048 (sha256
1506d491
EF
1049 (base32
1050 "1pv5md225qwhbn8ql932zdg6gh1qlx3paiajaks8gfsa07yzvhr4"))
1051 (modules '((guix build utils)))
1052 (snippet
1053 '(begin
1054 ;; TODO: Unbundle tclap, darts-clone, gtest
1055 (delete-file-recursively "deps/rapidjson-0.11") #t))))
1a0363cf 1056 (build-system cmake-build-system)
1506d491
EF
1057 (arguments
1058 '(#:phases
1059 (modify-phases %standard-phases
1060 (add-after 'unpack 'patch-3rd-party-references
1061 (lambda* (#:key inputs #:allow-other-keys)
1062 (let ((rapidjson (assoc-ref inputs "rapidjson")))
1063 (substitute* "src/CMakeLists.txt"
1064 (("../deps/rapidjson-0.11")
1065 (string-append rapidjson "/include/rapidjson")))
1066 #t))))))
1a0363cf 1067 (native-inputs
1506d491
EF
1068 `(("python" ,python-wrapper)
1069 ("rapidjson" ,rapidjson)))
1a0363cf
MP
1070 (home-page "https://github.com/BYVoid/OpenCC")
1071 (synopsis "Convert between Traditional Chinese and Simplified Chinese")
1072 (description "Open Chinese Convert (OpenCC) converts between Traditional
1073Chinese and Simplified Chinese, supporting character-level conversion,
1074phrase-level conversion, variant conversion, and regional idioms among
1075Mainland China, Taiwan, and Hong-Kong.")
1076 (license license:asl2.0)))
933ac939
YA
1077
1078(define-public nkf
1079 (let ((commit "08043eadf4abdddcf277842217e3c77a24740dc2")
1080 (revision "1"))
1081 (package
1082 (name "nkf")
1083 ;; The commits corresponding to specific versions are published
1084 ;; here:
1085 ;; https://ja.osdn.net/projects/nkf/scm/git/nkf/
1086 (version "2.1.5")
1087 (source (origin
1088 (method git-fetch)
1089 (uri (git-reference
b0e7b699 1090 (url "https://github.com/nurse/nkf")
933ac939
YA
1091 (commit commit)))
1092 (file-name (git-file-name name version))
1093 (sha256
1094 (base32
1095 "0anw0knr1iy4p9w3d3b3pbwzh1c43p1i2q4c28kw9zviw8kx2rly"))))
1096 (build-system gnu-build-system)
1097 (arguments
1098 `(#:tests? #f ; test for perl module
1099 #:make-flags (list "CC=gcc" "CFLAGS=-O2 -Wall -pedantic"
1100 (string-append "prefix=" %output)
1101 "MKDIR=mkdir -p")
1102 #:phases
1103 (modify-phases %standard-phases
1104 (delete 'configure)))) ; No ./configure script
1105 (home-page "https://ja.osdn.net/projects/nkf/")
1106 (synopsis "Network Kanji Filter")
1107 (description "Nkf is yet another kanji code converter among networks,
1108hosts and terminals. It converts input kanji code to designated kanji code
1109such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16 or UTF-32.")
1110 (license license:zlib))))
74247b80
NG
1111
1112(define-public python-pandocfilters
1113 (package
1114 (name "python-pandocfilters")
1115 (version "1.4.2")
1116 (source
1117 (origin
1118 (method url-fetch)
1119 (uri (pypi-uri "pandocfilters" version))
1120 (sha256
1121 (base32
1122 "1a8d9b7s48gmq9zj0pmbyv2sivn5i7m6mybgpkk4jm5vd7hp1pdk"))))
1123 (build-system python-build-system)
1124 (home-page "https://github.com/jgm/pandocfilters")
1125 (synopsis "Python module for writing Pandoc filters")
1126 (description "Pandoc is a powerful utility to transform various
1127input formats into a wide range of output formats. To alter the
1128exported output document, Pandoc allows the usage of filters, which
1129are pipes that read a JSON serialization of the Pandoc AST from stdin,
1130transform it in some way, and write it to stdout. It allows therefore
1131to alter the processing of Pandoc's supported input formats, for
1132instance one can add new syntax elements to markdown, etc.
1133
1134This package provides Python bindings.")
1135 (license license:bsd-3)))
24719e8a
1136
1137(define-public aha
1138 (package
1139 (name "aha")
1140 (version "0.5")
1141 (source
1142 (origin
1143 (method git-fetch)
1144 (uri (git-reference
1145 (url "https://github.com/theZiz/aha")
1146 (commit version)))
1147 (sha256
1148 (base32
1149 "0byml4rmpiaalwx69jcixl3yvpvwmwiss1jzgsqwshilb2p4qnmz"))
1150 (file-name (git-file-name name version))))
1151 (build-system gnu-build-system)
1152 (arguments
1153 '(#:phases
1154 (modify-phases %standard-phases
1155 (delete 'configure))
1156 #:make-flags (list "CC=gcc"
1157 (string-append "PREFIX="
1158 (assoc-ref %outputs "out")))
1159 ;; no check target
1160 #:tests? #f))
1161 (home-page "https://github.com/theZiz/aha")
1162 (synopsis "Converts terminal escape sequences to HTML")
1163 (description "@command{aha} (Ansi Html Adapter) converts ANSI escape sequences
1164of a Unix terminal to HTML code.")
1165 (license (list license:lgpl2.0+ license:mpl1.1))))