mddoco 2.0.3__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mddoco-2.0.3/src/mddoco.egg-info → mddoco-2.1.0}/PKG-INFO +25 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/README.md +20 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/pyproject.toml +9 -1
- mddoco-2.1.0/src/mddoco/__init__.py +1 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/cli.py +2 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/renderer.py +2 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/academic-wide.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/academic.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/dark-wide.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/dark.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/default-wide.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/default.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/paged-professional.html +8 -2
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/professional-wide.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/professional.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/themes/vanilla.html +7 -1
- {mddoco-2.0.3 → mddoco-2.1.0/src/mddoco.egg-info}/PKG-INFO +25 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/tests/test_preprocessor.py +1 -1
- mddoco-2.0.3/src/mddoco/__init__.py +0 -1
- {mddoco-2.0.3 → mddoco-2.1.0}/LICENSE +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/setup.cfg +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/converter.py +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/graph.py +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/mermaid.py +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/pdf.py +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/preprocessor.py +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/scanner.py +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/toc.py +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco/writer.py +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco.egg-info/SOURCES.txt +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco.egg-info/dependency_links.txt +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco.egg-info/entry_points.txt +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco.egg-info/requires.txt +0 -0
- {mddoco-2.0.3 → mddoco-2.1.0}/src/mddoco.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mddoco
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Markdown to HTML/PDF document converter
|
|
5
|
+
Author-email: Phil Massyn <phil.massyn@icloud.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/massyn/mddoco
|
|
7
|
+
Project-URL: Repository, https://github.com/massyn/mddoco
|
|
8
|
+
Project-URL: Issues, https://github.com/massyn/mddoco/issues
|
|
5
9
|
Requires-Python: >=3.10
|
|
6
10
|
Description-Content-Type: text/markdown
|
|
7
11
|
License-File: LICENSE
|
|
@@ -20,6 +24,8 @@ Dynamic: license-file
|
|
|
20
24
|
|
|
21
25
|
A CLI tool that converts markdown files to a single HTML (or future PDF) document.
|
|
22
26
|
|
|
27
|
+
[](https://github.com/massyn/mddoco/actions/workflows/ci.yml)
|
|
28
|
+
 
|
|
23
29
|
## Installation
|
|
24
30
|
|
|
25
31
|
```bash
|
|
@@ -85,6 +91,24 @@ mddoco ./docs --title "My Project" --toc --output ./out
|
|
|
85
91
|
|
|
86
92
|
All matched markdown files are combined into a single HTML document in the output directory. The filename is derived from the input folder or file name.
|
|
87
93
|
|
|
94
|
+
## Examples
|
|
95
|
+
|
|
96
|
+
The [`examples/`](examples/) directory contains four runnable input folders, each
|
|
97
|
+
covering a different feature:
|
|
98
|
+
|
|
99
|
+
| Folder | Demonstrates |
|
|
100
|
+
|--------|--------------|
|
|
101
|
+
| [`examples/01_basic`](examples/01_basic) | Plain Markdown, file ordering, underscore-excluded files |
|
|
102
|
+
| [`examples/02_rich_content`](examples/02_rich_content) | Mermaid diagrams, syntax highlighting, `graph` charts |
|
|
103
|
+
| [`examples/03_themed_report`](examples/03_themed_report) | Themes and a table of contents |
|
|
104
|
+
| [`examples/04_jinja_data`](examples/04_jinja_data) | Jinja2 templates with JSON and CSV data files |
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
mddoco examples/03_themed_report --theme professional --title "Q3 Platform Review" --toc --output ./out
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
See [`examples/README.md`](examples/README.md) for the full list of commands.
|
|
111
|
+
|
|
88
112
|
## Jinja2 templates
|
|
89
113
|
|
|
90
114
|
Files ending in `.md.j2` are Jinja2 templates that produce Markdown. They are sorted alongside regular `.md` files (numeric prefixes such as `01_`, `02_` determine order) and converted through the same pipeline.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A CLI tool that converts markdown files to a single HTML (or future PDF) document.
|
|
4
4
|
|
|
5
|
+
[](https://github.com/massyn/mddoco/actions/workflows/ci.yml)
|
|
6
|
+
 
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -67,6 +69,24 @@ mddoco ./docs --title "My Project" --toc --output ./out
|
|
|
67
69
|
|
|
68
70
|
All matched markdown files are combined into a single HTML document in the output directory. The filename is derived from the input folder or file name.
|
|
69
71
|
|
|
72
|
+
## Examples
|
|
73
|
+
|
|
74
|
+
The [`examples/`](examples/) directory contains four runnable input folders, each
|
|
75
|
+
covering a different feature:
|
|
76
|
+
|
|
77
|
+
| Folder | Demonstrates |
|
|
78
|
+
|--------|--------------|
|
|
79
|
+
| [`examples/01_basic`](examples/01_basic) | Plain Markdown, file ordering, underscore-excluded files |
|
|
80
|
+
| [`examples/02_rich_content`](examples/02_rich_content) | Mermaid diagrams, syntax highlighting, `graph` charts |
|
|
81
|
+
| [`examples/03_themed_report`](examples/03_themed_report) | Themes and a table of contents |
|
|
82
|
+
| [`examples/04_jinja_data`](examples/04_jinja_data) | Jinja2 templates with JSON and CSV data files |
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
mddoco examples/03_themed_report --theme professional --title "Q3 Platform Review" --toc --output ./out
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
See [`examples/README.md`](examples/README.md) for the full list of commands.
|
|
89
|
+
|
|
70
90
|
## Jinja2 templates
|
|
71
91
|
|
|
72
92
|
Files ending in `.md.j2` are Jinja2 templates that produce Markdown. They are sorted alongside regular `.md` files (numeric prefixes such as `01_`, `02_` determine order) and converted through the same pipeline.
|
|
@@ -4,10 +4,13 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mddoco"
|
|
7
|
-
version = "2.0
|
|
7
|
+
version = "2.1.0"
|
|
8
8
|
description = "Markdown to HTML/PDF document converter"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Phil Massyn", email = "phil.massyn@icloud.com" },
|
|
13
|
+
]
|
|
11
14
|
dependencies = [
|
|
12
15
|
"click>=8.0",
|
|
13
16
|
"markdown>=3.5",
|
|
@@ -23,6 +26,11 @@ dev = [
|
|
|
23
26
|
"ruff>=0.16,<0.17",
|
|
24
27
|
]
|
|
25
28
|
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/massyn/mddoco"
|
|
31
|
+
Repository = "https://github.com/massyn/mddoco"
|
|
32
|
+
Issues = "https://github.com/massyn/mddoco/issues"
|
|
33
|
+
|
|
26
34
|
[project.scripts]
|
|
27
35
|
mddoco = "mddoco.cli:main"
|
|
28
36
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.0"
|
|
@@ -79,6 +79,7 @@ def main(
|
|
|
79
79
|
sections = [(p, html) for p, html, _ in raw]
|
|
80
80
|
toc_html = combine_toc([t for _, _, t in raw]) if toc else None
|
|
81
81
|
has_mermaid = any('<div class="mermaid">' in html for _, html in sections)
|
|
82
|
+
has_code = any("<pre><code" in html for _, html in sections)
|
|
82
83
|
|
|
83
84
|
# Resolve output directory and filename.
|
|
84
85
|
# If output_path has a suffix, treat it as an explicit file path.
|
|
@@ -99,6 +100,7 @@ def main(
|
|
|
99
100
|
toc_html=toc_html or None,
|
|
100
101
|
theme=theme,
|
|
101
102
|
has_mermaid=has_mermaid,
|
|
103
|
+
has_code=has_code,
|
|
102
104
|
)
|
|
103
105
|
except ValueError as exc:
|
|
104
106
|
raise click.ClickException(str(exc)) from exc
|
|
@@ -10,6 +10,7 @@ def render_html(
|
|
|
10
10
|
toc_html: str | None = None,
|
|
11
11
|
theme: str = "default",
|
|
12
12
|
has_mermaid: bool = False,
|
|
13
|
+
has_code: bool = False,
|
|
13
14
|
) -> str:
|
|
14
15
|
"""Render a full HTML document from (path, html_fragment) pairs."""
|
|
15
16
|
theme_path = Path(theme)
|
|
@@ -30,4 +31,5 @@ def render_html(
|
|
|
30
31
|
toc_html=toc_html,
|
|
31
32
|
sections=sections,
|
|
32
33
|
has_mermaid=has_mermaid,
|
|
34
|
+
has_code=has_code,
|
|
33
35
|
)
|
|
@@ -150,9 +150,15 @@
|
|
|
150
150
|
pre { page-break-inside: avoid; }
|
|
151
151
|
h2, h3 { page-break-after: avoid; }
|
|
152
152
|
}
|
|
153
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
153
154
|
</style>
|
|
155
|
+
{% if has_code %}
|
|
156
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github.min.css" integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
|
|
157
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
158
|
+
<script>hljs.highlightAll();</script>
|
|
159
|
+
{% endif %}
|
|
154
160
|
{% if has_mermaid %}
|
|
155
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
161
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
156
162
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'neutral' });</script>
|
|
157
163
|
{% endif %}
|
|
158
164
|
</head>
|
|
@@ -151,9 +151,15 @@
|
|
|
151
151
|
pre { page-break-inside: avoid; }
|
|
152
152
|
h2, h3 { page-break-after: avoid; }
|
|
153
153
|
}
|
|
154
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
154
155
|
</style>
|
|
156
|
+
{% if has_code %}
|
|
157
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github.min.css" integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
|
|
158
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
159
|
+
<script>hljs.highlightAll();</script>
|
|
160
|
+
{% endif %}
|
|
155
161
|
{% if has_mermaid %}
|
|
156
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
162
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
157
163
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'neutral' });</script>
|
|
158
164
|
{% endif %}
|
|
159
165
|
</head>
|
|
@@ -143,9 +143,15 @@
|
|
|
143
143
|
text-align: center;
|
|
144
144
|
margin: 1.5em 0;
|
|
145
145
|
}
|
|
146
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
146
147
|
</style>
|
|
148
|
+
{% if has_code %}
|
|
149
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github-dark.min.css" integrity="sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH" crossorigin="anonymous">
|
|
150
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
151
|
+
<script>hljs.highlightAll();</script>
|
|
152
|
+
{% endif %}
|
|
147
153
|
{% if has_mermaid %}
|
|
148
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
154
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
149
155
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'dark' });</script>
|
|
150
156
|
{% endif %}
|
|
151
157
|
</head>
|
|
@@ -144,9 +144,15 @@
|
|
|
144
144
|
text-align: center;
|
|
145
145
|
margin: 1.5em 0;
|
|
146
146
|
}
|
|
147
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
147
148
|
</style>
|
|
149
|
+
{% if has_code %}
|
|
150
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github-dark.min.css" integrity="sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH" crossorigin="anonymous">
|
|
151
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
152
|
+
<script>hljs.highlightAll();</script>
|
|
153
|
+
{% endif %}
|
|
148
154
|
{% if has_mermaid %}
|
|
149
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
155
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
150
156
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'dark' });</script>
|
|
151
157
|
{% endif %}
|
|
152
158
|
</head>
|
|
@@ -124,9 +124,15 @@
|
|
|
124
124
|
text-align: center;
|
|
125
125
|
margin: 1.5em 0;
|
|
126
126
|
}
|
|
127
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
127
128
|
</style>
|
|
129
|
+
{% if has_code %}
|
|
130
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github.min.css" integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
|
|
131
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
132
|
+
<script>hljs.highlightAll();</script>
|
|
133
|
+
{% endif %}
|
|
128
134
|
{% if has_mermaid %}
|
|
129
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
135
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
130
136
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'default' });</script>
|
|
131
137
|
{% endif %}
|
|
132
138
|
</head>
|
|
@@ -125,9 +125,15 @@
|
|
|
125
125
|
text-align: center;
|
|
126
126
|
margin: 1.5em 0;
|
|
127
127
|
}
|
|
128
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
128
129
|
</style>
|
|
130
|
+
{% if has_code %}
|
|
131
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github.min.css" integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
|
|
132
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
133
|
+
<script>hljs.highlightAll();</script>
|
|
134
|
+
{% endif %}
|
|
129
135
|
{% if has_mermaid %}
|
|
130
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
136
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
131
137
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'default' });</script>
|
|
132
138
|
{% endif %}
|
|
133
139
|
</head>
|
|
@@ -224,10 +224,16 @@
|
|
|
224
224
|
|
|
225
225
|
/* ── Mermaid ────────────────────────────────────────────────── */
|
|
226
226
|
.mermaid { text-align: center; margin: 1.5em 0; }
|
|
227
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
227
228
|
</style>
|
|
228
|
-
<script src="https://
|
|
229
|
+
<script src="https://cdn.jsdelivr.net/npm/pagedjs@0.4.3/dist/paged.polyfill.js" integrity="sha384-JkjBt3FPbcQ3WBc3qp+maUIw8YLoZxNNj8H+tn73mljkC1ba8aEPWlgwfCRPpAxV" crossorigin="anonymous"></script>
|
|
230
|
+
{% if has_code %}
|
|
231
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github.min.css" integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
|
|
232
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
233
|
+
<script>hljs.highlightAll();</script>
|
|
234
|
+
{% endif %}
|
|
229
235
|
{% if has_mermaid %}
|
|
230
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
236
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
231
237
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'neutral' });</script>
|
|
232
238
|
{% endif %}
|
|
233
239
|
</head>
|
|
@@ -182,9 +182,15 @@
|
|
|
182
182
|
|
|
183
183
|
/* ── Mermaid ───────────────────────────────────────────────── */
|
|
184
184
|
.mermaid { text-align: center; margin: 1.5em 0; }
|
|
185
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
185
186
|
</style>
|
|
187
|
+
{% if has_code %}
|
|
188
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github.min.css" integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
|
|
189
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
190
|
+
<script>hljs.highlightAll();</script>
|
|
191
|
+
{% endif %}
|
|
186
192
|
{% if has_mermaid %}
|
|
187
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
193
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
188
194
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'neutral' });</script>
|
|
189
195
|
{% endif %}
|
|
190
196
|
</head>
|
|
@@ -182,9 +182,15 @@
|
|
|
182
182
|
|
|
183
183
|
/* ── Mermaid ───────────────────────────────────────────────── */
|
|
184
184
|
.mermaid { text-align: center; margin: 1.5em 0; }
|
|
185
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
185
186
|
</style>
|
|
187
|
+
{% if has_code %}
|
|
188
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github.min.css" integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
|
|
189
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
190
|
+
<script>hljs.highlightAll();</script>
|
|
191
|
+
{% endif %}
|
|
186
192
|
{% if has_mermaid %}
|
|
187
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
193
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
188
194
|
<script>mermaid.initialize({ startOnLoad: true, theme: 'neutral' });</script>
|
|
189
195
|
{% endif %}
|
|
190
196
|
</head>
|
|
@@ -8,9 +8,15 @@
|
|
|
8
8
|
table { border-collapse: collapse; }
|
|
9
9
|
th, td { border: 1px solid #999; padding: 0.3em 0.6em; }
|
|
10
10
|
th { background: #eee; }
|
|
11
|
+
pre code.hljs { background: transparent; padding: 0; }
|
|
11
12
|
</style>
|
|
13
|
+
{% if has_code %}
|
|
14
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/github.min.css" integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L" crossorigin="anonymous">
|
|
15
|
+
<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
|
|
16
|
+
<script>hljs.highlightAll();</script>
|
|
17
|
+
{% endif %}
|
|
12
18
|
{% if has_mermaid %}
|
|
13
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js" integrity="sha384-EOXBFmc3gx5mb+vn0vPvvGqACToJD24hhacX5Yx+8NUUQrHIle/Qi5Bg9o3zKwW2" crossorigin="anonymous"></script>
|
|
14
20
|
<script>mermaid.initialize({ startOnLoad: true });</script>
|
|
15
21
|
{% endif %}
|
|
16
22
|
</head>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mddoco
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Markdown to HTML/PDF document converter
|
|
5
|
+
Author-email: Phil Massyn <phil.massyn@icloud.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/massyn/mddoco
|
|
7
|
+
Project-URL: Repository, https://github.com/massyn/mddoco
|
|
8
|
+
Project-URL: Issues, https://github.com/massyn/mddoco/issues
|
|
5
9
|
Requires-Python: >=3.10
|
|
6
10
|
Description-Content-Type: text/markdown
|
|
7
11
|
License-File: LICENSE
|
|
@@ -20,6 +24,8 @@ Dynamic: license-file
|
|
|
20
24
|
|
|
21
25
|
A CLI tool that converts markdown files to a single HTML (or future PDF) document.
|
|
22
26
|
|
|
27
|
+
[](https://github.com/massyn/mddoco/actions/workflows/ci.yml)
|
|
28
|
+
 
|
|
23
29
|
## Installation
|
|
24
30
|
|
|
25
31
|
```bash
|
|
@@ -85,6 +91,24 @@ mddoco ./docs --title "My Project" --toc --output ./out
|
|
|
85
91
|
|
|
86
92
|
All matched markdown files are combined into a single HTML document in the output directory. The filename is derived from the input folder or file name.
|
|
87
93
|
|
|
94
|
+
## Examples
|
|
95
|
+
|
|
96
|
+
The [`examples/`](examples/) directory contains four runnable input folders, each
|
|
97
|
+
covering a different feature:
|
|
98
|
+
|
|
99
|
+
| Folder | Demonstrates |
|
|
100
|
+
|--------|--------------|
|
|
101
|
+
| [`examples/01_basic`](examples/01_basic) | Plain Markdown, file ordering, underscore-excluded files |
|
|
102
|
+
| [`examples/02_rich_content`](examples/02_rich_content) | Mermaid diagrams, syntax highlighting, `graph` charts |
|
|
103
|
+
| [`examples/03_themed_report`](examples/03_themed_report) | Themes and a table of contents |
|
|
104
|
+
| [`examples/04_jinja_data`](examples/04_jinja_data) | Jinja2 templates with JSON and CSV data files |
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
mddoco examples/03_themed_report --theme professional --title "Q3 Platform Review" --toc --output ./out
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
See [`examples/README.md`](examples/README.md) for the full list of commands.
|
|
111
|
+
|
|
88
112
|
## Jinja2 templates
|
|
89
113
|
|
|
90
114
|
Files ending in `.md.j2` are Jinja2 templates that produce Markdown. They are sorted alongside regular `.md` files (numeric prefixes such as `01_`, `02_` determine order) and converted through the same pipeline.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.0.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|