Skip to content

Commit

Permalink
Merge pull request #27 from sepandhaghighi/dev
Browse files Browse the repository at this point in the history
Version 2.7
  • Loading branch information
sepandhaghighi authored Dec 23, 2018
2 parents b4790ab + 0919438 commit 8efbff2
Show file tree
Hide file tree
Showing 13 changed files with 5,123 additions and 1,529 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ matrix:
- os: osx
language: generic
env: TOXENV=py27
- os: osx
language: generic
env: TOXENV=py26

install:
- pip install -r dev-requirements.txt
- python setup.py install

script:
- python -m art testcov
- python -m cProfile -s cumtime art_profile.py
after_success:
- codecov
14 changes: 7 additions & 7 deletions 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.6"
"### Version : 2.7"
]
},
{
Expand Down Expand Up @@ -78,18 +78,15 @@
"9/11 truth\n",
"✈__✈ █ █ ▄ \n",
"******************************\n",
"AK-47\n",
"︻┳デ═— \n",
"******************************\n",
"I kill you\n",
" ̿ ̿̿'̿̿\\̵͇̿̿\\=(•̪●)=/̵͇̿̿/'̿̿ ̿ ̿ \n",
"******************************\n",
"airplane1\n",
" ‛¯¯٭٭¯¯(▫▫)¯¯٭٭¯¯’ \n",
"******************************\n",
"airplane2\n",
"\n",
"******************************\n",
"ak-47\n",
"︻┳デ═— \n",
"******************************\n",
"angry\n",
" ლ(ಠ益ಠ)ლ \n",
"******************************\n",
Expand Down Expand Up @@ -405,6 +402,9 @@
"i dont care\n",
"╭∩╮(︶︿︶)╭∩╮ \n",
"******************************\n",
"i kill you\n",
" ̿ ̿̿'̿̿\\̵͇̿̿\\=(•̪●)=/̵͇̿̿/'̿̿ ̿ ̿ \n",
"******************************\n",
"inlove\n",
"(✿ ♥‿♥) \n",
"******************************\n",
Expand Down
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@ 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.7] - 2018-12-23
### Added
- 30 new fonts
1. heroboti
2. high_noo
3. hills
4. home_pak
5. house_of
6. hypa_bal
7. hyper
8. inc_raw
9. italics
10. kgames_i
11. kik_star
12. krak_out
13. 4x4_offr
14. 5x7
15. 5x8
16. 64f1
17. 6x10
18. 6x9
19. a_zooloo
20. asc
21. assalt_m
22. asslt_m
23. atc
24. atc_gran
25. battle_s
26. battlesh
27. baz_bil
28. beer_pub
29. c1
30. c2
- `art_profile.py` added
### Changed
- docstring modified
- `B1FF` font bug fixed
- `ICL-1900` font bug fixed
- `AK-47` 1-line art bug fixed
- `I kill you` 1-line art bug fixed

