From nobody Sun Apr 30 06:50:18 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8H630C9Cz48rRX; Sun, 30 Apr 2023 06:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8H626f11z3Lmr; Sun, 30 Apr 2023 06:50:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CG70XvhbgM2I/WDpYTea10N4PsizUv6nZMD1B5Y834g=; b=XE/7MLpmWNKF8t/rv4XFjWyKBtaKUgtXVN5EykIkbU42CddZOfKXTNXpk5eC4ri0TriYcg I+ZVeP7EoAyISDeH5hAUTs/rj2+V/SmPnUgmVXUzuYf+g+N/etsRiQTCMwNp7+27+0uAiS UqjmJs1Dww7z4C+uDcnHiOtrmUXDMRBmjL1eBwHWpVWTYFtX9Sz7jF681rRcRNjlpSe/iI zX4H4YdljHIJ7TurL+lKcXG3U+/TQRDL1KYHvVpONCFqs6/XulGWQkXEpXXQzaJ/xcvWgZ YV3LIH6jES7nb1WazDt2Fax93mNKppGk1Nzx5d6tGBMS60zK845WWatc+rRuBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CG70XvhbgM2I/WDpYTea10N4PsizUv6nZMD1B5Y834g=; b=mDbv0JoBqiKvuoWIzCpJiCcCPgWYnPA2tIjvm/S6LtvPlG0yl1kwxN11QCHSN27DFfY6ce Z/bePphs3Wl0b2zeMoMJ4Dz/MvnGE4Yl50zK33toQnjjj+JZLQjt2wiRKFHsIOeuLDavkz r0sLHS3K27kDk/g0Gu7WgALSLwITatn116RrVznm1yRVd7jA2SNbojSMAYjzLVLnCvpeal aiFkiu374wK9FYdEf+TBPztx2y3HoVRkjI3NBrAEVNosp+LIEnW0AI69Hrnv5jVw5Twxtb nlSDMlczdHSJJY9D5kWKeIM1RuulATGGj4SIU4SiaSEKQJvrSZLiTaGUhT682Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837418; a=rsa-sha256; cv=none; b=JqHp/066uEN1jm9/3MjkY7OeVjs4wuda7TKnKdS1CxCnrv1nQ+55adLBThCkPxo8ilAJRi fa6LBiS8fezNW1g3PAZhDvUBplpTU5bUuwaEshd/cshkgfM4I0MenAn2Zts8CUqrPELVPL syHho/PKLVqgEE+EPJgM05Z1Tx0DGZs4yyhTUmj0j9rtj55uiXJhcG3ZXmp2gmZrhx0vKc b4hRE++VqXIP1O1u8QE7fen7cnCeVv+1D2JYgrhoJqvb8oFVpwX5XDtlbH6ukA0O4ntRUh 2xatYHUi3Ib115QYBGafk+2ZdhHFE6saAyZ3VGP5kyYbu/3X9v3SbQnVb9h3Ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8H625hdwzDgg; Sun, 30 Apr 2023 06:50:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6oIsX063743; Sun, 30 Apr 2023 06:50:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6oIos063742; Sun, 30 Apr 2023 06:50:18 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:50:18 GMT Message-Id: <202304300650.33U6oIos063742@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: 94270243dba9 - main - textproc/py-docxtpl: New port: Python docx template engine List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94270243dba9ce772b72772078e586e639c5f21f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=94270243dba9ce772b72772078e586e639c5f21f commit 94270243dba9ce772b72772078e586e639c5f21f Author: Jose Alonso Cardenas Marquez AuthorDate: 2023-04-30 06:47:38 +0000 Commit: Jose Alonso Cardenas Marquez 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 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.