Basis: Certvia dev@a48c5fb als Fundament für Craftvia
Unveränderter Stand von certvia/dev (a48c5fb) plus Craftvia-Spezifikation und Brandbook unter docs/craftvia/. ISMS-Module werden im Folgecommit entfernt. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json, re, os
|
||||
BASE=os.path.dirname(__file__)
|
||||
mp=os.path.join(BASE,"mapping.json")
|
||||
d=json.load(open(mp,encoding="utf-8"))
|
||||
|
||||
def clean(s):
|
||||
# entferne Handlebars-Conditional-Wrapper, behalte Innentext
|
||||
s=re.sub(r"\{\{#if \w+\}\}","",s)
|
||||
s=re.sub(r"\{\{/if\}\}","",s)
|
||||
s=re.sub(r"\s+"," ",s).strip()
|
||||
s=s.replace(" .",".").replace(" ,",",")
|
||||
return s
|
||||
|
||||
for a in d["anforderungen"]:
|
||||
a["requirement"]=clean(a["requirement"])
|
||||
a["implementation"]=clean(a["implementation"])
|
||||
if a["policy"]=="L00":
|
||||
a["impl_anchor"]=a["req_anchor"] # Leitlinie: kombiniert
|
||||
json.dump(d,open(mp,"w",encoding="utf-8"),ensure_ascii=False,indent=1)
|
||||
print("mapping bereinigt:",len(d["anforderungen"]),"Eintraege")
|
||||
Reference in New Issue
Block a user