git: 8c24ce913c77 - main - converters/py-mammoth: New port

From: Wen Heping <wen_at_FreeBSD.org>
Date: Fri, 20 Dec 2024 02:09:49 UTC
The branch main has been updated by wen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8c24ce913c778a4b75aabfa12b3ba86518eb868f

commit 8c24ce913c778a4b75aabfa12b3ba86518eb868f
Author:     Wen Heping <wen@FreeBSD.org>
AuthorDate: 2024-12-20 01:39:55 +0000
Commit:     Wen Heping <wen@FreeBSD.org>
CommitDate: 2024-12-20 02:09:14 +0000

    converters/py-mammoth: New port
    
    Mammoth is designed to convert .docx documents, such as those created by
    Microsoft Word, Google Docs and LibreOffice, and convert them to HTML.
    Mammoth aims to produce simple and clean HTML by using semantic information
    in the document, and ignoring other details.
---
 converters/Makefile             |  1 +
 converters/py-mammoth/Makefile  | 22 ++++++++++++++++++++++
 converters/py-mammoth/distinfo  |  3 +++
 converters/py-mammoth/pkg-descr |  4 ++++
 4 files changed, 30 insertions(+)

diff --git a/converters/Makefile b/converters/Makefile
index 589fff718538..d963b78583d0 100644
--- a/converters/Makefile
+++ b/converters/Makefile
@@ -152,6 +152,7 @@
     SUBDIR += py-bincopy
     SUBDIR += py-bsdconv
     SUBDIR += py-gotenberg-client
+    SUBDIR += py-mammoth
     SUBDIR += py-rencode
     SUBDIR += py-svglib
     SUBDIR += py-text-unidecode
diff --git a/converters/py-mammoth/Makefile b/converters/py-mammoth/Makefile
new file mode 100644
index 000000000000..c7136a2bf078
--- /dev/null
+++ b/converters/py-mammoth/Makefile
@@ -0,0 +1,22 @@
+PORTNAME=	mammoth
+DISTVERSION=	1.8.0
+CATEGORIES=	converters python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	wen@FreeBSD.org
+COMMENT=	Convert Word documents from docx to simple and clean HTML and Markdown
+WWW=		https://github.com/mwilliamson/python-mammoth
+
+LICENSE=	BSD2CLAUSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cobble>=0:devel/py-cobble@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist pep517
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/converters/py-mammoth/distinfo b/converters/py-mammoth/distinfo
new file mode 100644
index 000000000000..798e6d9f7127
--- /dev/null
+++ b/converters/py-mammoth/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1734655288
+SHA256 (mammoth-1.8.0.tar.gz) = 7e8aa7db53f4aa7e9620b22bf8b716f1a16c84e969de1a0b1f920c756184e3d8
+SIZE (mammoth-1.8.0.tar.gz) = 50336
diff --git a/converters/py-mammoth/pkg-descr b/converters/py-mammoth/pkg-descr
new file mode 100644
index 000000000000..35471d724e1f
--- /dev/null
+++ b/converters/py-mammoth/pkg-descr
@@ -0,0 +1,4 @@
+Mammoth is designed to convert .docx documents, such as those created by
+Microsoft Word, Google Docs and LibreOffice, and convert them to HTML.
+Mammoth aims to produce simple and clean HTML by using semantic information
+in the document, and ignoring other details.