Compare commits

..

2 commits

Author SHA1 Message Date
b1a13911c2 bugfix: redaction regEx 2025-05-12 23:49:51 +00:00
fbc76e969f publishing 2025-05-12 23:47:41 +00:00
4 changed files with 39 additions and 3 deletions

View file

@ -30,7 +30,8 @@
"vscode": {
"extensions": [
"Gruntfuggly.todo-tree",
"mhutchie.git-graph"
"mhutchie.git-graph",
"timonwong.shellcheck"
]
}
},

25
Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM docker.io/ldericher/autodoc:0.8-diagram
# install pdfa tools as per https://stackoverflow.com/a/39420880
COPY --chown=root:root \
deploy/pdfa \
/opt/pdfa
# install TeXoffice
COPY --chown=root:root \
deploy/texoffice \
/opt/texlive/texdir/texmf-dist/tex/latex/texoffice
# install lenaisten directory
COPY --chown=root:root \
src/lenaisten \
/opt/lenaisten
# install pandoc templates
COPY --chown=root:root \
src/lev-protokoll.latex \
/usr/local/share/pandoc/templates
RUN set -ex; \
# reindex TeXlive (installed TeXoffice)
/opt/texlive/texdir/bin/default/texconfig rehash;

10
deploy/publish Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
script="$( readlink -f "${0}" )"
script_dir="$( dirname "${script}" )"
docker buildx build \
--pull --push \
--tag "code.lenaisten.de/lenaisten/lev-templates:latest" \
--platform "linux/amd64" \
"${script_dir}/.."

View file

@ -15,8 +15,8 @@ txt = Path(args.file).read_text()
# redaction syntax
import re
inlinepat = re.compile(r"\(\(\((([^>]*?):::)?(.*?)\)\)\)", re.MULTILINE|re.DOTALL)
tokenpat = re.compile(r"\[redact(:::(.*?))?\](.*?)\[\/redact\]", re.MULTILINE|re.DOTALL)
inlinepat = re.compile(r"\(\(\((?:(.+?):::)?(.+?)\)\)\)", re.MULTILINE|re.DOTALL)
tokenpat = re.compile(r"\[redact(:::(.+?))?\](.+?)\[\/redact\]", re.MULTILINE|re.DOTALL)
# match handling
def subredact(match):