blurry-cli 0.22.2__tar.gz → 0.23.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.
Files changed (40) hide show
  1. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/PKG-INFO +2 -2
  2. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/__init__.py +2 -1
  3. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/async_typer.py +2 -1
  4. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/markdown/__init__.py +18 -16
  5. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/pyproject.toml +5 -5
  6. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/LICENSE +0 -0
  7. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/README.md +0 -0
  8. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/__main__.py +0 -0
  9. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/cli.py +0 -0
  10. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/commands/__init__.py +0 -0
  11. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/commands/clean.py +0 -0
  12. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/commands/init.py +0 -0
  13. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/commands/version.py +0 -0
  14. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/constants.py +0 -0
  15. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/file_processors/__init__.py +0 -0
  16. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/gather_file_data_by_directory.py +0 -0
  17. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/images.py +0 -0
  18. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/markdown/front_matter.py +0 -0
  19. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/markdown/renderer_functions/__init__.py +0 -0
  20. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/markdown/renderer_functions/render_video.py +0 -0
  21. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/open_graph.py +0 -0
  22. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/__init__.py +0 -0
  23. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/html_plugins/__init__.py +0 -0
  24. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/html_plugins/minify_html_plugin.py +0 -0
  25. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/jinja_plugins/__init__.py +0 -0
  26. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/jinja_plugins/blurry_image_extension.py +0 -0
  27. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/jinja_plugins/filters.py +0 -0
  28. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/markdown_plugins/__init__.py +0 -0
  29. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/markdown_plugins/container_plugin.py +0 -0
  30. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/markdown_plugins/punctuation_plugin.py +0 -0
  31. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/plugins/markdown_plugins/python_code_plugin.py +0 -0
  32. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/py.typed +0 -0
  33. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/runserver_handlers.py +0 -0
  34. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/schema_validation/__init__.py +0 -0
  35. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/schema_validation/models.py +0 -0
  36. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/settings.py +0 -0
  37. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/sitemap.py +0 -0
  38. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/templates.py +0 -0
  39. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/types.py +0 -0
  40. {blurry_cli-0.22.2 → blurry_cli-0.23.0}/blurry/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blurry-cli
3
- Version: 0.22.2
3
+ Version: 0.23.0
4
4
  Summary: A Mistune-based static site generator for Python
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -34,7 +34,7 @@ Requires-Dist: pydantic (>=2.10.5,<3.0.0)
34
34
  Requires-Dist: pymediainfo (>=7.0.1,<8.0.0)
35
35
  Requires-Dist: rich (>=13.9.4,<15.0.0)
36
36
  Requires-Dist: selectolax (>=0.3.27,<0.5.0)
37
- Requires-Dist: typer (>=0.15.1,<0.22.0)
37
+ Requires-Dist: typer (>=0.15.1,<0.25.0)
38
38
  Project-URL: Repository, https://github.com/blurry-dev/blurry
39
39
  Description-Content-Type: text/markdown
40
40
 
@@ -177,7 +177,8 @@ def runserver():
177
177
 
178
178
  SETTINGS["RUNSERVER"] = True
179
179
 
180
- event_loop = asyncio.get_event_loop()
180
+ event_loop = asyncio.new_event_loop()
181
+ asyncio.set_event_loop(event_loop)
181
182
  event_loop.create_task(build(release=False))
182
183
 
183
184
  jinja_env = get_jinja_env()
@@ -10,7 +10,8 @@ class AsyncTyper(Typer):
10
10
  # Convert async function to synchronous
11
11
  @wraps(async_func)
12
12
  def sync_func(*_args, **_kwargs):
13
- loop = asyncio.get_event_loop()
13
+ loop = asyncio.new_event_loop()
14
+ asyncio.set_event_loop(loop)
14
15
  return loop.run_until_complete(async_func(*_args, **_kwargs))
15
16
 
16
17
  # Register synchronous function
@@ -101,7 +101,6 @@ class BlurryRenderer(mistune.HTMLRenderer):
101
101
  return f"<img {attributes_str}>"
102
102
 
103
103
  image_widths = get_widths_for_image_width(image_width)
104
-
105
104
  sizes = generate_sizes_string(image_widths)
106
105
  # Use AVIF for all remaining images, except WEBP
107
106
  new_extension = "webp" if src.endswith(".webp") else "avif"
@@ -155,25 +154,28 @@ def is_blurry_renderer(
155
154
  return isinstance(renderer, BlurryRenderer)
156
155
 
157
156
 
158
- renderer = BlurryRenderer(escape=False)
159
- markdown = mistune.Markdown(
160
- renderer,
161
- # Ignoring types because the renderer is expecting markdown: Markdown rather than md: Markdown
162
- plugins=[ # type: ignore
163
- abbr,
164
- def_list,
165
- footnotes,
166
- strikethrough,
167
- table,
168
- task_lists,
169
- url,
170
- ]
171
- + [plugin.load() for plugin in discovered_markdown_plugins],
172
- )
157
+ def get_markdown_instance():
158
+ renderer = BlurryRenderer(escape=False)
159
+ markdown = mistune.Markdown(
160
+ renderer,
161
+ # Ignoring types because the renderer is expecting markdown: Markdown rather than md: Markdown
162
+ plugins=[ # type: ignore
163
+ abbr,
164
+ def_list,
165
+ footnotes,
166
+ strikethrough,
167
+ table,
168
+ task_lists,
169
+ url,
170
+ ]
171
+ + [plugin.load() for plugin in discovered_markdown_plugins],
172
+ )
173
+ return markdown
173
174
 
174
175
 
175
176
  def convert_markdown_file_to_html(filepath: Path) -> tuple[str, dict[str, Any]]:
176
177
  CONTENT_DIR = get_content_directory()
178
+ markdown = get_markdown_instance()
177
179
  if not markdown.renderer:
178
180
  raise Exception("Blurry markdown renderer not set on Mistune Markdown instance")
179
181
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "blurry-cli"
3
- version = "0.22.2"
3
+ version = "0.23.0"
4
4
  description = "A Mistune-based static site generator for Python"
5
5
  authors = ["John Franey <franey@duck.com>"]
6
6
  license = "MIT"
@@ -31,7 +31,7 @@ mistune = "^3.1.0"
31
31
  python = "^3.11"
32
32
  rich = ">=13.9.4,<15.0.0"
33
33
  selectolax = ">=0.3.27,<0.5.0"
34
- typer = ">=0.15.1,<0.22.0"
34
+ typer = ">=0.15.1,<0.25.0"
35
35
  htmlmin2 = "^0.1.13"
36
36
  dpath = "^2.2.0"
37
37
  jinja2-simple-tags = "^0.6.1"
@@ -47,12 +47,12 @@ blurry = 'blurry:main'
47
47
  optional = true
48
48
 
49
49
  [tool.poetry.group.dev.dependencies]
50
- black = ">=24.10,<26.0"
51
- nox = ">=2024.10.9,<2026.0.0"
50
+ black = ">=24.10,<27.0"
51
+ nox = ">=2024.10.9,<2027.0.0"
52
52
  pyright = "^1.1.391"
53
53
  pytest = ">=8.3.4,<10.0.0"
54
54
  pytest-cov = ">=6,<8"
55
- ruff = ">=0.8.6,<0.15.0"
55
+ ruff = ">=0.8.6,<0.16.0"
56
56
  pytest-watcher = ">=0.4.3,<0.7.0"
57
57
 
58
58
  [build-system]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes