Date: Tue, 27 Jan 2026 21:43:10 +0000 From: =?utf-8?Q?Jes=C3=BAs?= Daniel Colmenares Oviedo <dtxdf@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 26299ff68e4d - main - www/py-flatnotes: New port: Self-hosted, database-less note taking web app Message-ID: <6979316e.392cf.407666d1@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by dtxdf: URL: https://cgit.FreeBSD.org/ports/commit/?id=26299ff68e4dfc0c452197bb621a9c35278b98c5 commit 26299ff68e4dfc0c452197bb621a9c35278b98c5 Author: Jesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org> AuthorDate: 2026-01-27 21:41:29 +0000 Commit: Jesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org> CommitDate: 2026-01-27 21:42:51 +0000 www/py-flatnotes: New port: Self-hosted, database-less note taking web app Flatnotes is a self-hosted, database-less note-taking web app that utilises a flat folder of markdown files for storage. WWW: https://github.com/dullage/flatnotes/ --- www/Makefile | 1 + www/py-flatnotes/Makefile | 54 +++++++++++++++++++++++++++++++++++ www/py-flatnotes/distinfo | 5 ++++ www/py-flatnotes/files/flatnotes.in | 50 +++++++++++++++++++++++++++++++++ www/py-flatnotes/pkg-descr | 2 ++ www/py-flatnotes/pkg-plist | 56 +++++++++++++++++++++++++++++++++++++ 6 files changed, 168 insertions(+) diff --git a/www/Makefile b/www/Makefile index b967dd55cb14..f41acf87fc4a 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1716,6 +1716,7 @@ SUBDIR += py-fastapi-sso SUBDIR += py-feedgen SUBDIR += py-feedgenerator + SUBDIR += py-flatnotes SUBDIR += py-flasgger SUBDIR += py-flask SUBDIR += py-flask-admin diff --git a/www/py-flatnotes/Makefile b/www/py-flatnotes/Makefile new file mode 100644 index 000000000000..b1427800fcc4 --- /dev/null +++ b/www/py-flatnotes/Makefile @@ -0,0 +1,54 @@ +PORTNAME= flatnotes +DISTVERSIONPREFIX= v +DISTVERSION= 5.5.4 +CATEGORIES= www python +MASTER_SITES= LOCAL/dtxdf/${PORTNAME}/:assets +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTFILES= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}.frontend${EXTRACT_SUFX}:assets + +MAINTAINER= dtxdf@FreeBSD.org +COMMENT= Self-hosted, database-less note taking web app + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiofiles>=0:devel/py-aiofiles@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}fastapi>=0:www/py-fastapi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyotp>=0:security/py-pyotp@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-jose>=0:security/py-python-jose@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-multipart>=0:www/py-python-multipart@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}qrcode>=0:textproc/py-qrcode@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}uvicorn>=0:www/py-uvicorn@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}whoosh>=0:textproc/py-whoosh@${PY_FLAVOR} + +USES= python +USE_GITHUB= yes +GH_ACCOUNT= dullage + +USE_RC_SUBR= ${PORTNAME} + +NO_ARCH= yes + +SUB_LIST= USER=${FLATNOTES_USER} + +PLIST_SUB= GROUP=${FLATNOTES_USER} \ + USER=${FLATNOTES_GROUP} + +FLATNOTES_USER= www +FLATNOTES_GROUP= www +FLATNOTES_DATADIR= /var/db/${PORTNAME} + +do-build: + @${PYTHON_CMD} -OO ${PYTHON_LIBDIR}/compileall.py \ + -d ${WWWDIR} \ + -f ${WRKSRC}/server + +do-install: + @${MKDIR} ${STAGEDIR}${WWWDIR} + @cd ${WRKSRC}/server && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR} + @${MKDIR} ${STAGEDIR}${WWWDIR}/client/dist + @cd ${WRKDIR}/${PORTNAME}-frontend && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/client/dist + @${MKDIR} ${STAGEDIR}${FLATNOTES_DATADIR} + +.include <bsd.port.mk> diff --git a/www/py-flatnotes/distinfo b/www/py-flatnotes/distinfo new file mode 100644 index 000000000000..85744edf804f --- /dev/null +++ b/www/py-flatnotes/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1769542256 +SHA256 (flatnotes-v5.5.4.frontend.tar.gz) = 02fe16911c6c6a0829ad03a8fb9c2a32e9a8e22ad643ec964d28d456ce013b0a +SIZE (flatnotes-v5.5.4.frontend.tar.gz) = 1030943 +SHA256 (dullage-flatnotes-v5.5.4_GH0.tar.gz) = c7f89a1f040b12db0b65e7f8e461ad7a63823a3b1d0492a8e8db434f755ea43f +SIZE (dullage-flatnotes-v5.5.4_GH0.tar.gz) = 445076 diff --git a/www/py-flatnotes/files/flatnotes.in b/www/py-flatnotes/files/flatnotes.in new file mode 100644 index 000000000000..46c192b7d995 --- /dev/null +++ b/www/py-flatnotes/files/flatnotes.in @@ -0,0 +1,50 @@ +#!/bin/sh + +# PROVIDE: flatnotes +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Configuration settings for flatnotes in /etc/rc.conf +# +# flatnotes_enable (bool): Enable flatnotes. (default=NO) +# flatnotes_runas (str): User to run Flatnotes as. (default=%%USER%%) +# flatnotes_host (str): Address to listen on. (default=127.0.0.1) +# flatnotes_port (int): Port to listen on. (default=8080) +# flatnotes_env (str): Environment variables used by flatnotes. +# (default=FLATNOTES_AUTH_TYPE=none) +# flatnotes_flags (str): Additional flags used by uvicorn. +# (default=--proxy-headers --forwarded-allow-ips '*') +# + +. /etc/rc.subr + +name=flatnotes +desc="Note taking web app" +rcvar="${name}_enable" + +load_rc_config $name + +: ${flatnotes_enable:="NO"} +: ${flatnotes_runas:="www"} +: ${flatnotes_host:="127.0.0.1"} +: ${flatnotes_port:="8080"} +: ${flatnotes_env:="FLATNOTES_AUTH_TYPE=none"} +: ${flatnotes_flags:="--proxy-headers --forwarded-allow-ips '*'"} + +pidfile="/var/run/${name}.pid" +start_cmd="${name}_start" +procname="%%PREFIX%%/bin/python%%PYTHON_VER%%" + +flatnotes_start() +{ + startmsg -n "Starting ${name}" + cd "%%WWWDIR%%" + env "FLATNOTES_PATH=/var/db/${name}" /usr/sbin/daemon -u "${flatnotes_runas}" -p "${pidfile}" -S \ + /usr/local/bin/uvicorn main:app \ + --host "${flatnotes_host}" \ + --port "${flatnotes_port}" \ + ${flatnotes_flags} + startmsg "." +} + +run_rc_command "$1" diff --git a/www/py-flatnotes/pkg-descr b/www/py-flatnotes/pkg-descr new file mode 100644 index 000000000000..423e79f70ada --- /dev/null +++ b/www/py-flatnotes/pkg-descr @@ -0,0 +1,2 @@ +Flatnotes is a self-hosted, database-less note-taking web app that +utilises a flat folder of markdown files for storage. diff --git a/www/py-flatnotes/pkg-plist b/www/py-flatnotes/pkg-plist new file mode 100644 index 000000000000..f3c1015a24a0 --- /dev/null +++ b/www/py-flatnotes/pkg-plist @@ -0,0 +1,56 @@ +@(%%USER%%,%%GROUP%%,) %%WWWDIR%%/client/dist/index.html +@dir(%%USER%%,%%GROUP%%,750) /var/db/flatnotes +%%WWWDIR%%/__pycache__/api_messages%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/__pycache__/global_config%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/__pycache__/helpers%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/__pycache__/logger%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/__pycache__/main%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/api_messages.py +%%WWWDIR%%/attachments/__pycache__/base%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/attachments/__pycache__/models%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/attachments/base.py +%%WWWDIR%%/attachments/file_system/__init__.py +%%WWWDIR%%/attachments/file_system/__pycache__/__init__%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/attachments/file_system/__pycache__/file_system%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/attachments/file_system/file_system.py +%%WWWDIR%%/attachments/models.py +%%WWWDIR%%/auth/__pycache__/base%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/auth/__pycache__/models%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/auth/base.py +%%WWWDIR%%/auth/local/__init__.py +%%WWWDIR%%/auth/local/__pycache__/__init__%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/auth/local/__pycache__/local%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/auth/local/local.py +%%WWWDIR%%/auth/models.py +%%WWWDIR%%/client/dist/android-chrome-192x192.png +%%WWWDIR%%/client/dist/android-chrome-512x512.png +%%WWWDIR%%/client/dist/assets/Home-Cmrc_Sq4.js +%%WWWDIR%%/client/dist/assets/LogIn-B3tBX_8a.js +%%WWWDIR%%/client/dist/assets/Note-B1b9c6-m.css +%%WWWDIR%%/client/dist/assets/Note-Bpd3XxiZ.js +%%WWWDIR%%/client/dist/assets/Poppins-Italic-PjgN8SAi.ttf +%%WWWDIR%%/client/dist/assets/Poppins-Regular-CTKNfV9P.ttf +%%WWWDIR%%/client/dist/assets/Poppins-SemiBold-B_fPDAUb.ttf +%%WWWDIR%%/client/dist/assets/Poppins-SemiBoldItalic-1z_hA9Cm.ttf +%%WWWDIR%%/client/dist/assets/SearchResults-BBK0a-1H.js +%%WWWDIR%%/client/dist/assets/SearchResults-BjhfwnLS.css +%%WWWDIR%%/client/dist/assets/apple-touch-icon-CoW-5gd0.png +%%WWWDIR%%/client/dist/assets/favicon-16x16-BmBhqzHf.png +%%WWWDIR%%/client/dist/assets/favicon-32x32-mLJOQmXV.png +%%WWWDIR%%/client/dist/assets/favicon-BokVo1-9.ico +%%WWWDIR%%/client/dist/assets/index-CUem98cd.css +%%WWWDIR%%/client/dist/assets/index-DT3cw79y.js +%%WWWDIR%%/client/dist/safari-pinned-tab.svg +%%WWWDIR%%/client/dist/site.webmanifest +%%WWWDIR%%/global_config.py +%%WWWDIR%%/helpers.py +%%WWWDIR%%/logger.py +%%WWWDIR%%/main.py +%%WWWDIR%%/notes/__pycache__/base%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/notes/__pycache__/models%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/notes/base.py +%%WWWDIR%%/notes/file_system/__init__.py +%%WWWDIR%%/notes/file_system/__pycache__/__init__%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/notes/file_system/__pycache__/file_system%%PYTHON_TAG%%.opt-2.pyc +%%WWWDIR%%/notes/file_system/file_system.py +%%WWWDIR%%/notes/models.pyhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6979316e.392cf.407666d1>
