Skip to content

Commit

Permalink
Merge pull request #6 from sepandhaghighi/dev
Browse files Browse the repository at this point in the history
Version 1.0
  • Loading branch information
sepandhaghighi authored May 20, 2018
2 parents 762a772 + 856d4f9 commit 05c142b
Show file tree
Hide file tree
Showing 9 changed files with 2,786 additions and 85 deletions.
2 changes: 1 addition & 1 deletion ArtList.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Version : 0.9"
"### Version : 1.0"
]
},
{
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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.0] - 2018-05-20
### Added
- 15 new fonts
- Typo-Tolerance system
### Changed
- README.md modified
- Test cases modified

## [0.9] - 2018-05-08
### Added
- 10 new fonts
Expand Down Expand Up @@ -74,7 +82,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- 1-Line art
- CLI commands

[Unreleased]: https://github.com/sepandhaghighi/art/compare/v0.9...HEAD
[Unreleased]: https://github.com/sepandhaghighi/art/compare/v1.0...HEAD
[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
Expand Down
136 changes: 128 additions & 8 deletions FontList.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Version : 0.9"
"### Version : 1.0"
]
},
{
Expand Down Expand Up @@ -134,13 +134,15 @@
" ## ## ## ## ## \n",
" ## ######## ###### ## \n",
"\n",
"banner3-D : \n",
" _ _ \n",
"| |_ ___ ___ | |_ \n",
"| __| / _ \\/ __|| __|\n",
"| |_ | __/\\__ \\| |_ \n",
" \\__| \\___||___/ \\__|\n",
" \n",
"banner3-d : \n",
"'########:'########::'######::'########:\n",
"... ##..:: ##.....::'##... ##:... ##..::\n",
"::: ##:::: ##::::::: ##:::..::::: ##::::\n",
"::: ##:::: ######:::. ######::::: ##::::\n",
"::: ##:::: ##...:::::..... ##:::: ##::::\n",
"::: ##:::: ##:::::::'##::: ##:::: ##::::\n",
"::: ##:::: ########:. ######::::: ##::::\n",
":::..:::::........:::......::::::..:::::\n",
"\n",
"banner4 : \n",
".########.########..######..########\n",
Expand Down Expand Up @@ -475,6 +477,33 @@
" \\__| \\___||___/ \\__|\n",
" \n",
"\n",
"pebbles : \n",
" \n",
" \n",
" O O \n",
" oOo oOo \n",
" o .oOo. .oOo o \n",
" O OooO' `Ooo. O \n",
" o O O o \n",
" `oO `OoO' `OoO' `oO \n",
" \n",
" \n",
"\n",
"puffy : \n",
" _ _ \n",
"( )_ ( )_ \n",
"| ,_) __ ___ | ,_)\n",
"| | /'__`\\/',__)| | \n",
"| |_ ( ___/\\__, \\| |_ \n",
"`\\__)`\\____)(____/`\\__)\n",
" \n",
" \n",
"\n",
"pyramid : \n",
" ^ ^ ^ ^ \n",
" /t\\ /e\\ /s\\ /t\\ \n",
"<___><___><___><___>\n",
"\n",
"rectangles : \n",
" \n",
" _ _ \n",
Expand Down Expand Up @@ -512,6 +541,23 @@
"dMP dMMMMMP VMMMP\" dMP \n",
" \n",
"\n",
"rozzo : \n",
" d8 d8 \n",
" d88 ,e e, dP\"Y d88 \n",
"d88888 d88 88b C88b d88888 \n",
" 888 888 , Y88D 888 \n",
" 888 \"YeeP\" d,dP 888 \n",
" \n",
" \n",
"\n",
"sblood : \n",
" @@@@@@@ @@@@@@@@ @@@@@@ @@@@@@@\n",
" @@! @@! !@@ @@! \n",
" @!! @!!!:! !@@!! @!! \n",
" !!: !!: !:! !!: \n",
" : : :: ::: ::.: : : \n",
" \n",
"\n",
"script : \n",
" \n",
" \n",
Expand Down Expand Up @@ -542,6 +588,57 @@
"\\__/ \\___/ /____/ \\__/ \n",
" \n",
"\n",
"slide : \n",
" #| #| \n",
"##HH| #H| #HH| ##HH| \n",
" #| ##HH| ##H| #| \n",
" #| ## H| #| \n",
" #H| #HH| ##H| #H| \n",
" \n",
"\n",
"slscript : \n",
" \n",
" _/_ _/_\n",
" / _ _ / \n",
"<__ </_/_)_<__ \n",
" \n",
" \n",
"\n",
"smisome1 : \n",
" ___ ___ ___ ___ \n",
" /\\ \\ /\\ \\ /\\ \\ /\\ \\ \n",
" \\:\\ \\ /::\\ \\ /::\\ \\ \\:\\ \\ \n",
" /::\\__\\ /::\\:\\__\\ /\\:\\:\\__\\ /::\\__\\\n",
" /:/\\/__/ \\:\\:\\/ / \\:\\:\\/__/ /:/\\/__/\n",
" \\/__/ \\:\\/ / \\::/ / \\/__/ \n",
" \\/__/ \\/__/ \n",
"\n",
"smkeyboard : \n",
" ____ ____ ____ ____ \n",
"||t ||||e ||||s ||||t ||\n",
"||__||||__||||__||||__||\n",
"|/__\\||/__\\||/__\\||/__\\|\n",
"\n",
"smscript : \n",
" \n",
"_|_ _ , _|_ \n",
" | |/ / \\_ | \n",
" |_/|_/ \\/ |_/\n",
" \n",
"\n",
"smshadow : \n",
" | | \n",
" _| -_) (_-< _| \n",
"\\__| \\___| ___/ \\__| \n",
" \n",
"\n",
"smslant : \n",
" __ __ \n",
" / /_ ___ ___ / /_\n",
"/ __// -_) (_-</ __/\n",
"\\__/ \\__/ /___/\\__/ \n",
" \n",
"\n",
"speed : \n",
"_____ _____ \n",
"__ /______ __________ /_\n",
Expand All @@ -550,6 +647,14 @@
"\\__/ \\___/ /____/ \\__/ \n",
" \n",
"\n",
"stampatello : \n",
". . \n",
"|- ,-. ,-. |- \n",
"| |-' `-. | \n",
"`' `-' `-' `' \n",
" \n",
" \n",
"\n",
"standard : \n",
" _ _ \n",
"| |_ ___ ___ | |_ \n",
Expand Down Expand Up @@ -586,6 +691,12 @@
" \\___) \\____)(___/ \\___)\n",
" \n",
"\n",
"straight : \n",
" \n",
"|_ _ _ |_ \n",
"|_ (- _) |_ \n",
" \n",
"\n",
"swan : \n",
" \n",
" \n",
Expand Down Expand Up @@ -627,6 +738,15 @@
" | (/__\\ | \n",
" \n",
"\n",
"tinker-toy : \n",
" o o \n",
" | | \n",
"-o- o-o o-o -o- \n",
" | |-' \\ | \n",
" o o-o o-o o \n",
" \n",
" \n",
"\n",
"tombstone : \n",
" ___ __, _, ___\n",
" | |_ (_ | \n",
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Installation

### Source Code
- Download [Version 0.9](https://github.com/sepandhaghighi/art/archive/v0.9.zip) or [Latest Source ](https://github.com/sepandhaghighi/art/archive/dev.zip)
- Download [Version 1.0](https://github.com/sepandhaghighi/art/archive/v1.0.zip) or [Latest Source ](https://github.com/sepandhaghighi/art/archive/dev.zip)
- `python3 setup.py install` or `python setup.py install` (Need root access)

### PyPI
Expand Down
105 changes: 84 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,39 @@
<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="FontList.ipynb"><img src="https://img.shields.io/badge/Font-List-blue.svg"></a>
<a href="ArtList.ipynb"><img src="https://img.shields.io/badge/Art-List-orange.svg"></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](#overview)
* [Installation](INSTALL.md)
* [Usage](#usage)
* [Issues & Bug Reports](#issues--bug-reports)
* [Contribution](CONTRIBUTING.md)
* [Reference](#reference)
* [Authors](AUTHORS.md)
* [License](#license)
* [Donate](#donate-to-our-project)
* [Changelog](CHANGELOG.md)

## Overview
Simple ASCII Art Library For Python
* [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
Expand All @@ -67,6 +77,7 @@ c[_]
Traceback (most recent call last):
...
art.art.artError: artname shoud have str type

</pre>
2. aprint

Expand Down Expand Up @@ -116,7 +127,8 @@ This function return ascii text as `str` in normal mode and raise `artError` in
>>> text2art("seسسس",font=DEFAULT_FONT,chr_ignore=False) # raise artError in exception
Traceback (most recent call last):
...
art.art.artError: س is invalid
art.art.artError: س is invalid

</pre>
2. tprint

Expand Down Expand Up @@ -171,6 +183,7 @@ ___ ____ _ ____ ____
| \ | | | | | |__/
|__/ |__| |___ |__| | \


</pre>
3. tsave

Expand Down Expand Up @@ -225,8 +238,50 @@ True
<td align="center">raise artError</td>
</tr>
</table>
</html>
</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`
Expand All @@ -236,16 +291,24 @@ True
- Save : `python -m art save yourtext fontname(optional)`
- All : `python -m art all yourtext`

### Telegram Bot
<a href="https://t.me/artlib_bot" target="__blank"><img src="https://img.shields.io/badge/Telegram-Bot-red.svg"></a>
### 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](FontList.ipynb "Full Font List")
* [View Full Art List](ArtList.ipynb "Full Art List")
* [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

Expand Down
Loading

0 comments on commit 05c142b

Please sign in to comment.