ascii-art-python 0.3.0__tar.gz → 1.0.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.
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/LICENSE +21 -21
- {ascii_art_python-0.3.0/ascii_art_python.egg-info → ascii_art_python-1.0.0}/PKG-INFO +276 -265
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/README.md +242 -231
- ascii_art_python-1.0.0/ascii_art_python/__init__.py +10 -0
- ascii_art_python-0.3.0/ascii_art_python/new_school.py → ascii_art_python-1.0.0/ascii_art_python/ascii_base.py +394 -383
- ascii_art_python-1.0.0/ascii_art_python/full_mode.py +45 -0
- ascii_art_python-1.0.0/ascii_art_python/new_skool.py +26 -0
- ascii_art_python-1.0.0/ascii_art_python/old_skool.py +38 -0
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0/ascii_art_python.egg-info}/PKG-INFO +276 -265
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/ascii_art_python.egg-info/SOURCES.txt +4 -1
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/pyproject.toml +56 -56
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/setup.cfg +4 -4
- ascii_art_python-0.3.0/ascii_art_python/__init__.py +0 -8
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/MANIFEST.in +0 -0
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/ascii_art_python/assets/fonts/GoogleSansCode-Regular.ttf +0 -0
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/ascii_art_python/assets/fonts/KreativeSquareSM.ttf +0 -0
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/ascii_art_python.egg-info/dependency_links.txt +0 -0
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/ascii_art_python.egg-info/requires.txt +0 -0
- {ascii_art_python-0.3.0 → ascii_art_python-1.0.0}/ascii_art_python.egg-info/top_level.txt +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Guillem Prieur
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Guillem Prieur
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,265 +1,276 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ascii_art_python
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: A Python library and CLI tool for converting images and videos into ASCII art.
|
|
5
|
-
Author-email: Guillem Prieur <prieurguillem38@gmail.com>
|
|
6
|
-
Project-URL: Homepage, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python
|
|
7
|
-
Project-URL: Bug Tracker, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python/-/issues
|
|
8
|
-
Project-URL: Source Code, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python
|
|
9
|
-
Keywords: ascii,ascii-art,image-to-ascii,video-to-ascii,cli,terminal,terminal-graphics,generator,converter
|
|
10
|
-
Classifier: Development Status ::
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
-
Classifier: Topic :: Multimedia :: Graphics
|
|
14
|
-
Classifier: Topic :: Multimedia :: Video
|
|
15
|
-
Classifier: Topic :: Terminals
|
|
16
|
-
Classifier: Environment :: Console
|
|
17
|
-
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
23
|
-
Classifier: Operating System :: OS Independent
|
|
24
|
-
Requires-Python: >=3.9
|
|
25
|
-
Description-Content-Type: text/markdown
|
|
26
|
-
License-File: LICENSE
|
|
27
|
-
Requires-Dist: pillow>=10.0.0
|
|
28
|
-
Requires-Dist: tqdm>=4.65.0
|
|
29
|
-
Requires-Dist: opencv-python-headless>=4.8.0
|
|
30
|
-
Requires-Dist: moviepy>=1.0.3
|
|
31
|
-
Requires-Dist: numpy>=1.24.0
|
|
32
|
-
Requires-Dist: importlib_resources; python_version < "3.10"
|
|
33
|
-
Dynamic: license-file
|
|
34
|
-
|
|
35
|
-
# ASCII Art Python 🎨 - Convert Images & Videos to Terminal Graphics
|
|
36
|
-
|
|
37
|
-
<div align="center">
|
|
38
|
-
|
|
39
|
-
[](https://pypi.org/project/ascii-art-python/)
|
|
40
|
-
[](https://pypi.org/project/ascii-art-python/)
|
|
41
|
-
[](https://pypi.org/project/ascii-art-python/)
|
|
42
|
-
[](https://opensource.org/licenses/MIT)
|
|
43
|
-
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
This module provides advanced tools for converting classic images and videos into ASCII Art. It allows exporting the results as text files, new images, or new videos (with or without audio), and even playing videos directly in your terminal.
|
|
47
|
-
|
|
48
|
-
## 👀 Examples
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
@@@@@@@@@@@@@@@@@@@@@@@@@@$&#{{{{{{{{{{{#&$@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
52
|
-
@@@@@@@@@@@@@@@@@@@@@&{*********{{{{{{{{{{{{{*{#@@@@@@@@@@@@@@@@@@@@@@
|
|
53
|
-
@@@@@@@@@@@@@@@@@@@#**********{{{{{{{{{{{{{{{{{{{{$@@@@@@@@@@@@@@@@@@@
|
|
54
|
-
@@@@@@@@@@@@@@@@@@#***{$@@@${*{{{{{{{{{{{{{{{{{{{{{&@@@@@@@@@@@@@@@@@@
|
|
55
|
-
@@@@@@@@@@@@@@@@@@{***&@@@@@&*{{{{{{{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
56
|
-
@@@@@@@@@@@@@@@@@@{***{$@@@${{{{{{{{{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
57
|
-
@@@@@@@@@@@@@@@@@@{***{****{{{{{{{{{{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
58
|
-
@@@@@@@@@@@@@@@@@@{*************{{{{{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
59
|
-
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
60
|
-
@@@@@@@@&#{{{{{{{{{{{{#############{{{{{{{{{{{{{{{{{@@;.:::.::=#@@@@@@
|
|
61
|
-
@@@@${********{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{@@;.::::::::.=@@@@
|
|
62
|
-
@@@{********{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{@@;.::::::::::.#@@
|
|
63
|
-
@$********{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{@@;.::::::::::::#@
|
|
64
|
-
@{******{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{@@;:::::::::::::;@
|
|
65
|
-
&*****{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{&@$:::::::::::::::{
|
|
66
|
-
{***{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{$@@=.::::::::::::::=
|
|
67
|
-
{*{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{#$@@@=.::::::::::::::::
|
|
68
|
-
{{{{{{{{{{{{{{{{{{{{{#$@@@@@@@@@@@@@@@@@@@@@@@@@@$=.::::::::::::::::::
|
|
69
|
-
{{{{{{{{{{{{{{{{{{#@@@@&*=;;;;;;;;;;;;;;;;;;;;:..:::::::::::::::::::::
|
|
70
|
-
{{{{{{{{{{{{{{{{{$@@#:........:::::::::::::::::::::::::::::::::::::::;
|
|
71
|
-
#*{{{{{{{{{{{{{{$@@:........:::::::::::::::::::::::::::::::::::::::::(
|
|
72
|
-
${{{{{{{{{{{{{{{@@=.......:::::::::::::::::::::::::::::::::::::::::::&
|
|
73
|
-
@#*{{{{{{{{{{{{{@$:.....::::::::::::::::::::::::::::::::::::::::::::*@
|
|
74
|
-
@@{{{{{{{{{{{{{{@$:...:::::::::::::::::::::::::::::::::::::::::::::(@@
|
|
75
|
-
@@@#*{{{{{{{{{{{@$:..:::::::::::::::::::::::::::::::::::::::::::::&@@@
|
|
76
|
-
@@@@@#{{{{{{{{{{@$:.:::::::::::::::.:::::::::::::::::::::::::::($@@@@@
|
|
77
|
-
@@@@@@@@@$$$$$$@@$:.:::::::::::::.=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
78
|
-
@@@@@@@@@@@@@@@@@$:.:::::::::::::::================*@@@@@@@@@@@@@@@@@@
|
|
79
|
-
@@@@@@@@@@@@@@@@@$:::::::::::::::::::::::::::::::::=@@@@@@@@@@@@@@@@@@
|
|
80
|
-
@@@@@@@@@@@@@@@@@$:::::::::::::::::::::::::({(:::::=@@@@@@@@@@@@@@@@@@
|
|
81
|
-
@@@@@@@@@@@@@@@@@$:::::::::::::::::::::::(@@@@@(:::=@@@@@@@@@@@@@@@@@@
|
|
82
|
-
@@@@@@@@@@@@@@@@@@;.:::::::::::::::::::::*@@@@@*:::=@@@@@@@@@@@@@@@@@@
|
|
83
|
-
@@@@@@@@@@@@@@@@@@$::::::::::::::::::::::::*#*:::::#@@@@@@@@@@@@@@@@@@
|
|
84
|
-
@@@@@@@@@@@@@@@@@@@@#:.::::::::::::::::::::::::::(@@@@@@@@@@@@@@@@@@@@
|
|
85
|
-
@@@@@@@@@@@@@@@@@@@@@@@$*;::::::::::::::::::;(#@@@@@@@@@@@@@@@@@@@@@@@
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-

|
|
89
|
-
|
|
90
|
-
## 🔧 Features
|
|
91
|
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
`aap.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
- `aap.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
- `
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
- `
|
|
146
|
-
- Description:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- `
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- `
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
- `
|
|
193
|
-
|
|
194
|
-
- `
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
#
|
|
213
|
-
my_image.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
)
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ascii_art_python
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A Python library and CLI tool for converting images and videos into ASCII art.
|
|
5
|
+
Author-email: Guillem Prieur <prieurguillem38@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python
|
|
7
|
+
Project-URL: Bug Tracker, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python/-/issues
|
|
8
|
+
Project-URL: Source Code, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python
|
|
9
|
+
Keywords: ascii,ascii-art,image-to-ascii,video-to-ascii,cli,terminal,terminal-graphics,generator,converter
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
14
|
+
Classifier: Topic :: Multimedia :: Video
|
|
15
|
+
Classifier: Topic :: Terminals
|
|
16
|
+
Classifier: Environment :: Console
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
23
|
+
Classifier: Operating System :: OS Independent
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: pillow>=10.0.0
|
|
28
|
+
Requires-Dist: tqdm>=4.65.0
|
|
29
|
+
Requires-Dist: opencv-python-headless>=4.8.0
|
|
30
|
+
Requires-Dist: moviepy>=1.0.3
|
|
31
|
+
Requires-Dist: numpy>=1.24.0
|
|
32
|
+
Requires-Dist: importlib_resources; python_version < "3.10"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# ASCII Art Python 🎨 - Convert Images & Videos to Terminal Graphics
|
|
36
|
+
|
|
37
|
+
<div align="center">
|
|
38
|
+
|
|
39
|
+
[](https://pypi.org/project/ascii-art-python/)
|
|
40
|
+
[](https://pypi.org/project/ascii-art-python/)
|
|
41
|
+
[](https://pypi.org/project/ascii-art-python/)
|
|
42
|
+
[](https://opensource.org/licenses/MIT)
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
This module provides advanced tools for converting classic images and videos into ASCII Art. It allows exporting the results as text files, new images, or new videos (with or without audio), and even playing videos directly in your terminal.
|
|
47
|
+
|
|
48
|
+
## 👀 Examples
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
@@@@@@@@@@@@@@@@@@@@@@@@@@$&#{{{{{{{{{{{#&$@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
52
|
+
@@@@@@@@@@@@@@@@@@@@@&{*********{{{{{{{{{{{{{*{#@@@@@@@@@@@@@@@@@@@@@@
|
|
53
|
+
@@@@@@@@@@@@@@@@@@@#**********{{{{{{{{{{{{{{{{{{{{$@@@@@@@@@@@@@@@@@@@
|
|
54
|
+
@@@@@@@@@@@@@@@@@@#***{$@@@${*{{{{{{{{{{{{{{{{{{{{{&@@@@@@@@@@@@@@@@@@
|
|
55
|
+
@@@@@@@@@@@@@@@@@@{***&@@@@@&*{{{{{{{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
56
|
+
@@@@@@@@@@@@@@@@@@{***{$@@@${{{{{{{{{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
57
|
+
@@@@@@@@@@@@@@@@@@{***{****{{{{{{{{{{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
58
|
+
@@@@@@@@@@@@@@@@@@{*************{{{{{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
59
|
+
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#{{{{{{{{{{{{{{{{@@@@@@@@@@@@@@@@@@
|
|
60
|
+
@@@@@@@@&#{{{{{{{{{{{{#############{{{{{{{{{{{{{{{{{@@;.:::.::=#@@@@@@
|
|
61
|
+
@@@@${********{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{@@;.::::::::.=@@@@
|
|
62
|
+
@@@{********{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{@@;.::::::::::.#@@
|
|
63
|
+
@$********{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{@@;.::::::::::::#@
|
|
64
|
+
@{******{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{@@;:::::::::::::;@
|
|
65
|
+
&*****{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{&@$:::::::::::::::{
|
|
66
|
+
{***{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{$@@=.::::::::::::::=
|
|
67
|
+
{*{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{#$@@@=.::::::::::::::::
|
|
68
|
+
{{{{{{{{{{{{{{{{{{{{{#$@@@@@@@@@@@@@@@@@@@@@@@@@@$=.::::::::::::::::::
|
|
69
|
+
{{{{{{{{{{{{{{{{{{#@@@@&*=;;;;;;;;;;;;;;;;;;;;:..:::::::::::::::::::::
|
|
70
|
+
{{{{{{{{{{{{{{{{{$@@#:........:::::::::::::::::::::::::::::::::::::::;
|
|
71
|
+
#*{{{{{{{{{{{{{{$@@:........:::::::::::::::::::::::::::::::::::::::::(
|
|
72
|
+
${{{{{{{{{{{{{{{@@=.......:::::::::::::::::::::::::::::::::::::::::::&
|
|
73
|
+
@#*{{{{{{{{{{{{{@$:.....::::::::::::::::::::::::::::::::::::::::::::*@
|
|
74
|
+
@@{{{{{{{{{{{{{{@$:...:::::::::::::::::::::::::::::::::::::::::::::(@@
|
|
75
|
+
@@@#*{{{{{{{{{{{@$:..:::::::::::::::::::::::::::::::::::::::::::::&@@@
|
|
76
|
+
@@@@@#{{{{{{{{{{@$:.:::::::::::::::.:::::::::::::::::::::::::::($@@@@@
|
|
77
|
+
@@@@@@@@@$$$$$$@@$:.:::::::::::::.=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
78
|
+
@@@@@@@@@@@@@@@@@$:.:::::::::::::::================*@@@@@@@@@@@@@@@@@@
|
|
79
|
+
@@@@@@@@@@@@@@@@@$:::::::::::::::::::::::::::::::::=@@@@@@@@@@@@@@@@@@
|
|
80
|
+
@@@@@@@@@@@@@@@@@$:::::::::::::::::::::::::({(:::::=@@@@@@@@@@@@@@@@@@
|
|
81
|
+
@@@@@@@@@@@@@@@@@$:::::::::::::::::::::::(@@@@@(:::=@@@@@@@@@@@@@@@@@@
|
|
82
|
+
@@@@@@@@@@@@@@@@@@;.:::::::::::::::::::::*@@@@@*:::=@@@@@@@@@@@@@@@@@@
|
|
83
|
+
@@@@@@@@@@@@@@@@@@$::::::::::::::::::::::::*#*:::::#@@@@@@@@@@@@@@@@@@
|
|
84
|
+
@@@@@@@@@@@@@@@@@@@@#:.::::::::::::::::::::::::::(@@@@@@@@@@@@@@@@@@@@
|
|
85
|
+
@@@@@@@@@@@@@@@@@@@@@@@$*;::::::::::::::::::;(#@@@@@@@@@@@@@@@@@@@@@@@
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
## 🔧 Features
|
|
91
|
+
|
|
92
|
+
- 3 Unique rendering modes: Density (`new_skool`), Edges (`old_skool`), and Hybrid (`full_mode`).
|
|
93
|
+
- Image to ASCII conversion.
|
|
94
|
+
- Video to ASCII animation with sound extraction.
|
|
95
|
+
- Play video directly in the terminal.
|
|
96
|
+
- Export to `.txt`, `.png`, `.mp4`, or `.avi`.
|
|
97
|
+
|
|
98
|
+
## 📦 Installation
|
|
99
|
+
|
|
100
|
+
You can install the module via pip:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
pip install ascii-art-python
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 🚀 Basic Usage
|
|
107
|
+
|
|
108
|
+
To use the module, import it as follows:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
import ascii_art_python as aap
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 🎨 The 3 Rendering Modes
|
|
115
|
+
|
|
116
|
+
- The module is split into three main rendering modes. You can access the `Image` and `Video` classes from any of these modes depending on the artistic style you want:
|
|
117
|
+
- `aap.new_skool`: The classic density-based ASCII art mapping pixel brightness to a gradient of characters.
|
|
118
|
+
- `aap.old_skool`: An edge-detection based ASCII style using Canny/Sobel filters to draw contours with line characters (`-`, `/`, `\`, `|`).
|
|
119
|
+
- `aap.full_mode`: A hybrid approach combining edge-detection for sharp contours and density-based characters for shading.
|
|
120
|
+
|
|
121
|
+
## 📚 API Reference
|
|
122
|
+
|
|
123
|
+
### 1. Enumerations (Enums)
|
|
124
|
+
|
|
125
|
+
These enumerations are used to define the export format or quality. They are located in the base module.
|
|
126
|
+
|
|
127
|
+
`aap.ascii_base.ExportType` : Defines the file type when exporting an image or a video.
|
|
128
|
+
|
|
129
|
+
- `aap.ascii_base.ExportType.IMAGE_FILE` (0): Exports as classic media (PNG image or MP4/AVI video).
|
|
130
|
+
|
|
131
|
+
- `aap.ascii_base.ExportType.TEXT_FILE` (1): Exports as a plain text file (.txt or .vid.txt).
|
|
132
|
+
|
|
133
|
+
`aap.ascii_base.VideoAscii.ExportQuality` : Defines the video compression quality (and the codec used) during export.
|
|
134
|
+
|
|
135
|
+
- `aap.ascii_base.VideoAscii.ExportQuality.LOW` (0): Low quality (mp4v codec, .mp4 format).
|
|
136
|
+
|
|
137
|
+
- `aap.ascii_base.VideoAscii.ExportQuality.HIGH` (1): High quality (FFV1 codec, .avi format).
|
|
138
|
+
|
|
139
|
+
### 2. Class `Image`
|
|
140
|
+
|
|
141
|
+
Manages the conversion and manipulation of a still image into ASCII art. Available in `new_skool`, `old_skool`, and `full_mode`.
|
|
142
|
+
|
|
143
|
+
#### Constructors
|
|
144
|
+
|
|
145
|
+
- `Image(image: PIL.Image.Image, max_size: int = 100_000, grid: list[str] = None)`
|
|
146
|
+
- Description: Initializes an instance from an image object of the PIL/Pillow library.
|
|
147
|
+
- Parameters:
|
|
148
|
+
- `image`: The source image (Pillow).
|
|
149
|
+
- `max_size`: The maximum size (number of pixels/characters) for the generated ASCII image.
|
|
150
|
+
- `grid`: The list of characters to use (from darkest to lightest). If None, uses the default grid. (Note: The `grid` parameter is not used in `old_skool` mode).
|
|
151
|
+
- `Image.from_path(path: str, max_size: int = 10_000, grid: list[str] = None) -> Image`
|
|
152
|
+
- Description: Convenient class method to instantiate directly from a file path.
|
|
153
|
+
- `Image.from_string(content: str, font_size: int) -> Image`
|
|
154
|
+
- Description: Convenient class method to instantiate directly from a character string.
|
|
155
|
+
|
|
156
|
+
#### Methods
|
|
157
|
+
|
|
158
|
+
- `to_list() -> list[str]`
|
|
159
|
+
- Description: Converts the image into a list of strings (one string per line).
|
|
160
|
+
- `to_image() -> PIL.Image.Image`
|
|
161
|
+
- Description: Generates and returns a new Pillow image where the ASCII has been drawn using a specific font (KreativeSquare.ttf by default).
|
|
162
|
+
- `export(filename: str = "mika_export", mode: ExportType = 0) -> None`
|
|
163
|
+
- Description: Exports the generated image to the disk.
|
|
164
|
+
- Parameters:
|
|
165
|
+
- `filename`: The target file name (without extension).
|
|
166
|
+
- `mode`: If ExportType.IMAGE_FILE, saves a .png. If `ExportType.TEXT_FILE`, saves a .txt.
|
|
167
|
+
|
|
168
|
+
### 3. Class VideoAscii
|
|
169
|
+
|
|
170
|
+
Manages the conversion of a complete video into an ASCII animation. Available in `new_skool`, `old_skool`, and `full_mode`.
|
|
171
|
+
|
|
172
|
+
#### Constructor
|
|
173
|
+
|
|
174
|
+
- `VideoAscii(path: str, fps: int = 10, frame_size: int = 12_000)`
|
|
175
|
+
- Description: Prepares a video for ASCII processing.
|
|
176
|
+
- Parameters:
|
|
177
|
+
- `path`: Path to the source video.
|
|
178
|
+
- `frame_size`: Maximum size of each processed frame.
|
|
179
|
+
- `fps`: Target frames per second for the ASCII render (maximum framerate).
|
|
180
|
+
|
|
181
|
+
#### Properties
|
|
182
|
+
|
|
183
|
+
- fps -> float: Retrieves the native FPS of the source video.
|
|
184
|
+
- size -> tuple[int, int]: Retrieves the dimensions (width, height) of the exported ASCII video.
|
|
185
|
+
|
|
186
|
+
#### Methods
|
|
187
|
+
|
|
188
|
+
- `export(filename: str = "mika_export", export_type: ExportType = 0, quality: ExportQuality = 0, sound: bool = False)`
|
|
189
|
+
- Description: Exports the processed video.
|
|
190
|
+
- Parameters:
|
|
191
|
+
- `filename`: The target file name (without extension).
|
|
192
|
+
- `export_type`: If `IMAGE_FILE`, generates a video. If `TEXT_FILE`, generates a custom animated text file (.vid.txt).
|
|
193
|
+
- `quality`: Determines the generated video codec if the export is a video file.
|
|
194
|
+
- `sound`: If True, extracts audio from the source and adds it to the final exported video.
|
|
195
|
+
- `print_in_terminal() -> None`
|
|
196
|
+
- Description: Plays the source video as an ASCII animation directly in the terminal console, respecting the framerate limit (max_fps).
|
|
197
|
+
|
|
198
|
+
#### Static Methods
|
|
199
|
+
|
|
200
|
+
- `VideoAscii.print_from_txt(txt: str)` (Accessible via `aap.ascii_base.Video.print_from_txt`)
|
|
201
|
+
- Description: Reads and displays in the terminal the content of a .vid.txt file previously generated by the export(export_type=ExportType.TEXT_FILE) method.
|
|
202
|
+
- `VideoAscii.transfer_audio(source_video_path: str, target_video_path: str, output_path: str)` (Accessible via `aap.ascii_base.Video.transfer_audio`)
|
|
203
|
+
- Description: Extracts audio from `source_video_path` and applies it to `target_video_path` to generate `output_path`.
|
|
204
|
+
|
|
205
|
+
## 💡 Usage Examples
|
|
206
|
+
|
|
207
|
+
### Example 1: Convert and Export an Image (Full Mode)
|
|
208
|
+
|
|
209
|
+
```python
|
|
210
|
+
import ascii_art_python as aap
|
|
211
|
+
|
|
212
|
+
# Create an object from a local file using the hybrid "full_mode"
|
|
213
|
+
my_image = aap.full_mode.Image.from_path("my_image.jpg", max_size=50_000)
|
|
214
|
+
|
|
215
|
+
# Display ASCII in the console
|
|
216
|
+
print(my_image)
|
|
217
|
+
|
|
218
|
+
# Export the ASCII image in text format (.txt)
|
|
219
|
+
my_image.export("text_result", mode=aap.ascii_base.ExportType.TEXT_FILE)
|
|
220
|
+
|
|
221
|
+
# Export the ASCII image as a new readable image (.png)
|
|
222
|
+
my_image.export("image_result", mode=aap.ascii_base.ExportType.IMAGE_FILE)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Example 2: Play a Video in the Terminal (Old Skool Mode)
|
|
226
|
+
|
|
227
|
+
```python
|
|
228
|
+
import ascii_art_python as aap
|
|
229
|
+
|
|
230
|
+
# Using "old_skool" for edge-detected contours
|
|
231
|
+
my_video = aap.old_skool.Video("my_video.mp4", frame_size=8_000, fps=15)
|
|
232
|
+
|
|
233
|
+
# Play the animation live in the terminal
|
|
234
|
+
my_video.print_in_terminal()
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Example 3: Convert a Video with Sound (New Skool Mode)
|
|
238
|
+
|
|
239
|
+
```python
|
|
240
|
+
import ascii_art_python as aap
|
|
241
|
+
|
|
242
|
+
# Using classic "new_skool" density
|
|
243
|
+
my_video = aap.new_skool.Video("my_video.mp4", frame_size=15_000, fps=24)
|
|
244
|
+
|
|
245
|
+
# Export the video with sound in MP4 format (Low Quality by default)
|
|
246
|
+
my_video.export(
|
|
247
|
+
filename="final_ascii_video",
|
|
248
|
+
export_type=aap.ascii_base.ExportType.IMAGE_FILE,
|
|
249
|
+
sound=True
|
|
250
|
+
)
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Example 4: Convert a text and print it in the Terminal (New Skool Mode)
|
|
254
|
+
|
|
255
|
+
```python
|
|
256
|
+
import ascii_art_python as aap
|
|
257
|
+
|
|
258
|
+
my_message = aap.new_skool.Image.from_string(
|
|
259
|
+
content="Hello, World!",
|
|
260
|
+
font_size=15
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
print(my_message)
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## ⚠️ Troubleshooting
|
|
267
|
+
|
|
268
|
+
### Important Note Regarding OpenCV Dependencies
|
|
269
|
+
|
|
270
|
+
This project uses **`opencv-python-headless`** for background image processing.
|
|
271
|
+
|
|
272
|
+
Please be aware that installing both `opencv-python` (the standard version with GUI features) and `opencv-python-headless` in the **same Python environment** will cause conflicts. Doing so may break OpenCV's display capabilities (such as `cv2.imshow()`) in your other projects.
|
|
273
|
+
|
|
274
|
+
**To avoid any issues, it is highly recommended to:**
|
|
275
|
+
- **Use a Virtual Environment:** Always install this project inside an isolated virtual environment (using `venv`, `conda`, or Docker).
|
|
276
|
+
- **Check Existing Packages:** If you are installing globally and already have `opencv-python` installed, please remove it first (`pip uninstall opencv-python`) before installing this project's requirements.
|