decktile 0.2.1__tar.gz → 0.2.3__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 (56) hide show
  1. {decktile-0.2.1 → decktile-0.2.3}/PKG-INFO +22 -3
  2. {decktile-0.2.1 → decktile-0.2.3}/README.md +21 -2
  3. {decktile-0.2.1 → decktile-0.2.3}/pyproject.toml +1 -1
  4. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/cli.py +1 -1
  5. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/pdf.py +1 -1
  6. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/pdg.py +7 -6
  7. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/templates/base.css +18 -0
  8. {decktile-0.2.1 → decktile-0.2.3}/LICENSE +0 -0
  9. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/__init__.py +0 -0
  10. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/__main__.py +0 -0
  11. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/assets/lucide/VENDORED.md +0 -0
  12. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/assets/lucide/lucide.css +0 -0
  13. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/assets/lucide/lucide.ttf +0 -0
  14. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/parser/__init__.py +0 -0
  15. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/parser/ast.py +0 -0
  16. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/parser/markdown.py +0 -0
  17. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/plugins/cards.py +0 -0
  18. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/plugins/directives.py +0 -0
  19. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/plugins/fenced.py +0 -0
  20. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/plugins/layouts.py +0 -0
  21. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/plugins/lucide.py +0 -0
  22. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/plugins/lucide_font.py +0 -0
  23. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/__init__.py +0 -0
  24. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/html.py +0 -0
  25. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/ir.py +0 -0
  26. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/odf/__init__.py +0 -0
  27. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/odf/geometry.py +0 -0
  28. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/odf/shapes.py +0 -0
  29. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/odf/styles.py +0 -0
  30. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/odp.py +0 -0
  31. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/seaborn.py +0 -0
  32. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/templates/decktile.js +0 -0
  33. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/render/templates/shell.html +0 -0
  34. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/seaborn_styles/__init__.py +0 -0
  35. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/seaborn_styles/ossummit_europe.py +0 -0
  36. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/theme/__init__.py +0 -0
  37. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/theme/colors.py +0 -0
  38. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/theme/loader.py +0 -0
  39. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/theme/parser.py +0 -0
  40. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/themes/default.css +0 -0
  41. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/themes/kcd_vietnam.css +0 -0
  42. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/themes/kubecon_china.css +0 -0
  43. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/themes/kubecon_japan.css +0 -0
  44. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/themes/ossummit_europe.css +0 -0
  45. {decktile-0.2.1 → decktile-0.2.3}/src/decktile/themes/ossummit_korea.css +0 -0
  46. {decktile-0.2.1 → decktile-0.2.3}/tests/__init__.py +0 -0
  47. {decktile-0.2.1 → decktile-0.2.3}/tests/test_cli.py +0 -0
  48. {decktile-0.2.1 → decktile-0.2.3}/tests/test_geometry.py +0 -0
  49. {decktile-0.2.1 → decktile-0.2.3}/tests/test_html.py +0 -0
  50. {decktile-0.2.1 → decktile-0.2.3}/tests/test_ir.py +0 -0
  51. {decktile-0.2.1 → decktile-0.2.3}/tests/test_odf_shapes.py +0 -0
  52. {decktile-0.2.1 → decktile-0.2.3}/tests/test_odp.py +0 -0
  53. {decktile-0.2.1 → decktile-0.2.3}/tests/test_parser.py +0 -0
  54. {decktile-0.2.1 → decktile-0.2.3}/tests/test_pdg.py +0 -0
  55. {decktile-0.2.1 → decktile-0.2.3}/tests/test_seaborn_styles.py +0 -0
  56. {decktile-0.2.1 → decktile-0.2.3}/tests/test_video.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: decktile
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Markdown to designed slides: HTML, PDF and editable ODP
5
5
  Author-Email: Reza Jelveh <git@jelveh.me>
6
6
  License: GPL-3.0-or-later
@@ -97,7 +97,8 @@ pdm install -G plot # + seaborn/matplotlib for inline charts
97
97
  pdm run decktile slides.md # HTML + presenter view
98
98
  pdm run decktile slides.md --odp # + ODP (programmatic)
99
99
  pdm run decktile slides.md --image-odp # + ODP (screenshots from PDF)
100
- pdm run decktile slides.md --pdf # + PDF
100
+ pdm run decktile slides.md --pdf # + PDF (images compressed)
101
+ pdm run decktile slides.md --pdf --no-optimize-images # + PDF, full-resolution images
101
102
  pdm run decktile -w slides.md # watch and rebuild on changes
102
103
  pdm run decktile --odp -w slides.md # watch + ODP
