ascii-art-python 3.0.0b3__tar.gz → 3.0.0b4__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.
- {ascii_art_python-3.0.0b3/src/ascii_art_python.egg-info → ascii_art_python-3.0.0b4}/PKG-INFO +25 -12
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/README.md +24 -11
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/pyproject.toml +1 -1
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/cli.py +16 -16
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4/src/ascii_art_python.egg-info}/PKG-INFO +25 -12
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/LICENSE +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/MANIFEST.in +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/setup.cfg +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/__init__.py +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/_compat.py +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/ascii_base.py +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/assets/fonts/GoogleSansCode-Regular.ttf +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/assets/fonts/KreativeSquareSM.ttf +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/tools/__init__.py +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/tools/terminal.py +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/tools/youtube.py +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/SOURCES.txt +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/dependency_links.txt +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/entry_points.txt +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/requires.txt +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/top_level.txt +0 -0
- {ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/tests/test_ascii_base.py +0 -0
{ascii_art_python-3.0.0b3/src/ascii_art_python.egg-info → ascii_art_python-3.0.0b4}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ascii_art_python
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b4
|
|
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-3
|
|
@@ -134,6 +134,9 @@ aap-echo my_image.jpg
|
|
|
134
134
|
|
|
135
135
|
# Play a video with the 'old_skool' edges-only style
|
|
136
136
|
aap-echo my_video.mp4 -m old_skool
|
|
137
|
+
|
|
138
|
+
# Play a video with the 'old_skool' edges-only style from Youtube
|
|
139
|
+
aap-echo "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -m old_skool
|
|
137
140
|
```
|
|
138
141
|
|
|
139
142
|
|
|
@@ -176,22 +179,32 @@ video.export(filename="my_ascii_video", sound=True, old_skool=True, new_skool=Tr
|
|
|
176
179
|
```
|
|
177
180
|
|
|
178
181
|
|
|
179
|
-
##
|
|
180
|
-
|
|
181
|
-
- Python 3.9+
|
|
182
|
-
|
|
183
|
-
- `opencv-python`
|
|
184
|
-
|
|
185
|
-
- `numpy`
|
|
182
|
+
## Prerequisites
|
|
186
183
|
|
|
187
|
-
|
|
184
|
+
This program requires `ffmpeg` to process videos. Before using this script, make sure to install it on your system:
|
|
188
185
|
|
|
189
|
-
-
|
|
186
|
+
- macOS:
|
|
187
|
+
```bash
|
|
188
|
+
brew install ffmpeg
|
|
189
|
+
```
|
|
190
190
|
|
|
191
|
-
-
|
|
191
|
+
- Windows:
|
|
192
|
+
```powershell
|
|
193
|
+
winget install ffmpeg
|
|
194
|
+
# or
|
|
195
|
+
choco install ffmpeg
|
|
196
|
+
```
|
|
192
197
|
|
|
193
|
-
-
|
|
198
|
+
- Linux (Debian/Ubuntu):
|
|
199
|
+
```bash
|
|
200
|
+
sudo apt update && sudo apt install ffmpeg
|
|
201
|
+
```
|
|
194
202
|
|
|
203
|
+
- Linux (Fedora/Arch):
|
|
204
|
+
```bash
|
|
205
|
+
sudo dnf install ffmpeg # Fedora
|
|
206
|
+
sudo pacman -S ffmpeg # Arch Linux
|
|
207
|
+
```
|
|
195
208
|
|
|
196
209
|
## Full Documentation
|
|
197
210
|
|
|
@@ -92,6 +92,9 @@ aap-echo my_image.jpg
|
|
|
92
92
|
|
|
93
93
|
# Play a video with the 'old_skool' edges-only style
|
|
94
94
|
aap-echo my_video.mp4 -m old_skool
|
|
95
|
+
|
|
96
|
+
# Play a video with the 'old_skool' edges-only style from Youtube
|
|
97
|
+
aap-echo "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -m old_skool
|
|
95
98
|
```
|
|
96
99
|
|
|
97
100
|
|
|
@@ -134,22 +137,32 @@ video.export(filename="my_ascii_video", sound=True, old_skool=True, new_skool=Tr
|
|
|
134
137
|
```
|
|
135
138
|
|
|
136
139
|
|
|
137
|
-
##
|
|
138
|
-
|
|
139
|
-
- Python 3.9+
|
|
140
|
-
|
|
141
|
-
- `opencv-python`
|
|
142
|
-
|
|
143
|
-
- `numpy`
|
|
140
|
+
## Prerequisites
|
|
144
141
|
|
|
145
|
-
|
|
142
|
+
This program requires `ffmpeg` to process videos. Before using this script, make sure to install it on your system:
|
|
146
143
|
|
|
147
|
-
-
|
|
144
|
+
- macOS:
|
|
145
|
+
```bash
|
|
146
|
+
brew install ffmpeg
|
|
147
|
+
```
|
|
148
148
|
|
|
149
|
-
-
|
|
149
|
+
- Windows:
|
|
150
|
+
```powershell
|
|
151
|
+
winget install ffmpeg
|
|
152
|
+
# or
|
|
153
|
+
choco install ffmpeg
|
|
154
|
+
```
|
|
150
155
|
|
|
151
|
-
-
|
|
156
|
+
- Linux (Debian/Ubuntu):
|
|
157
|
+
```bash
|
|
158
|
+
sudo apt update && sudo apt install ffmpeg
|
|
159
|
+
```
|
|
152
160
|
|
|
161
|
+
- Linux (Fedora/Arch):
|
|
162
|
+
```bash
|
|
163
|
+
sudo dnf install ffmpeg # Fedora
|
|
164
|
+
sudo pacman -S ffmpeg # Arch Linux
|
|
165
|
+
```
|
|
153
166
|
|
|
154
167
|
## Full Documentation
|
|
155
168
|
|
|
@@ -34,7 +34,7 @@ def _get_media_type(source_path: str) -> str:
|
|
|
34
34
|
Returns
|
|
35
35
|
-------
|
|
36
36
|
str
|
|
37
|
-
|
|
37
|
+
The type of media ("image", "video", or "YouTube")
|
|
38
38
|
|
|
39
39
|
Raises
|
|
40
40
|
------
|
|
@@ -63,7 +63,7 @@ def _get_media_type(source_path: str) -> str:
|
|
|
63
63
|
raise click.ClickException(f"Error: Unsupported media type '{media_type}'.")
|
|
64
64
|
|
|
65
65
|
@click.command()
|
|
66
|
-
@click.argument("
|
|
66
|
+
@click.argument("source_uri", type=click.STRING)
|
|
67
67
|
@click.argument("target_filename", type=click.STRING)
|
|
68
68
|
@click.option(
|
|
69
69
|
"--width",
|
|
@@ -100,7 +100,7 @@ def _get_media_type(source_path: str) -> str:
|
|
|
100
100
|
help="If the file is a video, export it with or without audio."
|
|
101
101
|
)
|
|
102
102
|
def create_and_export(
|
|
103
|
-
|
|
103
|
+
source_uri: str,
|
|
104
104
|
target_filename: str,
|
|
105
105
|
width: Optional[int],
|
|
106
106
|
height: Optional[int],
|
|
@@ -114,19 +114,19 @@ def create_and_export(
|
|
|
114
114
|
Processes the input file located at SOURCE_PATH and exports the result
|
|
115
115
|
to TARGET_FILENAME with the specified settings.
|
|
116
116
|
"""
|
|
117
|
-
click.echo(f"▶ Converting '{
|
|
117
|
+
click.echo(f"▶ Converting '{source_uri}'...")
|
|
118
118
|
click.echo(f"▶ Settings: length=({width}, {height}), mode={mode}")
|
|
119
119
|
|
|
120
|
-
media_type = _get_media_type(
|
|
120
|
+
media_type = _get_media_type(source_uri)
|
|
121
121
|
click.echo(f"▶ Export type: {media_type}")
|
|
122
122
|
|
|
123
123
|
if media_type == "image":
|
|
124
|
-
image = Image.from_path(
|
|
124
|
+
image = Image.from_path(source_uri, height=height, width=width)
|
|
125
125
|
image.export(target_filename, font_size = fontsize, **MODES[mode])
|
|
126
126
|
click.echo("✓ Conversion complete!")
|
|
127
127
|
|
|
128
128
|
elif media_type == "video":
|
|
129
|
-
video = Video(
|
|
129
|
+
video = Video(source_uri, width=width, height=height)
|
|
130
130
|
click.echo(
|
|
131
131
|
f"Please note: You are about to export a video with the following settings: "
|
|
132
132
|
f"length=({video.width}, {video.height}) font_size={fontsize}"
|
|
@@ -147,9 +147,9 @@ def create_and_export(
|
|
|
147
147
|
)
|
|
148
148
|
click.confirm("Do you want to continue?", abort=True)
|
|
149
149
|
if height is None:
|
|
150
|
-
tools.youtube.export(
|
|
150
|
+
tools.youtube.export(source_uri, target_filename, sound = sound)
|
|
151
151
|
else:
|
|
152
|
-
tools.youtube.export(
|
|
152
|
+
tools.youtube.export(source_uri, target_filename, height, sound)
|
|
153
153
|
click.echo("✓ Conversion complete!")
|
|
154
154
|
if sound:
|
|
155
155
|
click.echo(f"✓ Your file is available here: {target_filename}_audio.mp4")
|
|
@@ -158,7 +158,7 @@ def create_and_export(
|
|
|
158
158
|
|
|
159
159
|
|
|
160
160
|
@click.command()
|
|
161
|
-
@click.argument("
|
|
161
|
+
@click.argument("source_uri", type=click.STRING)
|
|
162
162
|
@click.option(
|
|
163
163
|
"--mode",
|
|
164
164
|
"-m",
|
|
@@ -166,7 +166,7 @@ def create_and_export(
|
|
|
166
166
|
default="full_mode",
|
|
167
167
|
help="The ASCII generation mode to use."
|
|
168
168
|
)
|
|
169
|
-
def create_and_echo(
|
|
169
|
+
def create_and_echo(source_uri: str, mode: str) -> None:
|
|
170
170
|
"""
|
|
171
171
|
Creates and prints an ASCII art image or video in the terminal.
|
|
172
172
|
|
|
@@ -174,20 +174,20 @@ def create_and_echo(source_path: str, mode: str) -> None:
|
|
|
174
174
|
directly to the standard output.
|
|
175
175
|
"""
|
|
176
176
|
|
|
177
|
-
click.echo(f"▶ Converting '{
|
|
177
|
+
click.echo(f"▶ Converting '{source_uri}'...")
|
|
178
178
|
click.echo(f"▶ Settings: mode={mode}")
|
|
179
179
|
|
|
180
|
-
media_type = _get_media_type(
|
|
180
|
+
media_type = _get_media_type(source_uri)
|
|
181
181
|
click.echo(f"▶ Echo type: {media_type}")
|
|
182
182
|
|
|
183
183
|
if media_type == "image":
|
|
184
|
-
image = Image.from_path(
|
|
184
|
+
image = Image.from_path(source_uri)
|
|
185
185
|
|
|
186
186
|
click.echo(image.to_string(**MODES[mode], one_on_two = True))
|
|
187
187
|
click.echo("✓ Conversion complete!")
|
|
188
188
|
|
|
189
189
|
elif media_type == "video":
|
|
190
|
-
video = Video(
|
|
190
|
+
video = Video(source_uri, wanted_fps = 10)
|
|
191
191
|
|
|
192
192
|
click.clear()
|
|
193
193
|
video.print_in_terminal(**MODES[mode], func_print = tools.terminal.clean_print)
|
|
@@ -195,5 +195,5 @@ def create_and_echo(source_path: str, mode: str) -> None:
|
|
|
195
195
|
|
|
196
196
|
elif media_type == "youtube":
|
|
197
197
|
click.clear()
|
|
198
|
-
tools.youtube.echo(
|
|
198
|
+
tools.youtube.echo(source_uri, **MODES[mode], func_print = tools.terminal.clean_print)
|
|
199
199
|
click.echo("✓ Conversion complete!")
|
{ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4/src/ascii_art_python.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ascii_art_python
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b4
|
|
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-3
|
|
@@ -134,6 +134,9 @@ aap-echo my_image.jpg
|
|
|
134
134
|
|
|
135
135
|
# Play a video with the 'old_skool' edges-only style
|
|
136
136
|
aap-echo my_video.mp4 -m old_skool
|
|
137
|
+
|
|
138
|
+
# Play a video with the 'old_skool' edges-only style from Youtube
|
|
139
|
+
aap-echo "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -m old_skool
|
|
137
140
|
```
|
|
138
141
|
|
|
139
142
|
|
|
@@ -176,22 +179,32 @@ video.export(filename="my_ascii_video", sound=True, old_skool=True, new_skool=Tr
|
|
|
176
179
|
```
|
|
177
180
|
|
|
178
181
|
|
|
179
|
-
##
|
|
180
|
-
|
|
181
|
-
- Python 3.9+
|
|
182
|
-
|
|
183
|
-
- `opencv-python`
|
|
184
|
-
|
|
185
|
-
- `numpy`
|
|
182
|
+
## Prerequisites
|
|
186
183
|
|
|
187
|
-
|
|
184
|
+
This program requires `ffmpeg` to process videos. Before using this script, make sure to install it on your system:
|
|
188
185
|
|
|
189
|
-
-
|
|
186
|
+
- macOS:
|
|
187
|
+
```bash
|
|
188
|
+
brew install ffmpeg
|
|
189
|
+
```
|
|
190
190
|
|
|
191
|
-
-
|
|
191
|
+
- Windows:
|
|
192
|
+
```powershell
|
|
193
|
+
winget install ffmpeg
|
|
194
|
+
# or
|
|
195
|
+
choco install ffmpeg
|
|
196
|
+
```
|
|
192
197
|
|
|
193
|
-
-
|
|
198
|
+
- Linux (Debian/Ubuntu):
|
|
199
|
+
```bash
|
|
200
|
+
sudo apt update && sudo apt install ffmpeg
|
|
201
|
+
```
|
|
194
202
|
|
|
203
|
+
- Linux (Fedora/Arch):
|
|
204
|
+
```bash
|
|
205
|
+
sudo dnf install ffmpeg # Fedora
|
|
206
|
+
sudo pacman -S ffmpeg # Arch Linux
|
|
207
|
+
```
|
|
195
208
|
|
|
196
209
|
## Full Documentation
|
|
197
210
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/tools/__init__.py
RENAMED
|
File without changes
|
{ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python/tools/terminal.py
RENAMED
|
File without changes
|
|
File without changes
|
{ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{ascii_art_python-3.0.0b3 → ascii_art_python-3.0.0b4}/src/ascii_art_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|