Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Apr 2023 06:50:18 GMT
From:      Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 94270243dba9 - main - textproc/py-docxtpl: New port: Python docx template engine
Message-ID:  <202304300650.33U6oIos063742@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=94270243dba9ce772b72772078e586e639c5f21f

commit 94270243dba9ce772b72772078e586e639c5f21f
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2023-04-30 06:47:38 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2023-04-30 06:49:19 +0000

    textproc/py-docxtpl: New port: Python docx template engine
    
    python-docx-template has been created because python-docx is powerful for
    creating documents but not for modifying them.
    
    The idea is to begin to create an example of the document you want to generate
    with microsoft word, it can be as complex as you want: pictures, index tables,
    footer, header, variables, anything you can do with word. Then, as you are
    still editing the document with microsoft word, you insert jinja2-like tags
    directly in the document. You save the document as a .docx file (xml format).
    it will be your .docx template file.
    
    Now you can use python-docx-template to generate as many word documents you
    want from this .docx template and context variables you will associate.
---
 textproc/Makefile             |  1 +
 textproc/py-docxtpl/Makefile  | 23 +++++++++++++++++++++++
 textproc/py-docxtpl/distinfo  |  3 +++
 textproc/py-docxtpl/pkg-descr | 12 ++++++++++++
 4 files changed, 39 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index defa0a63090a..e6eb7393de7e 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1322,6 +1322,7 @@
     SUBDIR += py-docutils
     SUBDIR += py-docx2txt
     SUBDIR += py-docxcompose
+    SUBDIR += py-docxtpl
     SUBDIR += py-dominate
     SUBDIR += py-dparse
     SUBDIR += py-duecredit
diff --git a/textproc/py-docxtpl/Makefile b/textproc/py-docxtpl/Makefile
new file mode 100644
index 000000000000..7f4d07044f09
--- /dev/null
+++ b/textproc/py-docxtpl/Makefile
@@ -0,0 +1,23 @@
+PORTNAME=	docxtpl
+PORTVERSION=	0.16.6
+CATEGORIES=	textproc python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	acm@FreeBSD.org
+COMMENT=	Python docx template engine
+WWW=		https://github.com/elapouya/python-docx-template
+
+LICENSE=	LGPL21
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}lxml>=3.3.4:devel/py-lxml@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-docx>0:textproc/py-python-docx@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR}
+
+USES=		python:3.6+
+USE_PYTHON=	autoplist distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/textproc/py-docxtpl/distinfo b/textproc/py-docxtpl/distinfo
new file mode 100644
index 000000000000..1f95fea2da67
--- /dev/null
+++ b/textproc/py-docxtpl/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1682829200
+SHA256 (docxtpl-0.16.6.tar.gz) = c5938dd891bf13958dd5dfd513816c688999060f037c316756a005cdebf9a322
+SIZE (docxtpl-0.16.6.tar.gz) = 29991
diff --git a/textproc/py-docxtpl/pkg-descr b/textproc/py-docxtpl/pkg-descr
new file mode 100644
index 000000000000..bf628132670f
--- /dev/null
+++ b/textproc/py-docxtpl/pkg-descr
@@ -0,0 +1,12 @@
+python-docx-template has been created because python-docx is powerful for
+creating documents but not for modifying them.
+
+The idea is to begin to create an example of the document you want to generate
+with microsoft word, it can be as complex as you want: pictures, index tables,
+footer, header, variables, anything you can do with word. Then, as you are
+still editing the document with microsoft word, you insert jinja2-like tags
+directly in the document. You save the document as a .docx file (xml format).
+it will be your .docx template file.
+
+Now you can use python-docx-template to generate as many word documents you
+want from this .docx template and context variables you will associate.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304300650.33U6oIos063742>