mddoco 2.2.0__tar.gz → 2.2.1__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.
Files changed (40) hide show
  1. {mddoco-2.2.0/src/mddoco.egg-info → mddoco-2.2.1}/PKG-INFO +1 -1
  2. {mddoco-2.2.0 → mddoco-2.2.1}/pyproject.toml +1 -1
  3. mddoco-2.2.1/src/mddoco/__init__.py +1 -0
  4. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/renderer.py +5 -0
  5. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/_site_base.html +2 -0
  6. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/academic.html +5 -3
  7. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/dark.html +4 -2
  8. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/default.html +4 -2
  9. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/paged-professional.html +3 -7
  10. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/professional.html +5 -10
  11. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/vanilla.html +2 -0
  12. {mddoco-2.2.0 → mddoco-2.2.1/src/mddoco.egg-info}/PKG-INFO +1 -1
  13. {mddoco-2.2.0 → mddoco-2.2.1}/tests/test_preprocessor.py +1 -1
  14. mddoco-2.2.0/src/mddoco/__init__.py +0 -1
  15. {mddoco-2.2.0 → mddoco-2.2.1}/LICENSE +0 -0
  16. {mddoco-2.2.0 → mddoco-2.2.1}/README.md +0 -0
  17. {mddoco-2.2.0 → mddoco-2.2.1}/setup.cfg +0 -0
  18. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/cli.py +0 -0
  19. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/converter.py +0 -0
  20. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/graph.py +0 -0
  21. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/mermaid.py +0 -0
  22. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/pdf.py +0 -0
  23. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/preprocessor.py +0 -0
  24. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/scanner.py +0 -0
  25. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/academic-wide.html +0 -0
  26. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/dark-wide.html +0 -0
  27. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/default-wide.html +0 -0
  28. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/professional-wide.html +0 -0
  29. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/site-dark.html +0 -0
  30. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/site-professional.html +0 -0
  31. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/site-terminal.html +0 -0
  32. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/themes/site.html +0 -0
  33. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/toc.py +0 -0
  34. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco/writer.py +0 -0
  35. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco.egg-info/SOURCES.txt +0 -0
  36. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco.egg-info/dependency_links.txt +0 -0
  37. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco.egg-info/entry_points.txt +0 -0
  38. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco.egg-info/requires.txt +0 -0
  39. {mddoco-2.2.0 → mddoco-2.2.1}/src/mddoco.egg-info/top_level.txt +0 -0
  40. {mddoco-2.2.0 → mddoco-2.2.1}/tests/test_themes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mddoco
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Markdown to HTML/PDF document converter
5
5
  Author-email: Phil Massyn <phil.massyn@icloud.com>
6
6
  Project-URL: Homepage, https://github.com/massyn/mddoco
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "mddoco"
7
- version = "2.2.0"
7
+ version = "2.2.1"
8
8
  description = "Markdown to HTML/PDF document converter"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -0,0 +1 @@
1
+ __version__ = "2.2.1"
@@ -1,8 +1,11 @@
1
+ from datetime import datetime
1
2
  from importlib.resources import files
2
3
  from pathlib import Path
3
4
 
4
5
  from jinja2 import Environment, FileSystemLoader, Template, TemplateNotFound
5
6
 
7
+ from mddoco import __version__
8
+
6
9
 
7
10
  def load_theme(theme: str) -> Template:
8
11
  """Load a theme by built-in name or by path to an HTML template file."""
@@ -54,4 +57,6 @@ def render_html(
54
57
  sections=sections,
55
58
  has_mermaid=has_mermaid,
56
59
  has_code=has_code,
60
+ generator=f"mddoco {__version__}",
61
+ generated=datetime.now().astimezone().isoformat(timespec="seconds"),
57
62
  )
@@ -8,6 +8,8 @@
8
8
  in the theme_styles block. Screen-only, so PDF output is refused. -#}
9
9
  <meta charset="UTF-8">
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ {% if generator %}<meta name="generator" content="{{ generator }}">{% endif %}
12
+ {% if generated %}<meta name="date" content="{{ generated }}">{% endif %}
11
13
  <title>{{ title or "Documentation" }}</title>
12
14
  <style>
