从文本或图像生成ASCII艺术的库
asciistuff的Python项目详细描述
ASCII信息
这个库根据PyFiglet、Pillow和{a11}收集了一些有用的ASCII艺术特性。在
设置
pip install asciistuff
使用
横幅
创建横幅:
^{pr2}$图像
>>> from asciistuff import Image
>>> print(Image("hello.png", 80))
@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@(/,,,,,,/(@@@@@@@@@@ @@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@ @@@@@@(,.. .,*@@@@@@ @@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@* @@@@@/.. .,**((%%#####%((*/,. .,*@@@ @@@@@@@@@@@@@@
@@@@@@@@@@@@@@@* @@@/. ,/(%###%%(*//,,,,,//**%####%((/. .,@@@ @@@@@@@@@@@@
@@@@@@@@@@@@@@ @@*. ,(###%(/,. .,/*(%##%, ,@@ @@@@@@@@@@@
@@@@@@@@@@@@ @@/. *#@#(/. ,(@#/ ./@ @@@@@@@@@@
@@@@@@@@@@@ @@. .(@#*. .(@%. ,@ @@@@@@@@@
@@@@@@@@@@ @/. *@#/ .#@/ .@ @@@@@@@@
@@@@@@@@@ @, .%@( /%. (@* ,@ @@@@@@@
@@@@@@@@ @, /@#, *#. (@, (@/ /@ @@@@@@
@@@@@@@ @, /@#. .. *@, *@, .#@. .(@ @@@@@
@@@@@@ @/ /@#. (@, ,@/ /@, /((/. .@%. ,@ @@@@@
@@@@@@ @. .#@, ,@* .@( ,@/ .%@(*#@/ %@. .@ @@@@@
@@@@@ @/ *@* ## ,%##* #% ,@* %@. %@, %@. .@ @@@@@
@@@@@ @. .##. (@(%##(, /#(.,@(. %# .@( .@( ,@* %@. ,@ @@@@@
@@@@@@@. /@( /@#/.,%@/ ,@(,*(#@( (@. ## .@( %@. ## ,@ @@@@@
@@@@@@@. /@( .@% #@. #@#%(/,. /@, (@. %@/./#@/ .@% /@ @@@@@
@@@@@@@. ,@( ## /@* @% /@/ *@/ .(###(. *@/ .%@ @@@@@
@@@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@@@@@@@@@@@@@ @* /@@@%. .,@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @. .@@#/ .*@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@. ,%* .,@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @, .%@ *@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*,*%@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
引用
>>> from asciistuff import AsciiQuote
>>> print(AsciiQuote("This is a nice quote", "me"))
"This is a nice quote",
me
>>> from asciistuff import Quote
>>> print(Quote("This is another nice quote", "John Doe", cowsay="random"))
_______________________________
/ "This is another nice quote", \
\ John Doe /
-------------------------------
\
\
^__^ /
(oo)\_______/ _________
(__)\ )=( ____|_ \_____
||----w | \ \ \_____ |
|| || || ||
文件
from asciistuff import *
file = AsciiFile("test.asc")
- 项目
标签: