Metadata-Version: 2.1
Name: art
Version: 1.2
Summary: ASCII Art Library For Python
Home-page: https://github.com/sepandhaghighi/art
Author: Sepand Haghighi
Author-email: sepand@qpage.ir
License: MIT
Download-URL: https://github.com/sepandhaghighi/art/tarball/v1.2
Project-URL: Source, https://github.com/sepandhaghighi/art
Project-URL: Webpage, http://art.shaghighi.ir
Keywords: ascii art python3 python text font
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Text Processing :: Fonts
Classifier: Topic :: Text Editors
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Utilities
Classifier: Topic :: Multimedia
Classifier: Topic :: Printing
Requires-Python: >=2.7
Description-Content-Type: text/markdown
Requires-Dist: codecov (==2.0.15)
Requires-Dist: setuptools (==39.2.0)

ASCII art is also known as "computer text art".
    It involves the smart placement of typed special characters or
    letters to make a visual shape that is spread over multiple lines of text.
    Art is a Python lib for text converting to ASCII ART fancy.
<div align="center">
<pre>
      ___           ___                 
     /  /\         /  /\          ___   
    /  /::\       /  /::\        /  /\  
   /  /:/\:\     /  /:/\:\      /  /:/  
  /  /:/~/::\   /  /:/~/:/     /  /:/   
 /__/:/ /:/\:\ /__/:/ /:/___  /  /::\   
 \  \:\/:/__\/ \  \:\/:::::/ /__/:/\:\  
  \  \::/       \  \::/~~~~  \__\/  \:\ 
   \  \:\        \  \:\           \  \:\
    \  \:\        \  \:\           \__\/
     \__\/         \__\/                


</pre>
<a class="badge-align" href="https://www.codacy.com/app/sepand-haghighi/art?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=sepandhaghighi/art&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/405020450bc94088ad1450461831a587"/></a>


<a href="https://codecov.io/gh/sepandhaghighi/art">
  <img src="https://codecov.io/gh/sepandhaghighi/art/branch/master/graph/badge.svg" alt="Codecov" />
</a>
<a href="https://travis-ci.org/sepandhaghighi/art"><img src="https://travis-ci.org/sepandhaghighi/art.svg?branch=master"></a>
<a href="https://ci.appveyor.com/project/sepandhaghighi/art"><img src="https://ci.appveyor.com/api/projects/status/n350ntyjthc2gil3?svg=true"></a>	
<a href="https://badge.fury.io/py/art"><img src="https://badge.fury.io/py/art.svg" alt="PyPI version" height="18"></a>
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3" /></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/FontList.ipynb"><img src="https://img.shields.io/badge/Font-List-blue.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/ArtList.ipynb"><img src="https://img.shields.io/badge/Art-List-orange.svg"></a>
<a href="https://t.me/artlib_bot" target="__blank"><img src="https://img.shields.io/badge/Telegram-Bot-red.svg"></a>

</div>

----------