13
15
  :root {
@@ -3,6 +3,8 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ {% if generator %}<meta name="generator" content="{{ generator }}">{% endif %}
7
+ {% if generated %}<meta name="date" content="{{ generated }}">{% endif %}
6
8
  <title>{% if title %}{{ title }}{% else %}Document{% endif %}</title>
7
9
  <style>
8
10
  *, *::before, *::after { box-sizing: border-box; }
@@ -123,9 +125,8 @@
123
125
  .toc-block {
124
126
  border: 1px solid #ccc;
125
127
  padding: 1rem 1.5rem;
126
- margin: 1.5rem auto 2.5rem;
127
- display: table;
128
- min-width: 260px;
128
+ margin: 1.5rem 0 2.5rem;
129
+ display: block;
129
130
  font-size: 0.95em;
130
131
  }
131
132
  .toc-block ul {
@@ -135,6 +136,7 @@
135
136
  }
136
137
  .toc-block ul ul { padding-left: 1em; }
137
138
  .toc-block li { margin: 0.2em 0; }
139
+ .toc-block > ul > li > a { font-weight: 700; }
138
140
  .toc-block a { color: #111; font-size: 0.9em; text-decoration: none; }
139
141
  .toc-block a:hover { text-decoration: underline; }
140
142
 
@@ -3,6 +3,8 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ {% if generator %}<meta name="generator" content="{{ generator }}">{% endif %}
7
+ {% if generated %}<meta name="date" content="{{ generated }}">{% endif %}
6
8
  <title>{% if title %}{{ title }}{% else %}Document{% endif %}</title>
7
9
  <style>
8
10
  *, *::before, *::after { box-sizing: border-box; }
@@ -127,8 +129,7 @@
127
129
  border-radius: 6px;
128
130
  padding: 1rem 1.5rem;
129
131
  margin: 1.5rem 0 2.5rem;
130
- display: inline-block;
131
- min-width: 260px;
132
+ display: block;
132
133
  }
133
134
  .toc-block ul {
134
135
  margin: 0;
@@ -137,6 +138,7 @@
137
138
  }
138
139
  .toc-block ul ul { padding-left: 1em; }
139
140
  .toc-block li { margin: 0.2em 0; }
141
+ .toc-block > ul > li > a { font-weight: 700; }
140
142
  .toc-block a { color: var(--accent); font-size: 0.9em; }
141
143
 
142
144
  /* Mermaid diagrams */
@@ -3,6 +3,8 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ {% if generator %}<meta name="generator" content="{{ generator }}">{% endif %}
7
+ {% if generated %}<meta name="date" content="{{ generated }}">{% endif %}
6
8
  <title>{% if title %}{{ title }}{% else %}Document{% endif %}</title>
7
9
  <style>
8
10
  *, *::before, *::after { box-sizing: border-box; }
@@ -108,8 +110,7 @@
108
110
  border-radius: 6px;
109
111
  padding: 1rem 1.5rem;
110
112
  margin: 1.5rem 0 2.5rem;
111
- display: inline-block;
112
- min-width: 260px;
113
+ display: block;
113
114
  }
114
115
  .toc-block ul {
115
116
  margin: 0;
@@ -118,6 +119,7 @@
118
119
  }
119
120
  .toc-block ul ul { padding-left: 1em; }
120
121
  .toc-block li { margin: 0.2em 0; }
122
+ .toc-block > ul > li > a { font-weight: 700; }
121
123
  .toc-block a { color: #0366d6; font-size: 0.9em; }
122
124
 
123
125
  /* Mermaid diagrams */
@@ -3,6 +3,8 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ {% if generator %}<meta name="generator" content="{{ generator }}">{% endif %}
7
+ {% if generated %}<meta name="date" content="{{ generated }}">{% endif %}
6
8
  <title>{% if title %}{{ title }}{% else %}Document{% endif %}</title>
7
9
  <style>
8
10
  /* ── Paged Media: headers, footers, page size ───────────────── */
@@ -78,11 +80,6 @@
78
80
  /* Captured into the right-side running header on subsequent pages */
79
81
  string-set: doc-title content(text);
80
82
  }
81
- .doc-title-page .subtitle {
82
- font-size: 10pt;
83
- color: var(--muted);
84
- margin: 0;
85
- }
86
83
 
87
84
  /* ── Headings ───────────────────────────────────────────────── */
88
85
  /* Section h1s update the left-side running header */
