943acbc573
Durcit la convention de nommage des projets (dérive constatée : 'Sliding Automation', 'code_versioning'... au lieu des formes canoniques). - trilium_api.py : projets_canoniques() lit le référentiel = valeurs du label projet sur les notes de type=projet (source unique, pas de constante en dur). Note-projet CodeVersioning créée (manquait). - mcp_server.py : _valider_projet() branché dans les 6 tools de création (add_decision/history/backlog, new_conversation, create_entite, add_skill). Refuse un projet non canonique (suggestion si faute) ou inconnu (renvoi au processus de création de projet). Ne verrouille pas si référentiel illisible. - lint_audit.py : VAL-nommage aligné sur le référentiel (attrape casse, espace ET snake_case ; l'ancien 'contient un espace' ratait code_versioning). - Données : 79 notes ré-étiquetées vers les 3 formes canoniques. Quality by design : l'erreur de nommage devient impossible à l'écriture, le Lint n'est plus que le filet de sécurité.
422 lines
9.0 KiB
Python
422 lines
9.0 KiB
Python
# Copyright wavedrompy contributors.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# Translated to Python from original file:
|
|
# https://github.com/drom/wavedrom/blob/master/src/WaveDrom.js
|
|
|
|
from .attrdict import AttrDict
|
|
css = AttrDict({})
|
|
css.default = """
|
|
text{font-size:11pt;
|
|
font-style:normal;
|
|
font-variant:normal;
|
|
font-weight:normal;
|
|
font-stretch:normal;
|
|
text-align:center;
|
|
fill-opacity:1;
|
|
font-family:Helvetica}
|
|
.h1{font-size:33pt;
|
|
font-weight:bold}
|
|
.h2{font-size:27pt;
|
|
font-weight:bold}
|
|
.h3{font-size:20pt;
|
|
font-weight:bold}
|
|
.h4{font-size:14pt;
|
|
font-weight:bold}
|
|
.h5{font-size:11pt;
|
|
font-weight:bold}
|
|
.h6{font-size:8pt;
|
|
font-weight:bold}
|
|
.muted{fill:#aaa}
|
|
.warning{fill:#f6b900}
|
|
.error{fill:#f60000}
|
|
.info{fill:#0041c4}
|
|
.success{fill:#00ab00}
|
|
.s1{fill:none;
|
|
stroke:#000;
|
|
stroke-width:1;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none}
|
|
.s2{fill:none;
|
|
stroke:#000;
|
|
stroke-width:0.5;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none}
|
|
.s3{color:#000;
|
|
fill:none;
|
|
stroke:#000;
|
|
stroke-width:1;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:1, 3;
|
|
stroke-dashoffset:0;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s4{color:#000;
|
|
fill:none;
|
|
stroke:#000;
|
|
stroke-width:1;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none;
|
|
stroke-dashoffset:0;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s5{fill:#fff;
|
|
stroke:none}
|
|
.s6{fill:#000;
|
|
fill-opacity:1;
|
|
stroke:none}
|
|
.s7{color:#000;
|
|
fill:#fff;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s8{color:#000;
|
|
fill:#ffffb4;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s9{color:#000;
|
|
fill:#ffe0b9;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s10{color:#000;
|
|
fill:#b9e0ff;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s11{color:#000;
|
|
fill:#ccfdfe;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s12{color:#000;
|
|
fill:#cdfdc5;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s13{color:#000;
|
|
fill:#f0c1fb;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s14{color:#000;
|
|
fill:#f5c2c0;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s15{fill:#0041c4;
|
|
fill-opacity:1;
|
|
stroke:none}
|
|
.s16{fill:none;
|
|
stroke:#0041c4;
|
|
stroke-width:1;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none}
|
|
"""
|
|
|
|
css.narrow = """
|
|
text{font-size:11pt;
|
|
font-style:normal;
|
|
font-variant:normal;
|
|
font-weight:normal;
|
|
font-stretch:normal;
|
|
text-align:center;
|
|
fill-opacity:1;
|
|
font-family:Helvetica}
|
|
.muted{fill:#aaa}
|
|
.warning{fill:#f6b900}
|
|
.error{fill:#f60000}
|
|
.info{fill:#0041c4}
|
|
.success{fill:#00ab00}
|
|
.h1{font-size:33pt;font-weight:bold}
|
|
.h2{font-size:27pt;font-weight:bold}
|
|
.h3{font-size:20pt;font-weight:bold}
|
|
.h4{font-size:14pt;font-weight:bold}
|
|
.h5{font-size:11pt;font-weight:bold}
|
|
.h6{font-size:8pt;font-weight:bold}
|
|
.s1{fill:none;
|
|
stroke:#000000;
|
|
stroke-width:1;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none}
|
|
.s2{fill:none;
|
|
stroke:#000000;
|
|
stroke-width:0.5;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none}
|
|
.s3{color:#000000;
|
|
fill:none;
|
|
stroke:#000000;
|
|
stroke-width:1;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:1, 3;
|
|
stroke-dashoffset:0;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s4{color:#000000;
|
|
fill:none;
|
|
stroke:#000000;
|
|
stroke-width:1;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none;
|
|
stroke-dashoffset:0;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s5{fill:#ffffff;stroke:none}
|
|
.s6{color:#000000;
|
|
fill:#ffffb4;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s7{color:#000000;
|
|
fill:#ffe0b9;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s8{color:#000000;
|
|
fill:#b9e0ff;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s9{fill:#000000;fill-opacity:1;stroke:none}
|
|
.s10{color:#000000;
|
|
fill:#ffffff;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:1px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
"""
|
|
|
|
css.lowkey="""
|
|
text{font-size:11pt;
|
|
font-style:normal;
|
|
font-variant:normal;
|
|
font-weight:normal;
|
|
font-stretch:normal;
|
|
text-align:center;
|
|
fill-opacity:1;
|
|
font-family:Helvetica}
|
|
.muted{fill:#aaa}
|
|
.warning{fill:#f6b900}
|
|
.error{fill:#f60000}
|
|
.info{fill:#0041c4}
|
|
.success{fill:#00ab00}
|
|
.h1{font-size:33pt;
|
|
font-weight:bold}
|
|
.h2{font-size:27pt;
|
|
font-weight:bold}
|
|
.h3{font-size:20pt;
|
|
font-weight:bold}
|
|
.h4{font-size:14pt;
|
|
font-weight:bold}
|
|
.h5{font-size:11pt;
|
|
font-weight:bold}
|
|
.h6{font-size:8pt;
|
|
font-weight:bold}
|
|
.s1{fill:none;
|
|
stroke:#606060;
|
|
stroke-width:0.75px;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none}
|
|
.s2{fill:none;
|
|
stroke:#606060;
|
|
stroke-width:0.5;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none}
|
|
.s3{color:#000;
|
|
fill:none;
|
|
stroke:#606060;
|
|
stroke-width:0.75px;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:1, 3;
|
|
stroke-dashoffset:0;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s4{color:#000;
|
|
fill:none;
|
|
stroke:#606060;
|
|
stroke-width:0.75px;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none;
|
|
stroke-dashoffset:0;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible}
|
|
.s5{fill:#ffffff;
|
|
stroke:none}
|
|
.s6{color:#000;
|
|
fill:#eaeaea;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:0.25px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s7{color:#000;
|
|
fill:#d7d7d7;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:0.25px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s8{color:#000;
|
|
fill:#c0c0c0;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:0.25px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s9{fill:#606060;
|
|
fill-opacity:1;
|
|
stroke:none}
|
|
.s10{color:#000;
|
|
fill:#fff;
|
|
fill-opacity:1;
|
|
fill-rule:nonzero;
|
|
stroke:none;
|
|
stroke-width:0.25px;
|
|
marker:none;
|
|
visibility:visible;
|
|
display:inline;
|
|
overflow:visible;
|
|
enable-background:accumulate}
|
|
.s11{fill:#0041c4;
|
|
fill-opacity:1;
|
|
stroke:none}
|
|
.s12{fill:none;
|
|
stroke:#0041c4;
|
|
stroke-width:0.75px;
|
|
stroke-linecap:round;
|
|
stroke-linejoin:miter;
|
|
stroke-miterlimit:4;
|
|
stroke-opacity:1;
|
|
stroke-dasharray:none}
|
|
"""
|