bugfix: redaction regEx
- using <<<angle braces>>> again
This commit is contained in:
parent
b1a13911c2
commit
ff874e872e
3 changed files with 10 additions and 10 deletions
|
@ -51,7 +51,7 @@ Protokollbesprechung
|
|||
Projektplanung
|
||||
=====
|
||||
|
||||
- Ziel: **Projektplan** (((demnächst:::"bis Freitag"))) finalisieren
|
||||
- Ziel: **Projektplan** <<<demnächst:::"bis Freitag">>> finalisieren
|
||||
- Besprechung der "Roadmap" und Aufgabenpriorisierung
|
||||
- \mJMM, \mPD: Dokumentenversion in [Google Drive](https://drive.google.com) aktualisieren
|
||||
- [redact:::Weitere Planung]Offene Abstimmungen mit Stakeholdern "direkt" klären
|
||||
|
@ -61,7 +61,7 @@ Projektplanung
|
|||
Bugfixing
|
||||
=====
|
||||
|
||||
- Kritischer Fehler im (((Datenbankmodul))) identifiziert
|
||||
- Kritischer Fehler im <<<Datenbankmodul>>> identifiziert
|
||||
- [redact]Erste Testläufe bestätigen den "Problemursprung"
|
||||
- \mJS: Fehlerquelle im Code lokalisieren[/redact]
|
||||
- \mJS, \mPD: Lösungsvorschläge im [Issue Tracker](https://issues.example.com) dokumentieren
|
||||
|
|
8
src/lenaisten/redact.py
Normal file → Executable file
8
src/lenaisten/redact.py
Normal file → Executable file
|
@ -15,12 +15,12 @@ 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):
|
||||
_, reason, content = match.groups()
|
||||
reason, content = match.groups()
|
||||
|
||||
if reason:
|
||||
reason = reason.strip()
|
||||
|
@ -37,7 +37,7 @@ def subredact(match):
|
|||
else:
|
||||
retval = f"{reason} \\textcolor{{violet}}{{\\faIcon{{lock}}[intern]}}"
|
||||
|
||||
# DEBUG output
|
||||
# # DEBUG output
|
||||
# print("GROUPS", match.groups())
|
||||
# print("REASON", reason.strip())
|
||||
# print("CONTENT", content.strip())
|
||||
|
|
|
@ -25,15 +25,15 @@ tex: $(texFilesPub) $(texFilesInt)
|
|||
# pdf
|
||||
|
||||
%$(suffixPub).pdf: %.prot.md lev-shorthands.sty
|
||||
python3 /opt/lenaisten/redact.py $< | $(call md2pdfa,-,lev-protokoll,$@)
|
||||
/opt/lenaisten/redact.py $< | $(call md2pdfa,-,lev-protokoll,$@)
|
||||
|
||||
%$(suffixInt).pdf: %.prot.md lev-shorthands.sty
|
||||
python3 /opt/lenaisten/redact.py --internal $< | $(call md2pdfa,-,lev-protokoll,$@)
|
||||
/opt/lenaisten/redact.py --internal $< | $(call md2pdfa,-,lev-protokoll,$@)
|
||||
|
||||
# tex
|
||||
|
||||
%$(suffixPub).tex: %.prot.md lev-shorthands.sty
|
||||
python3 /opt/lenaisten/redact.py $< | $(call compile_md,-,lev-protokoll,latex,$@)
|
||||
/opt/lenaisten/redact.py $< | $(call compile_md,-,lev-protokoll,latex,$@)
|
||||
|
||||
%$(suffixInt).tex: %.prot.md lev-shorthands.sty
|
||||
python3 /opt/lenaisten/redact.py --internal $< | $(call compile_md,-,lev-protokoll,latex,$@)
|
||||
/opt/lenaisten/redact.py --internal $< | $(call compile_md,-,lev-protokoll,latex,$@)
|
||||
|
|
Loading…
Reference in a new issue