## Table of contents					
   * [Overview](https://github.com/sepandhaghighi/art#overview)
   * [Installation](https://github.com/sepandhaghighi/art/blob/master/INSTALL.md)
   * [Usage](https://github.com/sepandhaghighi/art#usage)
   		* [1-Line Art](https://github.com/sepandhaghighi/art#1-line-art)
   		* [ASCII Text](https://github.com/sepandhaghighi/art#ascii-text)
   		* [Typo-Tolerance](https://github.com/sepandhaghighi/art#typo-tolerance)
   		* [CLI](https://github.com/sepandhaghighi/art#cli)
   		* [Telegram Bot](https://github.com/sepandhaghighi/art#telegram-bot)
   		* [Screen Record](https://github.com/sepandhaghighi/art#screen-record)
   * [Issues & Bug Reports](https://github.com/sepandhaghighi/art#issues--bug-reports)
   * [Contribution](https://github.com/sepandhaghighi/art/blob/master/CONTRIBUTING.md)
   * [Reference](https://github.com/sepandhaghighi/art#reference)
   * [Authors](https://github.com/sepandhaghighi/art/blob/master/AUTHORS.md)
   * [License](https://github.com/sepandhaghighi/art#license)
   * [Donate](https://github.com/sepandhaghighi/art#donate-to-our-project)
   * [Changelog](https://github.com/sepandhaghighi/art/blob/master/CHANGELOG.md)

## Overview	
ASCII art is also known as "computer text art". It involves the smart placement of typed special characters or
letters to make a visual shape that is spread over multiple lines of text.

Art is a Python lib for text converting to ASCII ART fancy. ;-)

[![Downloads](http://pepy.tech/badge/art)](http://pepy.tech/count/art)
## Usage

### 1-Line Art
1. art					

This function return 1-line art as `str` in normal mode and raise `artError` in exception	
<pre>
>>> from art import *
>>> art_1=art("coffee") # return art as str in normal mode
>>> print(art_1)
c[_]
>>> art_2=art("woman",number=2) # return multiple art as str
>>> print(art_2)
▓⚗_⚗▓ ▓⚗_⚗▓ 
>>> art_3=art("love_you",number=1,text="test") # 2-part art
>>> print(art_3)
»-(¯`·.·´¯)->test<-(¯`·.·´¯)-« 
>>> art(22,number=1,text="") # raise artError
Traceback (most recent call last):
        ...
art.art.artError: artname shoud have str type

</pre>
2. aprint				

This function print 1-line art in normal mode (return None) and raise `artError` in exception
<pre>
>>> aprint("butterfly") # print art
Ƹ̵̡Ӝ̵̨̄Ʒ 
>>> aprint("happy") # print art
 ۜ\(סּںסּَ` )/ۜ
>>> aprint("love_you",number=1,text="test")  # 2-part art
»-(¯`·.·´¯)->test<-(¯`·.·´¯)-« 
>>> aprint("woman",number="22",text="") # raise artError
Traceback (most recent call last):
        ...
art.art.artError: number should have int type
</pre>
### ASCII Text
1. text2art				

This function return ascii text as `str` in normal mode and raise `artError` in exception
<pre>	
>>> Art=text2art("art") # Return ascii text (default font) and default chr_ignore=True 
>>> print(Art)
              _   
  __ _  _ __ | |_ 
 / _` || '__|| __|
| (_| || |   | |_ 
 \__,_||_|    \__|


>>> Art=text2art("art",font='block',chr_ignore=True) # Return ascii text with block font
>>> print(Art)


 .----------------.  .----------------.  .----------------.
| .--------------. || .--------------. || .--------------. |
| |      __      | || |  _______     | || |  _________   | |
| |     /  \     | || | |_   __ \    | || | |  _   _  |  | |
| |    / /\ \    | || |   | |__) |   | || | |_/ | | \_|  | |
| |   / ____ \   | || |   |  __ /    | || |     | |      | |
| | _/ /    \ \_ | || |  _| |  \ \_  | || |    _| |_     | |
| ||____|  |____|| || | |____| |___| | || |   |_____|    | |
| |              | || |              | || |              | |
| '--------------' || '--------------' || '--------------' |
 '----------------'  '----------------'  '----------------'

>>> text2art("seسسس",font=DEFAULT_FONT,chr_ignore=False) # raise artError in exception
Traceback (most recent call last):
        ...
art.art.artError: س is invalid 

</pre>
2. tprint				

This function print ascii text in normal mode (return None) and raise `artError` in exception
<pre>
>>> tprint("art") # print ascii text (default font) 
              _   
  __ _  _ __ | |_ 
 / _` || '__|| __|
| (_| || |   | |_ 
 \__,_||_|    \__|


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

 .----------------.  .----------------.  .----------------.
| .--------------. || .--------------. || .--------------. |
| |      __      | || |  _______     | || |  _________   | |
| |     /  \     | || | |_   __ \    | || | |  _   _  |  | |
| |    / /\ \    | || |   | |__) |   | || | |_/ | | \_|  | |
| |   / ____ \   | || |   |  __ /    | || |     | |      | |
| | _/ /    \ \_ | || |  _| |  \ \_  | || |    _| |_     | |
| ||____|  |____|| || | |____| |___| | || |   |_____|    | |
| |              | || |              | || |              | |
| '--------------' || '--------------' || '--------------' |
 '----------------'  '----------------'  '----------------'

>>> tprint('testسس')  # chr_ignore flag ==True (Default)
 _               _   
| |_   ___  ___ | |_ 
| __| / _ \/ __|| __|
| |_ |  __/\__ \| |_ 
 \__| \___||___/ \__|


>>> tprint('testسس',chr_ignore=False) # raise artError in exception 
Traceback (most recent call last):
       ...
art.art.artError: س is invalid
>>> tprint('''Lorem  # Multi-line print
ipsum 
dolor''', font="cybermedium")
_    ____ ____ ____ _  _    
|    |  | |__/ |___ |\/|    
|___ |__| |  \ |___ |  |    

_ ___  ____ _  _ _  _    
| |__] [__  |  | |\/|    
| |    ___] |__| |  |    

___  ____ _    ____ ____ 
|  \ |  | |    |  | |__/ 
|__/ |__| |___ |__| |  \ 


</pre>
3. tsave				

This function return `dict` in normal and exception mode
<pre>
>>> Response=tsave("art",filename="test.txt") # save ascii text in test.txt file with save message (print_status==True) # return dict
Saved! 
Filename: test.txt
>>> Response["Message"]
'OK'
>>> Response=tsave("art",filename="test.txt",print_status=False) # save ascii text in test.txt file without save message (print_status==False)
>>> Response["Message"]
'OK'
>>> Response["Status"]
True
>>> tsave(22,font=DEFAULT_FONT,filename="art",chr_ignore=True,print_status=True)
{'Status': False, 'Message': "'int' object has no attribute 'split'"}

</pre>
* Note : Functions error response updated in `Version 0.8`

<html>
<table>
	<tr>
		<td align="center">Function</td>
		<td align="center">Normal</td>
		<td align="center">Error</td>
	</tr>
	<tr>
		<td align="center">art</td>
		<td align="center">str</td>
		<td align="center">raise artError</td>
	</tr>
	<tr>
		<td align="center">aprint</td>
		<td align="center">None</td>
		<td align="center">raise artError</td>
	</tr>
	<tr>
		<td align="center">tprint</td>
		<td align="center">None</td>
		<td align="center">raise artError</td>
	</tr>
	<tr>
		<td align="center">tsave</td>
		<td align="center">{"Status":bool,"Message":str}</td>
		<td align="center">{"Status":bool,"Message":str}</td>
	</tr>
	<tr>
		<td align="center">text2art</td>
		<td align="center">str</td>
		<td align="center">raise artError</td>
	</tr>		
</table> 
</html>				

### Typo-Tolerance			
<a href="https://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein distance</a> used in this project. (>`Version 0.9`)

<pre>
>>> Art=art("loveyou",number=1,text="test") # correct --> art("love_you",number=1,text="test") (distance < 3)
>>> print(Art)
»-(¯`·.·´¯)->test<-(¯`·.·´¯)-« 
>>> aprint("happi")  # correct --> aprint("happy") (distance < 3)
 ۜ\(סּںסּَ` )/ۜ 
>>> Art=art("birds2222",number=1) # correct --> Art=art("birds",number=1) (distance > 3)
>>> print(Art)
Traceback (most recent call last):
	...
art.art.artError: Invalid art name
>>> aprint("happi231")  # correct --> aprint("happy") (distance > 3)
Traceback (most recent call last):
	...
art.art.artError: Invalid art name
>>> Art=text2art("test",font="black") # correct --> Art=text2art("test",font="block")
>>> print(Art)

 .----------------.  .----------------.  .----------------.  .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. |
| |  _________   | || |  _________   | || |    _______   | || |  _________   | |
| | |  _   _  |  | || | |_   ___  |  | || |   /  ___  |  | || | |  _   _  |  | |
| | |_/ | | \_|  | || |   | |_  \_|  | || |  |  (__ \_|  | || | |_/ | | \_|  | |
| |     | |      | || |   |  _|  _   | || |   '.___`-.   | || |     | |      | |
| |    _| |_     | || |  _| |___/ |  | || |  |`\____) |  | || |    _| |_     | |
| |   |_____|    | || | |_________|  | || |  |_______.'  | || |   |_____|    | |
| |              | || |              | || |              | || |              | |
| '--------------' || '--------------' || '--------------' || '--------------' |
 '----------------'  '----------------'  '----------------'  '----------------'

>>> tprint("test",font="cybermedum")   # correct --> tprint("test",font="cybermedium")
___ ____ ____ ___ 
 |  |___ [__   |  
 |  |___ ___]  |  


</pre>


### 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)`
- All  :  `python -m art all yourtext`

### Telegram Bot			

Just send your text to one of these bots. 👇👇👇👇		

<a href="https://t.me/artlib_bot" target="__blank"><img src="https://img.shields.io/badge/Telegram-Bot1-red.svg"></a>			

<a href="https://t.me/textart_robot" target="__blank"><img src="https://img.shields.io/badge/Telegram-Bot2-blue.svg"></a>

### Screen Record		


<div align="center">
<a href="https://asciinema.org/a/169325" target="_blank"><img src="https://asciinema.org/a/169325.png" /></a>
<p>Screen Record</p>
</div>

* [View Full Font List](https://github.com/sepandhaghighi/art/blob/master/FontList.ipynb "Full Font List")					
* [View Full Art List](https://github.com/sepandhaghighi/art/blob/master/ArtList.ipynb "Full Art List")

## Issues & Bug Reports			

Just fill an issue and describe it. I'll check it ASAP!							
or send an email to [sepand@qpage.ir](mailto:sepand@qpage.ir "sepand@qpage.ir"). 

## License

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsepandhaghighi%2Fart.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsepandhaghighi%2Fart?ref=badge_large)

## Reference    

1. [1 Line Art](http://1lineart.kulaone.com/#/)
2. [Text To ASCII](http://patorjk.com/software/taag/#p=display&f=Blocks&t=ART)

## Donate to our project

<h3>Bitcoin :</h3>					

```12Xm1qL4MXYWiY9sRMoa3VpfTfw6su3vNq```			



<h3>Payping (For Iranian citizens)</h3>

<a href="http://www.payping.net/sepandhaghighi" target="__blank"><img src="http://www.qpage.ir/images/payping.png" height=100px width=100px></a>	

<h3>Say Thanks! </h3>


<a href="https://saythanks.io/to/sepandhaghighi"><img src="https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg"></a>

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.2] - 2018-06-04
### Added
- 8 new fonts
	1. barbwire
	2. bigchief
	3. binary
	4. bubble
	5. calgphy2
	6. cygnet
	7. diamond
	8. eftifont
### Changed
- Test cases modified

## [1.1] - 2018-05-25
### Added
- 5 new fonts
	1. peaks
	2. pawp
	3. o8
	4. nipples
	5. maxfour
- 15 new 1-line art
	1. guitar
	2. rocket
	3. ghost
	4. hal
	5. cthulhu
	6. sat
	7. what
	8. king
	9. tron
	10. homer
	11. fox
	12. singing
	13. atish
	14. zable
	15. trumpet
- CLI description
### Changed
- README.md modified
- Test cases modified
- File name bug in UNIX fixed
- CHANGELOG.md modified

## [1.0] - 2018-05-20
### Added
- 15 new fonts										
	1. tinker-toy
	2. straight
	3. stampatello
	4. smslant
	5. smshadow
	6. smscript
	7. smkeyboard
	8. smisome1
	9. slscript
	10. slide
	11. sblood
	12. rozzo
	13. pyramid
	14. puffy
	15. pebbles
- Typo-Tolerance system
### Changed
- README.md modified
- Test cases modified

## [0.9] - 2018-05-08
### Added
- 10 new fonts			
	1. weird
	2. univers
	3. twopoint
	4. trek
	5. tombstone
	6. threepoint
	7. thick
	8. tanja
	9. swan
	10. stellar 

### Changed
- MANIFEST.in modified
- INSTALL.md modified

## [0.8] - 2018-03-13
### Added
- CHANGELOG

### Changed
- Functions error response
- README.md modified
- tsave function extension bug fixed
- text2art response bug fixed ("\r\n")
- setup file modified

## [0.7] - 2018-01-20
### Added
- 10 new fonts		
	1. acrobatic
	2. alligator
	3. alligator2
	4. block2
	5. caligraphy
	6. computer
	7. digital
	8. doh
	9. eftirobot
	10. graffiti

## [0.6] - 	2018-01-09
### Added
- all flag

## [0.5] - 2017-12-05
### Added
- 10 new fonts
	1. 3-d
	2. 3x5
	3. 5lineoblique
	4. alphabet
	5. banner3-D
	6. banner3
	7. banner4
	8. bell
	9. catwalk
	10. colossal

## [0.4] - 2017-11-11
### Added
- Telegram bot


### Changed
- Universal Text Format Added For Unix & Windows



## [0.3] - 	2017-10-28
### Added
- Save function (tsave)
- chr_ignore flag
- 10 new fonts
	1. banner
	2. avatar
	3. basic
	4. bulbhead
	5. chunky
	6. coinstak
	7. contessa
	8. contrast
	9. cyberlarge
	10. cybermedium
	11. doom
	12. dotmatrix
	13. drpepper
	14. epic
	15. fuzzy
	16. isometric1
	17. isometric2
	18. isometric3
	19. isometric4
	20. larry3d
	21. nancyj
	22. ogre
	23. rectangles
	24. roman
	25. rounded
	26. rowancap
	27. script
	28. serifcap
	29. shadow
	30. slant
	31. speed
	32. starwars
	33. stop
	34. thin
	35. usaflag
- overall_stat
### Changed
- Space bug fixed


## [0.2] - 	2017-10-10
### Added
- Standard font
### Changed
- Minor bugs fixed



### Changed
 - statistic_result to class_stat
 - params() to stat()

## [0.1] - 2017-10-04
### Added
- Block font
- 1-Line art
- CLI commands

[Unreleased]: https://github.com/sepandhaghighi/art/compare/v1.2...HEAD
[1.2]: https://github.com/sepandhaghighi/art/compare/v1.1...v1.2
[1.1]: https://github.com/sepandhaghighi/art/compare/v1.0...v1.1
[1.0]: https://github.com/sepandhaghighi/art/compare/v0.9...v1.0
[0.9]: https://github.com/sepandhaghighi/art/compare/v0.8...v0.9
[0.8]: https://github.com/sepandhaghighi/art/compare/v0.7...v0.8
[0.7]: https://github.com/sepandhaghighi/art/compare/v0.6...v0.7
[0.6]: https://github.com/sepandhaghighi/art/compare/v0.5...v0.6
[0.5]: https://github.com/sepandhaghighi/art/compare/v0.4...v0.5
[0.4]: https://github.com/sepandhaghighi/art/compare/v0.3...v0.4
[0.3]: https://github.com/sepandhaghighi/art/compare/v0.2...v0.3
[0.2]: https://github.com/sepandhaghighi/art/compare/v0.1...v0.2
[0.1]: https://github.com/sepandhaghighi/art/compare/1e238cd...v0.1