103
104
  pdm run decktile --dist slides.md # HTML + all referenced assets as zip
@@ -402,6 +403,24 @@ slide's body font. Put a `css { … }` block inside the diagram to change anythi
402
403
  See predictygraph's [spec](https://github.com/predictygraph/predictygraph/blob/master/docs/SPEC.md)
403
404
  for the full syntax.
404
405
 
406
+ ### Animated diagrams
407
+
408
+ In the HTML deck, diagrams can move. PDF and ODP get a clean still frame of the
409
+ same diagram, so nothing extra is needed for print.
410
+
411
+ ````markdown
412
+ ```pdg
413
+ graph dir=TB
414
+ user "User" .green border=pulse
415
+ gpu "GPU pool" .yellow shape=cylinder border=glow
416
+ user -> gpu flow=forward "request"
417
+ ```
418
+ ````
419
+
420
+ - `flow=forward`, `reverse`, `both` or `auto`: dots travel along an edge. `flow-speed=0.8s` sets the pace.
421
+ - `border=pulse`, `march` or `glow`: the outline of a node or group breathes, crawls or glows. `border-speed=` sets the pace.
422
+ - Set them per edge or node, with `default edge flow=forward`, or in CSS: `edge.hot { flow: forward; }`.
423
+
405
424
  Wrap a diagram in `::: card {blueprint}` for an engineering-drawing look:
406
425
  blue grid card, light lines and text, translucent node fills, with the
407
426
  node classes as brighter accents. Works the same under any theme.
@@ -530,7 +549,7 @@ back to light mode on the next slide.
530
549
  ## Theming
531
550
 
532
551
  Colors, borders, and spacing use CSS custom properties. Override them via
533
- frontmatter `style:` block or a custom theme file. See [THEMING.md](docs/THEMING.md)
552
+ frontmatter `style:` block or a custom theme file. See [THEMING.md](docs/theming.md)
534
553
  for the full variable reference.
535
554
 
536
555
  ```yaml
@@ -68,7 +68,8 @@ pdm install -G plot # + seaborn/matplotlib for inline charts
68
68
  pdm run decktile slides.md # HTML + presenter view
69
69
  pdm run decktile slides.md --odp # + ODP (programmatic)
70
70
  pdm run decktile slides.md --image-odp # + ODP (screenshots from PDF)
71
- pdm run decktile slides.md --pdf # + PDF
71
+ pdm run decktile slides.md --pdf # + PDF (images compressed)
72
+ pdm run decktile slides.md --pdf --no-optimize-images # + PDF, full-resolution images
72
73
  pdm run decktile -w slides.md # watch and rebuild on changes
73
74
  pdm run decktile --odp -w slides.md # watch + ODP
74
75
  pdm run decktile --dist slides.md # HTML + all referenced assets as zip
@@ -373,6 +374,24 @@ slide's body font. Put a `css { … }` block inside the diagram to change anythi
373
374
  See predictygraph's [spec](https://github.com/predictygraph/predictygraph/blob/master/docs/SPEC.md)
374
375
  for the full syntax.
375
376
 
377
+ ### Animated diagrams
378
+
379
+ In the HTML deck, diagrams can move. PDF and ODP get a clean still frame of the
380
+ same diagram, so nothing extra is needed for print.
381
+
382
+ ````markdown
383
+ ```pdg
384
+ graph dir=TB
385
+ user "User" .green border=pulse
386
+ gpu "GPU pool" .yellow shape=cylinder border=glow
387
+ user -> gpu flow=forward "request"
388
+ ```
389
+ ````
390
+
391
+ - `flow=forward`, `reverse`, `both` or `auto`: dots travel along an edge. `flow-speed=0.8s` sets the pace.
392
+ - `border=pulse`, `march` or `glow`: the outline of a node or group breathes, crawls or glows. `border-speed=` sets the pace.
393
+ - Set them per edge or node, with `default edge flow=forward`, or in CSS: `edge.hot { flow: forward; }`.
394
+
376
395
  Wrap a diagram in `::: card {blueprint}` for an engineering-drawing look:
377
396
  blue grid card, light lines and text, translucent node fills, with the
378
397
  node classes as brighter accents. Works the same under any theme.
@@ -501,7 +520,7 @@ back to light mode on the next slide.
501
520
  ## Theming
502
521
 
503
522
  Colors, borders, and spacing use CSS custom properties. Override them via
504
- frontmatter `style:` block or a custom theme file. See [THEMING.md](docs/THEMING.md)
523
+ frontmatter `style:` block or a custom theme file. See [THEMING.md](docs/theming.md)
505
524
  for the full variable reference.
506
525
 
507
526
  ```yaml
