aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2019-01-06 02:05:38 +0800
committerswills <swills@FreeBSD.org>2019-01-06 02:05:38 +0800
commit85965775336260817e198afef22324afb7f49952 (patch)
treedd6064e9c8447b6a0ecc0362d7d915635dba7e49
parent3cef03e7d5236b67a5d03780dbd83509b28c80d2 (diff)
downloadfreebsd-ports-gnome-85965775336260817e198afef22324afb7f49952.tar.gz
freebsd-ports-gnome-85965775336260817e198afef22324afb7f49952.tar.zst
freebsd-ports-gnome-85965775336260817e198afef22324afb7f49952.zip
textproc/p5-docx2txt: create port
docx2txt is a perl based command line utility to convert Microsoft Office(Tm) Docx documents to equivalent Text documents. Latest version supports following features during text extraction. * Character conversions (" ' < & > - ... fraction and some mathematical symbols etc.); currency characters are converted to respective names like Euro. * Capitalisation of text blocks. * Center and right justification of text fitting in a line of (configurable) 80 columns. * Horizontal ruler, line breaks, paragraphs separation, tabs * Indicating hyperlinked text along with the hyperlink. (configurable) * Handling (bullet, decimal, letter, roman) lists along with (attempt at) indentation. WWW: https://sourceforge.net/projects/docx2txt/ PR: 225113 Submitted by: Piotr Kubaj <pkubaj@anongoth.pl>
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/p5-docx2txt/Makefile28
-rw-r--r--textproc/p5-docx2txt/distinfo3
-rw-r--r--textproc/p5-docx2txt/pkg-descr16
-rw-r--r--textproc/p5-docx2txt/pkg-plist3
5 files changed, 51 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index 9331e988e746..b21332f9250b 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1159,6 +1159,7 @@
SUBDIR += p5-YAPE-Regex-Explain
SUBDIR += p5-ack
SUBDIR += p5-dTemplate
+ SUBDIR += p5-docx2txt
SUBDIR += p5-libsoldout
SUBDIR += p5-libxml
SUBDIR += p5-pod2pdf
diff --git a/textproc/p5-docx2txt/Makefile b/textproc/p5-docx2txt/Makefile
new file mode 100644
index 000000000000..1fdb444f1f60
--- /dev/null
+++ b/textproc/p5-docx2txt/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME= docx2txt
+PORTVERSION= 1.4
+CATEGORIES= textproc perl5
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/v${PORTVERSION}
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= pkubaj@anongoth.pl
+COMMENT= Utility to convert Docx documents to equivalent Text documents
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+USES= perl5 tar:tgz
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+pre-patch:
+ ${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' ${WRKSRC}/docx2txt.pl
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/docx2txt.pl ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/docx2txt.sh ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/docx2txt.config ${STAGEDIR}${PREFIX}/etc/docx2txt.config.sample
+
+.include <bsd.port.mk>
diff --git a/textproc/p5-docx2txt/distinfo b/textproc/p5-docx2txt/distinfo
new file mode 100644
index 000000000000..e2664d897426
--- /dev/null
+++ b/textproc/p5-docx2txt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1515770114
+SHA256 (docx2txt-1.4.tgz) = b297752910a404c1435e703d5aedb4571222bd759fa316c86ad8c8bbe58c6d1b
+SIZE (docx2txt-1.4.tgz) = 31302
diff --git a/textproc/p5-docx2txt/pkg-descr b/textproc/p5-docx2txt/pkg-descr
new file mode 100644
index 000000000000..21b49ac6cbb5
--- /dev/null
+++ b/textproc/p5-docx2txt/pkg-descr
@@ -0,0 +1,16 @@
+docx2txt is a perl based command line utility to convert Microsoft Office(Tm)
+Docx documents to equivalent Text documents. Latest version supports
+following features during text extraction.
+
+* Character conversions (" ' < & > - ... fraction and some mathematical
+ symbols etc.); currency characters are converted to respective names
+ like Euro.
+* Capitalisation of text blocks.
+* Center and right justification of text fitting in a line of
+ (configurable) 80 columns.
+* Horizontal ruler, line breaks, paragraphs separation, tabs
+* Indicating hyperlinked text along with the hyperlink. (configurable)
+* Handling (bullet, decimal, letter, roman) lists along with (attempt at)
+ indentation.
+
+WWW: https://sourceforge.net/projects/docx2txt/
diff --git a/textproc/p5-docx2txt/pkg-plist b/textproc/p5-docx2txt/pkg-plist
new file mode 100644
index 000000000000..8540af71b2e6
--- /dev/null
+++ b/textproc/p5-docx2txt/pkg-plist
@@ -0,0 +1,3 @@
+bin/docx2txt.pl
+bin/docx2txt.sh
+@sample etc/docx2txt.config.sample