@@ -201,7 +198,6 @@
201
198
  padding: 0.9rem 1.3rem;
202
199
  margin: 1.5rem 0 2.5rem;
203
200
  display: block;
204
- max-width: 340px;
205
201
  }
206
202
 
207
203
  /* Ensure page boxes render with a white background on screen */
@@ -211,6 +207,7 @@
211
207
  .toc-block ul { margin: 0; padding-left: 1.1em; list-style: none; }
212
208
  .toc-block ul ul { padding-left: 1em; }
213
209
  .toc-block li { margin: 0.2em 0; }
210
+ .toc-block > ul > li > a { font-weight: 700; }
214
211
  .toc-block a { color: var(--primary); font-size: 9pt; }
215
212
  .toc-block a:hover { color: var(--accent); }
216
213
 
@@ -258,7 +255,6 @@
258
255
  {% if title %}
259
256
  <div class="doc-title-page">
260
257
  <h1>{{ title }}</h1>
261
- <p class="subtitle">Generated by mddoco</p>
262
258
  </div>
263
259
  {% endif %}
264
260
 
@@ -3,6 +3,8 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ {% if generator %}<meta name="generator" content="{{ generator }}">{% endif %}
7
+ {% if generated %}<meta name="date" content="{{ generated }}">{% endif %}
6
8
  <title>{% if title %}{{ title }}{% else %}Document{% endif %}</title>
7
9
  <style>
8
10
  *, *::before, *::after { box-sizing: border-box; }
@@ -51,12 +53,6 @@
51
53
  color: #fff;
52
54
  border: none;
53
55
  }
54
- .doc-header .doc-subtitle {
55
- margin: 0.4rem 0 0;
56
- font-size: 0.9rem;
57
- opacity: 0.7;
58
- letter-spacing: 0.03em;
59
- }
60
56
 
61
57
  .content {
62
58
  padding: 2rem 3rem 3rem;
@@ -167,8 +163,7 @@
167
163
  border-radius: 0 4px 4px 0;
168
164
  padding: 1rem 1.5rem;
169
165
  margin: 1.5rem 0 2.5rem;
170
- display: inline-block;
171
- min-width: 280px;
166
+ display: block;
172
167
  }
173
168
  .toc-block ul {
174
169
  margin: 0;
@@ -177,6 +172,7 @@
177
172
  }
178
173
  .toc-block ul ul { padding-left: 1em; }
179
174
  .toc-block li { margin: 0.2em 0; }
175
+ .toc-block > ul > li > a { font-weight: 700; }
180
176
  .toc-block a { color: var(--primary); font-size: 0.9em; }
181
177
  .toc-block a:hover { color: var(--accent); }
182
178
 
@@ -193,7 +189,7 @@
193
189
  {% block variant_styles %}{% endblock %}
194
190
  </style>
195
191
  {% if has_code %}
196
- <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">
192
+ <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">
197
193
  <script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js" integrity="sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix" crossorigin="anonymous"></script>
198
194
  <script>hljs.highlightAll();</script>
199
195
  {% endif %}
@@ -208,7 +204,6 @@
208
204
  {% if title %}
209
205
  <header class="doc-header">
210
206
  <h1 class="doc-title">{{ title }}</h1>
211
- <p class="doc-subtitle">Generated by mddoco</p>
212
207
  </header>
213
208
  {% endif %}
214
209
 
@@ -3,6 +3,8 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ {% if generator %}<meta name="generator" content="{{ generator }}">{% endif %}
7
+ {% if generated %}<meta name="date" content="{{ generated }}">{% endif %}
6
8
  <title>{% if title %}{{ title }}{% else %}Document{% endif %}</title>
7
9
  <style>
8
10
  table { border-collapse: collapse; }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mddoco
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Markdown to HTML/PDF document converter
5
5
  Author-email: Phil Massyn <phil.massyn@icloud.com>
6
6
  Project-URL: Homepage, https://github.com/massyn/mddoco
@@ -14,7 +14,7 @@ from mddoco.preprocessor import (
14
14
 
15
15
 
16
16
  def test_version():
17
- assert mddoco.__version__ == "2.2.0"
17
+ assert mddoco.__version__ == "2.2.1"
18
18
 
19
19
 
20
20
  # --- _parse_csv_line ---
@@ -1 +0,0 @@
1
- __version__ = "2.2.0"
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