@@ -23,7 +23,7 @@ dependencies = [
23
23
  ]
24
24
  requires-python = ">=3.11"
25
25
  readme = "README.md"
26
- version = "0.2.1"
26
+ version = "0.2.3"
27
27
 
28
28
  [project.license]
29
29
  text = "GPL-3.0-or-later"
@@ -24,7 +24,7 @@ def main(
24
24
  odp: bool = typer.Option(False, "--odp", help="Generate ODP (programmatic)"),
25
25
  image_odp: bool = typer.Option(False, "--image-odp", help="Generate ODP (PDF screenshots)"),
26
26
  dist: bool = typer.Option(False, "--dist", help="Package HTML + referenced assets into a zip"),
27
- optimize_images: bool = typer.Option(False, "--optimize-images/--no-optimize-images", help="Optimize images in PDF output (jpeg_quality=85, dpi=150)"),
27
+ optimize_images: bool = typer.Option(True, "--optimize-images/--no-optimize-images", help="Compress images in PDF output (jpeg_quality=85, dpi=150). On by default; --no-optimize-images keeps full-resolution images"),
28
28
  watch: bool = typer.Option(False, "-w", "--watch", help="Watch file and rebuild on changes"),
29
29
  debug: bool = typer.Option(False, "--debug", help="Dump AST + write debug CSS"),
30
30
  css: Optional[Path] = typer.Option(None, "--css", help="Custom CSS theme file (overrides default)"),
@@ -3,7 +3,7 @@
3
3
  from pathlib import Path
4
4
 
5
5
 
6
- def render(html_path: Path, output_path: Path, optimize_images: bool = False) -> None:
6
+ def render(html_path: Path, output_path: Path, optimize_images: bool = True) -> None:
7
7
  from weasyprint import HTML # lazy: needs system Pango, only for PDF/ODP output
8
8
 
9
9
  if optimize_images:
@@ -1,8 +1,8 @@
1
- """predictygraph renderer for decktile ```pdg blocks.
1
+ """predictygraph renderer for decktile ``pdg`` fenced blocks.
2
2
 
3
3
  The slide theme's body font and tag colours are passed to predictygraph as a
4
- stylesheet layered under the diagram's own css, so `node.green`, `node.cyan`,
5
- `node.yellow` and `node.red` match decktile cards and anything in the block wins.
4
+ stylesheet layered under the diagram's own css, so ``node.green``, ``node.cyan``,
5
+ ``node.yellow`` and ``node.red`` match decktile cards and anything in the block wins.
6
6
  """
7
7
 
8
8
  from __future__ import annotations
@@ -52,9 +52,10 @@ def render_pdg_svg(content: str, font_family: str = "", font_size: int = 0,
52
52
  blueprint: bool = False, animated: bool = False) -> str | None:
53
53
  """Render a predictygraph diagram to SVG, or None if it fails to parse.
54
54
 
55
- blueprint: palette for ``::: card {blueprint}`` (light lines, translucent fills).
56
- animated: keep predictygraph's SMIL animation (flow=, border=) for HTML.
57
- The default is a still frame, which PDF and ODP need.
55
+ ``blueprint`` uses the palette for ``::: card {blueprint}`` (light lines,
56
+ translucent fills). ``animated`` keeps predictygraph's SMIL animation
57
+ (``flow=``, ``border=``) for HTML; the default is a still frame, which PDF
58
+ and ODP need.
58
59
  """
59
60
  import predictygraph
60
61
 
@@ -259,6 +259,24 @@ LOGO_CSS
259
259
  .pdg-animated .pdg-still { display: block; }
260
260
  }
261
261
 
262
+ /* @row: put the following blocks side by side, sharing the width equally */
263
+ .row {
264
+ display: flex;
265
+ gap: 1.5em;
266
+ align-items: flex-start;
267
+ justify-content: center;
268
+ width: 100%;
269
+ }
270
+ .row > * {
271
+ flex: 1 1 0;
272
+ min-width: 0;
273
+ }
274
+ /* diagrams side by side keep one scale, so labels match across them */
275
+ .row .pdg-plot svg {
276
+ width: auto;
277
+ max-width: 100%;
278
+ }
279
+
262
280
  /* ---- ::: card {blueprint}: engineering-drawing panel for diagrams ----
263
281
  Theme-independent on purpose (same blue on light and dark slides); a
264
282
  ```pdg fence inside it renders with the matching blueprint palette
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