diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3f01993..995a15f 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -32,6 +32,7 @@ jobs: run: | npm install -g @marp-team/marp-cli python scripts/marp.py + python scripts/plantuml.py - name: Run python script. run: | mkdocs build diff --git a/docs/demo/diagram/uml.md b/docs/demo/diagram/uml.md new file mode 100644 index 0000000..42c799e --- /dev/null +++ b/docs/demo/diagram/uml.md @@ -0,0 +1,12 @@ +--- +marp: true +theme: notebook +--- + +# Example Diagram + +![](uml.png) + +
+- [:fontawesome-brands-html5: __HTML__ Slides: Slides](uml_slides.html) +- [:fontawesome-solid-file-pdf: __PDF__ Document: Slides](uml_slides.pdf)
\ No newline at end of file diff --git a/docs/demo/diagram/uml.puml b/docs/demo/diagram/uml.puml new file mode 100644 index 0000000..8ec9cf8 --- /dev/null +++ b/docs/demo/diagram/uml.puml @@ -0,0 +1,3 @@ +@startuml +Bob -> Alice: Hello! +@enduml \ No newline at end of file diff --git a/docs/demo/graph/d3.md b/docs/demo/graph/d3.md index cda5a36..e83d9c2 100644 --- a/docs/demo/graph/d3.md +++ b/docs/demo/graph/d3.md @@ -1,3 +1,9 @@ +--- +marp: false +theme: notebook +--- + + # Example Graph ## Population by Age @@ -60,5 +66,6 @@ d3.csv("/static/data/population-by-age.csv", d3.autoType).then(data => { document.getElementById("d3_container").appendChild(svg.node()); }); + + - \ No newline at end of file diff --git a/docs/demo/index.md b/docs/demo/index.md index 5505474..4b9004c 100644 --- a/docs/demo/index.md +++ b/docs/demo/index.md @@ -21,6 +21,11 @@ theme: notebook + + + + +
- [:fontawesome-brands-html5: __HTML__ Slides: Slides](index_slides.html) - [:fontawesome-solid-file-pdf: __PDF__ Document: Slides](index_slides.pdf)
\ No newline at end of file diff --git a/docs/static/css/adjust.css b/docs/static/css/adjust.css index e85bb17..aebd013 100644 --- a/docs/static/css/adjust.css +++ b/docs/static/css/adjust.css @@ -28,4 +28,4 @@ div.mermaid { width: unset !important; width: 100%; -} \ No newline at end of file +} diff --git a/scripts/plantuml.py b/scripts/plantuml.py new file mode 100644 index 0000000..7ea2e82 --- /dev/null +++ b/scripts/plantuml.py @@ -0,0 +1,22 @@ +import os +import subprocess + +import config as cfg + +def process_puml_files(base_path): + for root, _, files in os.walk(base_path): + for file in files: + if file.endswith('.puml'): + puml_file = os.path.join(root, file) + generate_graph(puml_file) + +def generate_graph(puml_file): + jar_path = './scripts/plantuml/plantuml-mit-1.2024.6.jar' + cmd = ['java', '-jar', jar_path, puml_file] + print("Executing: ", " ".join(cmd)) + subprocess.run(cmd, check=True) + +# Example usage +print (f"Processing puml files from: {cfg.markdown_source_path}") +process_puml_files(cfg.markdown_source_path) +print ("Done processing puml files") \ No newline at end of file diff --git a/scripts/plantuml/plantuml-mit-1.2024.6.jar b/scripts/plantuml/plantuml-mit-1.2024.6.jar new file mode 100644 index 0000000..c3e4964 Binary files /dev/null and b/scripts/plantuml/plantuml-mit-1.2024.6.jar differ