ascii-art-python 0.2.2__tar.gz → 0.2.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ascii_art_python
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: A Python library and CLI tool for converting images and videos into ASCII art.
5
5
  Author-email: Guillem Prieur <prieurguillem38@gmail.com>
6
6
  Project-URL: Homepage, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python
@@ -29,6 +29,7 @@ Requires-Dist: tqdm>=4.65.0
29
29
  Requires-Dist: opencv-python-headless>=4.8.0
30
30
  Requires-Dist: moviepy>=1.0.3
31
31
  Requires-Dist: numpy>=1.24.0
32
+ Requires-Dist: importlib_resources; python_version < "3.10"
32
33
  Dynamic: license-file
33
34
 
34
35
  # ASCII Art Python 🎨 - Convert Images & Videos to Terminal Graphics
@@ -1,7 +1,11 @@
1
1
  """
2
2
  Contains all the tools needed to manage and convert images.
3
3
  """
4
- from importlib import resources
4
+ import sys
5
+ if sys.version_info < (3, 10):
6
+ import importlib_resources as resources
7
+ else:
8
+ from importlib import resources
5
9
  import math
6
10
  from enum import IntEnum
7
11
  from tqdm import tqdm
@@ -12,7 +16,7 @@ from moviepy import VideoFileClip
12
16
  import numpy
13
17
  import time
14
18
 
15
- FONT = resources.files("ascii_art_python.assets.fonts").joinpath("KreativeSquare.ttf")
19
+ FONT = resources.files("ascii_art_python.assets.fonts").joinpath("KreativeSquareSM.ttf")
16
20
  ASCII_CHARS: list[str] = ["@", "$", "&", "#", "{", "*", "(", "=", ";", ":", ".", " "]
17
21
 
18
22
  class ExportType(IntEnum):
@@ -83,7 +87,7 @@ class ImageAscii:
83
87
  The export format (text or image), default is 0 (IMAGE_FILE).
84
88
  """
85
89
  if mode:
86
- with open(f"{filename}.txt", "w", encoding="utf-8") as f:
90
+ with open(f"{filename}.txt", "w", encoding="ascii") as f:
87
91
  f.write(str(self))
88
92
  else:
89
93
  self.to_image().save(f"{filename}.png")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ascii_art_python
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: A Python library and CLI tool for converting images and videos into ASCII art.
5
5
  Author-email: Guillem Prieur <prieurguillem38@gmail.com>
6
6
  Project-URL: Homepage, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python
@@ -29,6 +29,7 @@ Requires-Dist: tqdm>=4.65.0
29
29
  Requires-Dist: opencv-python-headless>=4.8.0
30
30
  Requires-Dist: moviepy>=1.0.3
31
31
  Requires-Dist: numpy>=1.24.0
32
+ Requires-Dist: importlib_resources; python_version < "3.10"
32
33
  Dynamic: license-file
33
34
 
34
35
  # ASCII Art Python 🎨 - Convert Images & Videos to Terminal Graphics
@@ -10,4 +10,5 @@ ascii_art_python.egg-info/dependency_links.txt
10
10
  ascii_art_python.egg-info/requires.txt
11
11
  ascii_art_python.egg-info/top_level.txt
12
12
  ascii_art_python/assets/fonts/KreativeSquare.ttf
13
+ ascii_art_python/assets/fonts/KreativeSquareSM.ttf
13
14
  ascii_art_python/assets/fonts/OFL.txt
@@ -3,3 +3,6 @@ tqdm>=4.65.0
3
3
  opencv-python-headless>=4.8.0
4
4
  moviepy>=1.0.3
5
5
  numpy>=1.24.0
6
+
7
+ [:python_version < "3.10"]
8
+ importlib_resources
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ascii_art_python"
7
- version = "0.2.2"
7
+ version = "0.2.4"
8
8
  authors = [
9
9
  { name="Guillem Prieur", email="prieurguillem38@gmail.com" },
10
10
  ]
@@ -47,9 +47,10 @@ dependencies = [
47
47
  "opencv-python-headless>=4.8.0",
48
48
  "moviepy>=1.0.3",
49
49
  "numpy>=1.24.0",
50
+ "importlib_resources; python_version < '3.10'",
50
51
  ]
51
52
 
52
53
  [project.urls]
53
54
  "Homepage" = "https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python"
54
55
  "Bug Tracker" = "https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python/-/issues"
55
- "Source Code" = "https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python"
56
+ "Source Code" = "https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python"