[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/12: gnu: Add docx2txt.
From: |
Ludovic Courtès |
Subject: |
11/12: gnu: Add docx2txt. |
Date: |
Sat, 7 Jul 2018 12:10:48 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 74fa77e936d88a82fbb6b625beae49287b8653e9
Author: Pierre Neidhardt <address@hidden>
Date: Mon Jun 25 23:22:32 2018 +0200
gnu: Add docx2txt.
* gnu/packages/textutils.scm (docx2txt): New variable.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/packages/textutils.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 5734bf6..5dec414 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2017 Kei Kebreau <address@hidden>
;;; Copyright © 2017 Alex Vong <address@hidden>
;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
+;;; Copyright © 2018 Pierre Neidhardt <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -675,3 +676,68 @@ and Cython.")
measuring and checking the width of strings, with support east asian text.")
(home-page "https://github.com/jessevdk/go-flags")
(license license:expat)))
+
+(define-public docx2txt
+ (package
+ (name "docx2txt")
+ (version "1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/docx2txt/docx2txt/v"
+ version "/docx2txt-" version ".tgz"))
+ (sha256
+ (base32
+ "06vdikjvpj6qdb41d8wzfnyj44jpnknmlgbhbr1w215420lpb5xj"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("unzip" ,unzip)
+ ("perl" ,perl)))
+ (arguments
+ `(#:tests? #f ; No tests.
+ #:make-flags (list (string-append "BINDIR="
+ (assoc-ref %outputs "out") "/bin")
+ (string-append "CONFIGDIR="
+ (assoc-ref %outputs "out") "/etc")
+ ;; Makefile seems to be a bit dumb at guessing.
+ (string-append "INSTALL=install")
+ (string-append "PERL=perl"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'install 'fix-install
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (config (string-append out "/etc/docx2txt.config"))
+ (unzip (assoc-ref inputs "unzip")))
+ ;; According to INSTALL, the .sh wrapper can be skipped.
+ (delete-file (string-append bin "/docx2txt.sh"))
+ (rename-file (string-append bin "/docx2txt.pl")
+ (string-append bin "/docx2txt"))
+ (substitute* config
+ (("config_unzip => '/usr/bin/unzip',")
+ (string-append "config_unzip => '"
+ unzip
+ "/bin/unzip',")))
+ ;; Makefile is wrong.
+ (chmod config #o644)))))))
+ (synopsis "Recover text from @file{.docx} files, with good formatting")
+ (description
+ "@command{docx2txt} is a Perl based command line utility to convert
+Microsoft Office @file{.docx} documents to equivalent text documents. Latest
+version supports following features during text extraction.
+
address@hidden
address@hidden Character conversions; currency characters are converted to
respective
+names like Euro.
address@hidden Capitalisation of text blocks.
address@hidden Center and right justification of text fitting in a line of
+(configurable) 80 columns.
address@hidden Horizontal ruler, line breaks, paragraphs separation, tabs.
address@hidden Indicating hyperlinked text along with the hyperlink
(configurable).
address@hidden Handling (bullet, decimal, letter, roman) lists along with
(attempt at)
+indentation.
address@hidden itemize\n")
+ (home-page "http://docx2txt.sourceforge.net")
+ (license license:gpl3+)))
- branch master updated (c2587d3 -> e282611), Ludovic Courtès, 2018/07/07
- 03/12: weather: Fix pasto in --version output., Ludovic Courtès, 2018/07/07
- 06/12: gnu: Electrum: Update to 3.2.2., Ludovic Courtès, 2018/07/07
- 02/12: gnu: Update stellarium to 0.18.1., Ludovic Courtès, 2018/07/07
- 05/12: ui: Add -V as short option for --version., Ludovic Courtès, 2018/07/07
- 01/12: gnu: guile-git: Update to 0.1.0., Ludovic Courtès, 2018/07/07
- 07/12: gnu: emacs-git-timemachine: Update URL., Ludovic Courtès, 2018/07/07
- 11/12: gnu: Add docx2txt.,
Ludovic Courtès <=
- 04/12: scripts: Add missing -V option to commands that document it., Ludovic Courtès, 2018/07/07
- 09/12: gnu: re2c: Update to 1.0.3., Ludovic Courtès, 2018/07/07
- 10/12: gnu: Add emacs-org-brain., Ludovic Courtès, 2018/07/07
- 08/12: gnu: emacs-git-timemachine: Update to 4.5., Ludovic Courtès, 2018/07/07
- 12/12: gnu: Add go-github-com-docker-distribution., Ludovic Courtès, 2018/07/07