Skip to content

Moduland/art

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

 .----------------.  .----------------.  .----------------.
| .--------------. || .--------------. || .--------------. |
| |      __      | || |  _______     | || |  _________   | |
| |     /  \     | || | |_   __ \    | || | |  _   _  |  | |
| |    / /\ \    | || |   | |__) |   | || | |_/ | | \_|  | |
| |   / ____ \   | || |   |  __ /    | || |     | |      | |
| | _/ /    \ \_ | || |  _| |  \ \_  | || |    _| |_     | |
| ||____|  |____|| || | |____| |___| | || |   |_____|    | |
| |              | || |              | || |              | |
| '--------------' || '--------------' || '--------------' |
 '----------------'  '----------------'  '----------------'
Codecov PyPI version built with Python3

Overview

Simple ASCII Art Library For Python

Installation

Source Code

PyPI

Usage

Library

>>> from art import *  #import art library
>>> aprint("butterfly") # print 1-line art
Ƹ̵̡Ӝ̵̨̄Ʒ 
>>> aprint("happy")
 ۜ\(סּںסּَ` )/ۜ 
>>> art_1=art("coffee") # return 1-line art
>>> print(art_1)
c[_] 
>>> tprint("art") # print ascii text (default font) 
              _   
  __ _  _ __ | |_ 
 / _` || '__|| __|
| (_| || |   | |_ 
 \__,_||_|    \__|
                  

>>> tprint("art",font="block") # print ascii text (block font)

 .----------------.  .----------------.  .----------------.
| .--------------. || .--------------. || .--------------. |
| |      __      | || |  _______     | || |  _________   | |
| |     /  \     | || | |_   __ \    | || | |  _   _  |  | |
| |    / /\ \    | || |   | |__) |   | || | |_/ | | \_|  | |
| |   / ____ \   | || |   |  __ /    | || |     | |      | |
| | _/ /    \ \_ | || |  _| |  \ \_  | || |    _| |_     | |
| ||____|  |____|| || | |____| |___| | || |   |_____|    | |
| |              | || |              | || |              | |
| '--------------' || '--------------' || '--------------' |
 '----------------'  '----------------'  '----------------'
>>> tsave("art",filename="test.txt") # save ascii text in test.txt file with save message (print_status==True)
Saved!
Filename: test.txt
>>> tsave("art",filename="test.txt",print_status=False) # save ascii text in test.txt file without save message (print_status==False)
>>> tsave("art") # save ascii text in art.txt
Saved!
Filename: art.txt
>>> tprint('testسس')  # chr_ignore flag ==True (Default)
 _               _   
| |_   ___  ___ | |_ 
| __| / _ \/ __|| __|
| |_ |  __/\__ \| |_ 
 \__| \___||___/ \__|
                     

>>> tprint('testسس',chr_ignore=False) # chr_ignore flag == False
[Error] Invalid Char!
>>> tprint('''Lorem  # Multi-line print
ipsum 
dolor''', font="cybermedium")
_    ____ ____ ____ _  _    
|    |  | |__/ |___ |\/|    
|___ |__| |  \ |___ |  |    
                            
_ ___  ____ _  _ _  _    
| |__] [__  |  | |\/|    
| |    ___] |__| |  |    
                         
___  ____ _    ____ ____ 
|  \ |  | |    |  | |__/ 
|__/ |__| |___ |__| |  \ 
                         

CLI

  • List of arts : python -m art list
  • List of fonts : python -m art fonts
  • Test : python -m art test
  • Text : python -m art text yourtext fontname(optional)
  • Shape : python -m art shape art_name
  • Save : python -m art save yourtext fontname(optional)

Screen Record

Issues & Bug Reports

Just fill an issue and describe it. I'll check it ASAP! or send an email to [email protected].

Contribution

You can fork the repository, improve or fix some part of it and then send the pull requests back if you want to see them here. I really appreciate that. ❤️

Remember to write a few tests for your code before sending pull requests.

License

Reference

  1. 1 Line Art
  2. Text To ASCII

Donate to our project

Bitcoin :

1XGr9qbZjBpUQJJSB6WtgBQbDTgrhPLPA

Payping (For Iranian citizens) :

About

🎨 Simple ASCII Art Library For Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%