Skip to content

Commit

Permalink
Merge pull request #28 from sepandhaghighi/dev
Browse files Browse the repository at this point in the history
Version 2.8
  • Loading branch information
sepandhaghighi authored Dec 31, 2018
2 parents 8efbff2 + f90859a commit 4f2cc0b
Show file tree
Hide file tree
Showing 11 changed files with 4,335 additions and 1,692 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 : 2.7"
"### Version : 2.8"
]
},
{
Expand Down
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,36 @@ 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]
## [2.8] - 2019-01-01
### Added
- 20 new fonts
1. zone7
2. zig_zag
3. yie_ar_k
4. yie-ar
5. xtty
6. war_of_w
7. vortron
8. utopia
9. utopiai
10. utopiabi
11. utopiab
12. usa_pq
13. usa
14. unarmed
15. ugalympi
16. ucf_fan
17. type_set
18. twin_cob
19. tsn_base
20. z-pilot
- `rnd-small` mode
- `rnd-medium` mode
- `rnd-large` mode
- `rnd-xlarge` mode
### Changed
- `README.md` modified

## [2.7] - 2018-12-23
### Added
- 30 new fonts
Expand Down Expand Up @@ -38,7 +68,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
28. beer_pub
29. c1
30. c2
- `art_profile.py` added
- `art_profile.py`
### Changed
- docstring modified
- `B1FF` font bug fixed
Expand Down Expand Up @@ -645,7 +675,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/v2.7...HEAD
[Unreleased]: https://github.com/sepandhaghighi/art/compare/v2.8...HEAD
[2.8]: https://github.com/sepandhaghighi/art/compare/v2.7...v2.8
[2.7]: https://github.com/sepandhaghighi/art/compare/v2.6...v2.7
[2.6]: https://github.com/sepandhaghighi/art/compare/v2.5...v2.6
[2.5]: https://github.com/sepandhaghighi/art/compare/v2.4...v2.5
Expand Down
3,467 changes: 1,841 additions & 1,626 deletions FontList.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Installation