## [2.6] - 2018-12-05
### Added
- 20 new fonts
Expand Down Expand Up @@ -604,7 +645,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.6...HEAD
[Unreleased]: https://github.com/sepandhaghighi/art/compare/v2.7...HEAD
[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
[2.4]: https://github.com/sepandhaghighi/art/compare/v2.3...v2.4
Expand Down
3,224 changes: 1,763 additions & 1,461 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.6](https://github.com/sepandhaghighi/art/archive/v2.6.zip) or [Latest Source ](https://github.com/sepandhaghighi/art/archive/dev.zip)
- Download [Version 2.7](https://github.com/sepandhaghighi/art/archive/v2.7.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.6` or `pip3 install art==2.6` (Need root access)
- `pip install art==2.7` or `pip3 install art==2.7` (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.6"` (Need root access)
- Run `easy_install "art==2.7"` (Need root access)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</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-270-blue.svg"></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/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 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">270</td>
<td align="center">300</td>
</tr>
<tr>
<td align="center">1-Line-Art Counter</td>
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ build: false

environment:
matrix:

- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.2"
PYTHON_ARCH: "32"
Expand Down Expand Up @@ -58,4 +57,5 @@ install:
- "%PYTHON%/python.exe setup.py install"

test_script:
- "%PYTHON%/python.exe -m art testcov"
- "%PYTHON%/python.exe -m art testcov"
- "%PYTHON%/python.exe -m cProfile -s cumtime art_profile.py"
66 changes: 48 additions & 18 deletions art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
import random

version = "2.6"
version = "2.7"


description = '''ASCII art is also known as "computer text art".
Expand Down Expand Up @@ -140,7 +140,7 @@ class artError(Exception):
"henry3d": [henry3d_dic, False],
"horizontalleft": [horizontalleft_dic, True],
"horizontalright": [horizontalright_dic, True],
"ICL-1900": [ICL_1900_dic, True],
"icl-1900": [ICL_1900_dic, True],
"impossible": [impossible_dic, True],
"jacky": [jacky_dic, True],
"katakana": [katakana_dic, False],
Expand Down Expand Up @@ -194,7 +194,7 @@ class artError(Exception):
"alpha": [alpha_dic, True],
"amc3liv1": [amc3liv1_dic, True],
"ascii_new_roman": [ascii_new_roman_dic, True],
"B1FF": [B1FF_dic, True],
"b1ff": [B1FF_dic, True],
"dwhistled": [dwhistled_dic, False],
"eftiwall": [eftiwall_dic, False],
"fire_font-k": [fire_font_k_dic, False],
Expand Down Expand Up @@ -234,7 +234,37 @@ class artError(Exception):
"xsansbi": [xsansbi_dic, False],
"xsansi": [xsansi_dic, False],
"xtimes": [xtimes_dic, False],
"xttyb": [xttyb_dic, False]
"xttyb": [xttyb_dic, False],
"heroboti": [heroboti_dic, False],
"high_noo": [high_noo_dic, False],
"hills": [hills_dic, False],
"home_pak": [home_pak_dic, False],
"house_of": [house_of_dic, False],
"hypa_bal": [hypa_bal_dic, False],
"hyper": [hyper_dic, False],
"inc_raw": [inc_raw_dic, False],
"italics": [italics_dic, False],
"kgames_i": [kgames_i_dic, False],
"4x4_offr": [dic_4x4_offr, False],
"5x7": [dic_5x7, False],
"5x8": [dic_5x8, False],
"6x9": [dic_6x9, False],
"6x10": [dic_6x10, False],
"64f1": [dic_64f1, False],
"a_zooloo": [a_zooloo_dic, False],
"asc": [asc_dic, False],
"assalt_m": [assalt_m_dic, False],
"asslt_m": [asslt__m_dic, False],
"atc": [atc_dic, False],
"atc_gran": [atc_gran_dic, False],
"battle_s": [battle_s_dic, False],
"battlesh": [battlesh_dic, False],
"baz_bil": [baz_bil_dic, False],
"beer_pub": [beer_pub_dic, False],
"c1": [c1_dic, False],
"c2": [c2_dic, False],
"kik_star": [kik_star_dic, False],
"krak_out": [krak_out_dic, False]
}
font_counter = len(font_map)
DEFAULT_FONT = "standard"
Expand All @@ -243,32 +273,32 @@ class artError(Exception):
def line(char="*", number=30):
'''
This function print line of chars
:param char: character
:param char: input character
:type char:str
:param number: number of character
:param number: number of characters
:return: None
'''
print(char * number)


def font_list(text="test"):
'''
:param text : Input text
This function print all Of fonts
:param text : input text
:type text : str
This Function Print All Of Fonts
:return: None
'''
for item in sorted(list(font_map.keys())):
print(str(item) + " : ")
if str(item) in ["char4"]:
if str(item) in ["char4", "c2"]:
tprint(text.upper(), str(item))
else:
tprint(text, str(item))


def art_list():
'''
This Function Print All Of 1Line Arts
This function print all Of 1-Line arts
:return: None
'''
for i in sorted(list(art_dic.keys())):
Expand All @@ -283,7 +313,7 @@ def art_list():

def help_func():
'''
Print Help Page
Print help page
:return: None
'''
tprint("art")
Expand All @@ -302,7 +332,7 @@ def help_func():

def aprint(artname, number=1, text=""):
'''
Art Print
Art print
This function print ascii art
:param artname: artname
:type artname : str
Expand Down Expand Up @@ -346,7 +376,7 @@ def art(artname, number=1, text=""):

def randart():
'''
This function return random 1line art
This function return random 1-line art
:return: ascii art as str
'''
return art("random")
Expand Down Expand Up @@ -380,7 +410,7 @@ def tsave(
chr_ignore=True,
print_status=True):
'''
This function save ascii art
:param text: input text
:param font: input font
:type font:str
Expand All @@ -389,7 +419,7 @@ def tsave(
:type filename:str
:param chr_ignore: ignore not supported character
:type chr_ignore:bool
:param print_status : Save message print flag
:param print_status : save message print flag
:type print_status:bool
:return: None
'''
Expand Down Expand Up @@ -462,7 +492,7 @@ def text2art(text, font=DEFAULT_FONT, chr_ignore=True):
:type font:str
:param chr_ignore: ignore not supported character
:type chr_ignore:bool
:return: artText as str
:return: ascii art text as str
'''
split_list = []
result_list = []
Expand Down Expand Up @@ -515,14 +545,14 @@ def text2art(text, font=DEFAULT_FONT, chr_ignore=True):
def set_default(font=DEFAULT_FONT, chr_ignore=True, filename="art",
print_status=True):
'''
This fuction change text2art tprint and tsave default values
This function change text2art, tprint and tsave default values
:param font: input font
:type font:str
:param chr_ignore: ignore not supported character
:type chr_ignore:bool
:param filename: output file name (only tsave)
:type filename:str
:param print_status : Save message print flag (only tsave)
:param print_status : save message print flag (only tsave)
:type print_status:bool
:return: None
'''
Expand Down
4 changes: 2 additions & 2 deletions art/art_dic.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
"love2": " ~♡ⓛⓞⓥⓔ♡~",
"dancee": "♪┏(°.°)┛┗(°.°)┓┗(°.°)┛┏(°.°)┓ ♪",
"mtmtika": ":o + :p = 69",
"AK-47": "︻┳デ═—",
"ak-47": "︻┳デ═—",
"eaten apple": "[===]-'",
"huhu": "█▬█ █▄█ █▬█ █▄█",
"faydre": "(U) [^_^] (U) ",
Expand All @@ -211,7 +211,7 @@
"melp2": "(<(<>(<>.(<>..<>).<>)<>)>)",
"happy square": "【ツ】",
"snowman": "☃",
"I kill you": " ̿ ̿̿'̿̿\̵͇̿̿\=(•̪●)=/̵͇̿̿/'̿̿ ̿ ̿",
"i kill you": " ̿ ̿̿'̿̿\̵͇̿̿\=(•̪●)=/̵͇̿̿/'̿̿ ̿ ̿",
"happy3": "㋡",
"jaymz": " (•̪●)==ε/̵͇̿​̿/’̿’̿ ̿ ̿̿ `(•.°)~",
"text decoration": ["(¯`·._.··¸.-~*´¨¯¨`*·~-.,-(_", "_)-,"
Expand Down
Loading

0 comments on commit 8efbff2

Please sign in to comment.