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
|
Projektplanung
|
||||||
=====
|
=====
|
||||||
|
|
||||||
- Ziel: **Projektplan** (((demnächst:::"bis Freitag"))) finalisieren
|
- Ziel: **Projektplan** <<<demnächst:::"bis Freitag">>> finalisieren
|
||||||
- Besprechung der "Roadmap" und Aufgabenpriorisierung
|
- Besprechung der "Roadmap" und Aufgabenpriorisierung
|
||||||
- \mJMM, \mPD: Dokumentenversion in [Google Drive](https://drive.google.com) aktualisieren
|
- \mJMM, \mPD: Dokumentenversion in [Google Drive](https://drive.google.com) aktualisieren
|
||||||
- [redact:::Weitere Planung]Offene Abstimmungen mit Stakeholdern "direkt" klären
|
- [redact:::Weitere Planung]Offene Abstimmungen mit Stakeholdern "direkt" klären
|
||||||
|
@ -61,7 +61,7 @@ Projektplanung
|
||||||
Bugfixing
|
Bugfixing
|
||||||
=====
|
=====
|
||||||
|
|
||||||
- Kritischer Fehler im (((Datenbankmodul))) identifiziert
|
- Kritischer Fehler im <<<Datenbankmodul>>> identifiziert
|
||||||
- [redact]Erste Testläufe bestätigen den "Problemursprung"
|
- [redact]Erste Testläufe bestätigen den "Problemursprung"
|
||||||
- \mJS: Fehlerquelle im Code lokalisieren[/redact]
|
- \mJS: Fehlerquelle im Code lokalisieren[/redact]
|
||||||
- \mJS, \mPD: Lösungsvorschläge im [Issue Tracker](https://issues.example.com) dokumentieren
|
- \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
|
# redaction syntax
|
||||||
import re
|
import re
|
||||||
inlinepat = re.compile(r"\(\(\((?:(.+?):::)?(.+?)\)\)\)", re.MULTILINE|re.DOTALL)
|
inlinepat = re.compile(r"<<<(?:([^>]+?):::)?(.+?)>>>", re.MULTILINE|re.DOTALL)
|
||||||
tokenpat = re.compile(r"\[redact(:::(.+?))?\](.+?)\[\/redact\]", re.MULTILINE|re.DOTALL)
|
tokenpat = re.compile(r"\[redact(?::::(.+?))?\](.+?)\[\/redact\]", re.MULTILINE|re.DOTALL)
|
||||||
|
|
||||||
# match handling
|
# match handling
|
||||||
def subredact(match):
|
def subredact(match):
|
||||||
_, reason, content = match.groups()
|
reason, content = match.groups()
|
||||||
|
|
||||||
if reason:
|
if reason:
|
||||||
reason = reason.strip()
|
reason = reason.strip()
|
||||||
|
@ -37,7 +37,7 @@ def subredact(match):
|
||||||
else:
|
else:
|
||||||
retval = f"{reason} \\textcolor{{violet}}{{\\faIcon{{lock}}[intern]}}"
|
retval = f"{reason} \\textcolor{{violet}}{{\\faIcon{{lock}}[intern]}}"
|
||||||
|
|
||||||
# DEBUG output
|
# # DEBUG output
|
||||||
# print("GROUPS", match.groups())
|
# print("GROUPS", match.groups())
|
||||||
# print("REASON", reason.strip())
|
# print("REASON", reason.strip())
|
||||||
# print("CONTENT", content.strip())
|
# print("CONTENT", content.strip())
|
||||||
|
|
|
@ -25,15 +25,15 @@ tex: $(texFilesPub) $(texFilesInt)
|
||||||
# pdf
|
# pdf
|
||||||
|
|
||||||
%$(suffixPub).pdf: %.prot.md lev-shorthands.sty
|
%$(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
|
%$(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
|
# tex
|
||||||
|
|
||||||
%$(suffixPub).tex: %.prot.md lev-shorthands.sty
|
%$(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
|
%$(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