### Source Code
- Download [Version 2.7](https://github.com/sepandhaghighi/art/archive/v2.7.zip) or [Latest Source ](https://github.com/sepandhaghighi/art/archive/dev.zip)
- Download [Version 2.8](https://github.com/sepandhaghighi/art/archive/v2.8.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


- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
- `pip install art==2.7` or `pip3 install art==2.7` (Need root access)
- `pip install art==2.8` or `pip3 install art==2.8` (Need root access)

* Note : On `--upgrade` error install latest version of `setuptools` : `pip install setuptools` and retry

Expand All @@ -19,4 +19,4 @@

### Easy Install

- Run `easy_install "art==2.7"` (Need root access)
- Run `easy_install "art==2.8"` (Need root access)
174 changes: 158 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
|_| |_| |_| \_\ |_|

</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://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-300-blue.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/FontList.ipynb"><img src="https://img.shields.io/badge/Font List-320-blue.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/ArtList.ipynb"><img src="https://img.shields.io/badge/Art List-250-orange.svg"></a>
<a href="https://t.me/artlib_bot" target="__blank"><img src="https://img.shields.io/badge/Telegram-Bot-red.svg"></a>
<a href="https://anaconda.org/sepandhaghighi/art"><img src="https://anaconda.org/sepandhaghighi/art/badges/version.svg"></a>
Expand All @@ -26,6 +25,7 @@
* [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)
* [Font Modes](https://github.com/sepandhaghighi/art#font-modes)
* [Typo-Tolerance](https://github.com/sepandhaghighi/art#typo-tolerance)
* [Set Defaults](https://github.com/sepandhaghighi/art#set-defaults)
* [CLI](https://github.com/sepandhaghighi/art#cli)
Expand Down Expand Up @@ -61,7 +61,7 @@ Art is a Python lib for text converting to ASCII ART fancy. ;-)
</tr>
<tr>
<td align="center">Font Counter</td>
<td align="center">300</td>
<td align="center">320</td>
</tr>
<tr>
<td align="center">1-Line-Art Counter</td>
Expand Down Expand Up @@ -89,14 +89,22 @@ Art is a Python lib for text converting to ASCII ART fancy. ;-)
</tr>
</table>

<table>
<tr>
<td align="center">Code Quality</td>
<td align="center"><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></td>
<td align="center"><a href="https://codebeat.co/projects/github-com-sepandhaghighi-art-dev"><img alt="codebeat badge" src="https://codebeat.co/badges/90e77325-a046-4cc5-9c3e-646c011a5b72" /></a></td>
</tr>
</table>



## Usage

### 1-Line Art
1. art
#### 1. art

This function return 1-line art as `str` in normal mode and raise `artError` in exception
This function return 1-line art as `str` in normal mode and raise `artError` in exception.
```pycon
>>> from art import *
>>> art_1=art("coffee") # return art as str in normal mode
Expand All @@ -118,9 +126,9 @@ Traceback (most recent call last):
art.art.artError: artname shoud have str type

```
2. aprint
#### 2. aprint

This function print 1-line art in normal mode (return None) and raise `artError` in exception
This function print 1-line art in normal mode (return None) and raise `artError` in exception.
```pycon
>>> aprint("butterfly") # print art
Ƹ̵̡Ӝ̵̨̄Ʒ
Expand All @@ -138,9 +146,9 @@ Traceback (most recent call last):
art.art.artError: number should have int type
```

3. randart
#### 3. randart

`randart` function is added in `Version 2.2` as `art("random")` shortcut
`randart` function is added in `Version 2.2` as `art("random")` shortcut.
```pycon
>>> randart()
'ዞᏜ℘℘Ꮍ ℬℹℛʈዞᗬᏜᎽ '
Expand All @@ -149,9 +157,9 @@ art.art.artError: number should have int type
```

### ASCII Text
1. text2art
#### 1. text2art

This function return ascii text as `str` in normal mode and raise `artError` in exception
This function return ascii text as `str` in normal mode and raise `artError` in exception.
```pycon
>>> Art=text2art("art") # Return ascii text (default font) and default chr_ignore=True
>>> print(Art)
Expand Down Expand Up @@ -194,11 +202,11 @@ ___ ____ ____ ___
Traceback (most recent call last):
...
art.art.artError: س is invalid

```
2. tprint
#### 2. tprint

This function print ascii text in normal mode (return None) and raise `artError` in exception
This function print ascii text in normal mode (return None) and raise `artError` in exception.
```pycon
>>> tprint("art") # print ascii text (default font)
_
Expand Down Expand Up @@ -261,9 +269,9 @@ ___ ____ _ ____ ____


```
3. tsave
#### 3. tsave

This function return `dict` in normal and exception mode
This function return `dict` in normal and exception mode.
```pycon
>>> Response=tsave("art",filename="test.txt") # save ascii text in test.txt file with save message (print_status==True) # return dict
Saved!
Expand All @@ -280,7 +288,141 @@ True

```

### Font Modes

These modes are available for `text2art`, `tprint` & `tsave`.

#### 1. Font Name
```pycon

>>> tprint("art",font="block",chr_ignore=True)

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

```

#### 2. Random

Randomly select from all fonts.

Keywords : `random`, `rand` & `rnd`

```pycon
>>> tprint("test",font="random")
| |
~|~/~/(~~|~
| \/__) |


```

#### 3. Random Small

Randomly select from small fonts.

Keywords : `rnd-small`, `random-small` & `rand-small`

* Note : New in `Version 2.8`

```pycon
>>> tprint("test",font="rnd-small")

_/ _ _ _/
/ (- _) /

```

#### 4. Random Medium

Randomly select from medium fonts.

Keywords : `rnd-medium`, `random-medium` & `rand-medium`

* Note : New in `Version 2.8`

```pycon
>>> tprint("test",font="rnd-medium")

, ,
|| ||
=||= _-_ _-_, =||=
|| || \\ ||_. ||
|| ||/ ~ || ||
\\, \\,/ ,-_- \\,


```

#### 5. Random Large

Randomly select from large fonts.

Keywords : `rnd-large`, `random-large` & `rand-large`

* Note : New in `Version 2.8`

```pycon
>>> tprint("test",font="rnd-large")

8888888 8888888888 8 8888888888 d888888o. 8888888 8888888888
8 8888 8 8888 .`8888:' `88. 8 8888
8 8888 8 8888 8.`8888. Y8 8 8888
8 8888 8 8888 `8.`8888. 8 8888
8 8888 8 888888888888 `8.`8888. 8 8888
8 8888 8 8888 `8.`8888. 8 8888
8 8888 8 8888 `8.`8888. 8 8888
8 8888 8 8888 8b `8.`8888. 8 8888
8 8888 8 8888 `8b. ;8.`8888 8 8888
8 8888 8 888888888888 `Y8888P ,88P' 8 8888


```

#### 6. Random XLarge

Randomly select from xlarge fonts.

Keywords : `rnd-xlarge`, `random-xlarge` & `rand-xlarge`

* Note : New in `Version 2.8`

```pycon
>>> tprint("test","rnd-xlarge")
_____ _____ _____ _____
/\ \ /\ \ /\ \ /\ \
/::\ \ /::\ \ /::\ \ /::\ \
\:::\ \ /::::\ \ /::::\ \ \:::\ \
\:::\ \ /::::::\ \ /::::::\ \ \:::\ \
\:::\ \ /:::/\:::\ \ /:::/\:::\ \ \:::\ \
\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ \:::\ \
/::::\ \ /::::\ \:::\ \ \:::\ \:::\ \ /::::\ \
/::::::\ \ /::::::\ \:::\ \ ___\:::\ \:::\ \ /::::::\ \
/:::/\:::\ \ /:::/\:::\ \:::\ \ /\ \:::\ \:::\ \ /:::/\:::\ \
/:::/ \:::\____\/:::/__\:::\ \:::\____\/::\ \:::\ \:::\____\ /:::/ \:::\____\
/:::/ \::/ /\:::\ \:::\ \::/ /\:::\ \:::\ \::/ / /:::/ \::/ /
/:::/ / \/____/ \:::\ \:::\ \/____/ \:::\ \:::\ \/____/ /:::/ / \/____/
/:::/ / \:::\ \:::\ \ \:::\ \:::\ \ /:::/ /
/:::/ / \:::\ \:::\____\ \:::\ \:::\____\ /:::/ /
\::/ / \:::\ \::/ / \:::\ /:::/ / \::/ /
\/____/ \:::\ \/____/ \:::\/:::/ / \/____/
\:::\ \ \::::::/ /
\:::\____\ \::::/ /
\::/ / \::/ /
\/____/ \/____/

```


### Typo-Tolerance
<a href="https://en.wikipedia.org/wiki/Levenshtein_distance">Levenshtein distance</a> used in this project. (`Version` >0.9)
Expand Down
13 changes: 1 addition & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,37 @@ environment:
matrix:
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.2"
PYTHON_ARCH: "32"

PYTHON_ARCH: "32"
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.2"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.5"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.5"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.0"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.0"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.0"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.0"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.4.6"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.4.6"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python33"
PYTHON_VERSION: "3.3.0"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python33"
PYTHON_VERSION: "3.3.0"
PYTHON_ARCH: "64"
Expand Down
Loading

0 comments on commit 4f2cc0b

Please sign in to comment.