blurry-cli 0.7.0__tar.gz → 0.7.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 (28) hide show
  1. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/PKG-INFO +2 -1
  2. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/sitemap.py +8 -4
  3. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/pyproject.toml +2 -1
  4. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/LICENSE +0 -0
  5. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/README.md +0 -0
  6. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/__init__.py +0 -0
  7. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/__main__.py +0 -0
  8. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/async_typer.py +0 -0
  9. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/cli.py +0 -0
  10. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/constants.py +0 -0
  11. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/images.py +0 -0
  12. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/markdown/__init__.py +0 -0
  13. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/markdown/front_matter.py +0 -0
  14. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/markdown/renderer_functions/__init__.py +0 -0
  15. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/markdown/renderer_functions/render_video.py +0 -0
  16. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/open_graph.py +0 -0
  17. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/plugins/__init__.py +0 -0
  18. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/plugins/html_plugins/__init__.py +0 -0
  19. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/plugins/html_plugins/minify_html_plugin.py +0 -0
  20. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/plugins/markdown_plugins/__init__.py +0 -0
  21. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/plugins/markdown_plugins/container_plugin.py +0 -0
  22. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/plugins/markdown_plugins/punctuation_plugin.py +0 -0
  23. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/plugins/markdown_plugins/python_code_plugin.py +0 -0
  24. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/py.typed +0 -0
  25. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/schema_validation.py +0 -0
  26. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/settings.py +0 -0
  27. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/types.py +0 -0
  28. {blurry_cli-0.7.0 → blurry_cli-0.7.1}/blurry/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: blurry-cli
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: A Mistune-based static site generator for Python
5
5
  Home-page: https://github.com/blurry-dev/blurry
6
6
  License: MIT
@@ -23,6 +23,7 @@ Classifier: Topic :: Text Processing :: Markup :: Markdown
23
23
  Requires-Dist: Jinja2 (>=3.0.0,<4.0.0)
24
24
  Requires-Dist: PyLD (>=2.0.3,<3.0.0)
25
25
  Requires-Dist: Wand (>=0.6.6,<0.7.0)
26
+ Requires-Dist: dpath (>=2.1.6,<3.0.0)
26
27
  Requires-Dist: ffmpeg-python (>=0.2.0,<0.3.0)
27
28
  Requires-Dist: htmlmin2 (>=0.1.13,<0.2.0)
28
29
  Requires-Dist: livereload (>=2.6.3,<3.0.0)
@@ -1,5 +1,7 @@
1
1
  from pathlib import Path
2
2
 
3
+ import dpath
4
+
3
5
  from blurry.settings import get_build_directory
4
6
  from blurry.types import MarkdownFileData
5
7
 
@@ -20,10 +22,12 @@ URL_TEMPLATE = " <url><loc>{url}</loc>{lastmod_tag}</url>"
20
22
  def generate_sitemap_for_file_data_list(file_data_list: list[MarkdownFileData]) -> str:
21
23
  sitemap_url_data = []
22
24
  for file_data in file_data_list:
23
- lastmod = file_data.front_matter.get(
24
- "dateModified"
25
- ) or file_data.front_matter.get("datePublished")
26
- lastmod_tag = f"<lastmod>{lastmod}</lastmod>" if lastmod else ""
25
+ lastmod = (
26
+ dpath.values(file_data.front_matter, "**/dateModified")
27
+ or dpath.values(file_data.front_matter, "**/datePublished")
28
+ or dpath.values(file_data.front_matter, "**/dateCreated")
29
+ )
30
+ lastmod_tag = f"<lastmod>{lastmod[0]}</lastmod>" if len(lastmod) else ""
27
31
  url = file_data.front_matter.get("url")
28
32
  sitemap_url_data.append({"lastmod_tag": lastmod_tag, "url": url})
29
33
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "blurry-cli"
3
- version = "0.7.0"
3
+ version = "0.7.1"
4
4
  description = "A Mistune-based static site generator for Python"
5
5
  authors = ["John Franey <franey@duck.com>"]
6
6
  license = "MIT"
@@ -36,6 +36,7 @@ toml = "^0.10.2"
36
36
  typer = "^0.6.1"
37
37
  htmlmin2 = "^0.1.13"
38
38
  pydantic2-schemaorg = "^0.1.1"
39
+ dpath = "^2.1.6"
39
40
 
40
41
  [tool.poetry.scripts]
41
42
  blurry = 'blurry:main'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes