blurry-cli 0.19.2__tar.gz → 0.20.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.19.2 → blurry_cli-0.20.0}/PKG-INFO +2 -2
  2. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/markdown/renderer_functions/render_video.py +11 -5
  3. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/pyproject.toml +2 -2
  4. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/LICENSE +0 -0
  5. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/README.md +0 -0
  6. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/__init__.py +0 -0
  7. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/__main__.py +0 -0
  8. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/async_typer.py +0 -0
  9. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/cli.py +0 -0
  10. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/commands/__init__.py +0 -0
  11. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/commands/clean.py +0 -0
  12. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/commands/init.py +0 -0
  13. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/commands/version.py +0 -0
  14. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/constants.py +0 -0
  15. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/file_processors/__init__.py +0 -0
  16. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/gather_file_data_by_directory.py +0 -0
  17. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/images.py +0 -0
  18. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/markdown/__init__.py +0 -0
  19. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/markdown/front_matter.py +0 -0
  20. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/markdown/renderer_functions/__init__.py +0 -0
  21. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/open_graph.py +0 -0
  22. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/__init__.py +0 -0
  23. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/html_plugins/__init__.py +0 -0
  24. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/html_plugins/minify_html_plugin.py +0 -0
  25. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/jinja_plugins/__init__.py +0 -0
  26. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/jinja_plugins/blurry_image_extension.py +0 -0
  27. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/jinja_plugins/filters.py +0 -0
  28. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/markdown_plugins/__init__.py +0 -0
  29. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/markdown_plugins/container_plugin.py +0 -0
  30. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/markdown_plugins/punctuation_plugin.py +0 -0
  31. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/plugins/markdown_plugins/python_code_plugin.py +0 -0
  32. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/py.typed +0 -0
  33. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/runserver_handlers.py +0 -0
  34. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/schema_validation/__init__.py +0 -0
  35. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/schema_validation/models.py +0 -0
  36. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/settings.py +0 -0
  37. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/sitemap.py +0 -0
  38. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/templates.py +0 -0
  39. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/types.py +0 -0
  40. {blurry_cli-0.19.2 → blurry_cli-0.20.0}/blurry/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blurry-cli
3
- Version: 0.19.2
3
+ Version: 0.20.0
4
4
  Summary: A Mistune-based static site generator for Python
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -24,7 +24,6 @@ Classifier: Topic :: Text Processing :: Markup :: Markdown
24
24
  Requires-Dist: Jinja2 (>=3.1.5,<4.0.0)
25
25
  Requires-Dist: PyLD (>=2.0.4,<3.0.0)
26
26
  Requires-Dist: dpath (>=2.2.0,<3.0.0)
27
- Requires-Dist: ffmpeg-python (>=0.2.0,<0.3.0)
28
27
  Requires-Dist: htmlmin2 (>=0.1.13,<0.2.0)
29
28
  Requires-Dist: jinja2-simple-tags (>=0.6.1,<0.7.0)
30
29
  Requires-Dist: jinjax (>=0.48,<0.62)
@@ -32,6 +31,7 @@ Requires-Dist: livereload (>=2.7.1,<3.0.0)
32
31
  Requires-Dist: mistune (>=3.1.0,<4.0.0)
33
32
  Requires-Dist: pillow (>=12.0.0,<13.0.0)
34
33
  Requires-Dist: pydantic (>=2.10.5,<3.0.0)
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.4.0)
37
37
  Requires-Dist: typer (>=0.15.1,<0.17.0)
@@ -1,14 +1,20 @@
1
1
  from pathlib import Path
2
2
 
3
- import ffmpeg
3
+ from pymediainfo import MediaInfo
4
4
  from mistune.util import escape
5
5
 
6
6
 
7
7
  def render_video(src: str, absolute_path: Path, extension: str, title: str | None):
8
- video_probe_output = ffmpeg.probe(absolute_path)
9
- video_info = video_probe_output["streams"][0]
10
- video_width = video_info["width"]
11
- video_height = video_info["height"]
8
+ media_info = MediaInfo.parse(absolute_path)
9
+ video_width = 0
10
+ video_height = 0
11
+ for track in media_info.tracks:
12
+ if track.track_type == "Video":
13
+ video_width = track.width
14
+ video_height = track.height
15
+
16
+ if 0 in {video_width, video_height}:
17
+ raise Exception("Video width and/or height undefined")
12
18
 
13
19
  video_attributes = {
14
20
  "height": video_height,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "blurry-cli"
3
- version = "0.19.2"
3
+ version = "0.20.0"
4
4
  description = "A Mistune-based static site generator for Python"
5
5
  authors = ["John Franey <franey@duck.com>"]
6
6
  license = "MIT"
@@ -26,7 +26,6 @@ packages = [{ include = "blurry" }]
26
26
  [tool.poetry.dependencies]
27
27
  Jinja2 = "^3.1.5"
28
28
  PyLD = "^2.0.4"
29
- ffmpeg-python = "^0.2.0"
30
29
  livereload = "^2.7.1"
31
30
  mistune = "^3.1.0"
32
31
  python = "^3.11"
@@ -39,6 +38,7 @@ jinja2-simple-tags = "^0.6.1"
39
38
  jinjax = ">=0.48,<0.62"
40
39
  pydantic = "^2.10.5"
41
40
  pillow = "^12.0.0"
41
+ pymediainfo = "^7.0.1"
42
42
 
43
43
  [tool.poetry.scripts]
44
44
  blurry = 'blurry:main'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes