Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.1 #71

Merged
merged 66 commits into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
3ae8219
doc : minor edit in references
sepandhaghighi Sep 13, 2019
6652d23
add : fancy75 added
sadrasabouri Sep 18, 2019
6c35454
add : fancy76 font added
sadrasabouri Sep 18, 2019
abcc06f
add : fancy77 font added
sadrasabouri Sep 18, 2019
adc789c
add : fancy78 font added
sadrasabouri Sep 18, 2019
65f4f11
add : rev1 font added
sadrasabouri Sep 18, 2019
c4761fa
add : rev2 font added
sadrasabouri Sep 18, 2019
e713a40
add : love1 font added
sadrasabouri Sep 18, 2019
d6709b7
fix : fonts autopep8ed
sadrasabouri Sep 18, 2019
f49632d
add : fancy79 font added
sadrasabouri Sep 18, 2019
a077923
add : fancy80 font added
sadrasabouri Sep 18, 2019
7c5db5b
add : fancy81 font added
sadrasabouri Sep 18, 2019
e1f286c
add : fancy83 font added
sadrasabouri Sep 18, 2019
9946f8d
fix : some typos fixed for fancy82
sadrasabouri Sep 18, 2019
a439c07
add : fancy84 font added
sadrasabouri Sep 18, 2019
d608b74
add : Changelog.md updated
sadrasabouri Sep 18, 2019
105a3a9
fix : typos in test fixed
sadrasabouri Sep 18, 2019
5acb64b
fix : autopep8
sadrasabouri Sep 19, 2019
29e9c1d
fix : some bugs fixed
sadrasabouri Sep 19, 2019
4f595fa
del : rev1 and rev2 fonts deleted
sadrasabouri Sep 20, 2019
12a7af9
del : rev1 and rev2 tests deleted
sadrasabouri Sep 20, 2019
7a0b204
Merge pull request #65 from sadrasabouri/dev
sepandhaghighi Sep 20, 2019
27ac767
fix : minor bug in font_check.py fixed
sepandhaghighi Sep 20, 2019
57635f2
doc : CHANGELOG updated
sepandhaghighi Sep 20, 2019
131cc52
fix : font_wizard bug fixed
sepandhaghighi Sep 20, 2019
ee5fd05
doc : CHANGELOG updated
sepandhaghighi Sep 20, 2019
9031213
Merge pull request #66 from sepandhaghighi/font_wizard
sadrasabouri Sep 21, 2019
853d230
add : get_font_dic function added.
sadrasabouri Sep 21, 2019
547fe2e
replace : art.art_param.FONT_MAP[font][0] replaced by art.get_font_di…
sadrasabouri Sep 21, 2019
8b7931f
update : changelog updated
sadrasabouri Sep 21, 2019
bc2ec98
add : new line added :)
sadrasabouri Sep 21, 2019
922d39b
fix : get_font_dic docstring fixed
sadrasabouri Sep 21, 2019
2d14328
add : get_font_dic usage added to art.py
sadrasabouri Sep 21, 2019
7dd61e7
Merge pull request #67 from sadrasabouri/dev
sepandhaghighi Sep 22, 2019
6275b7a
font : contouring3 font added
sepandhaghighi Sep 22, 2019
c97b379
font : contouring4 font added #60
sepandhaghighi Sep 22, 2019
030de3d
font : love2 font added #60
sepandhaghighi Sep 22, 2019
448f981
fix : tests updated #60
sepandhaghighi Sep 22, 2019
3957f7d
doc : CHANGELOG updated
sepandhaghighi Sep 22, 2019
88e79f6
fix : font counters updated #60
sepandhaghighi Sep 22, 2019
0c0fce2
fix : autopep8 fix
sepandhaghighi Sep 22, 2019
1098f8e
font : fancy85 font added #60
sepandhaghighi Sep 22, 2019
1e0af1a
font : fancy86 font added #60
sepandhaghighi Sep 22, 2019
af14281
fix : tests updated #60
sepandhaghighi Sep 22, 2019
8a1ab46
doc : CHANGELOG updated
sepandhaghighi Sep 22, 2019
17599eb
fix : autopep8 fix
sepandhaghighi Sep 22, 2019
055012d
font : white_square font added
sepandhaghighi Sep 23, 2019
289d9be
font : black_square font added
sepandhaghighi Sep 23, 2019
f3a9dc8
Merge pull request #68 from sepandhaghighi/new_fonts
sadrasabouri Sep 23, 2019
37e7dc1
fix : tests updated
sepandhaghighi Sep 23, 2019
54c2cf9
doc : CHANGELOG updated
sepandhaghighi Sep 23, 2019
c503c02
font : paranormal font added #69
sepandhaghighi Sep 23, 2019
1f5c0e7
font : black_bubble font added #69
sepandhaghighi Sep 23, 2019
3acefbe
fix : test updated #69
sepandhaghighi Sep 23, 2019
5d79bca
doc : CHANGELOG updated #69
sepandhaghighi Sep 23, 2019
8f747bc
fix : autopep8 fix
sepandhaghighi Sep 23, 2019
9a30be6
fix : some unused import removed from test2
sepandhaghighi Sep 23, 2019
7739c13
fix : minor edit in tsave function coverage report
sepandhaghighi Sep 23, 2019
fcd4eee
Merge pull request #70 from sepandhaghighi/new_fonts
sadrasabouri Sep 23, 2019
db7f598
doc : AUTHORS.md updated
sepandhaghighi Sep 23, 2019
16084de
rel : migrate to version 4.1
sepandhaghighi Sep 23, 2019
3615f3c
doc : notebooks updated for version 4.1
sepandhaghighi Sep 23, 2019
5610cb1
doc : minor edit in AUTHORS.md
sepandhaghighi Sep 23, 2019
28bdb01
doc : CONTRIBUTING.md updated
sepandhaghighi Sep 26, 2019
70911c9
doc : CHANGELOG updated
sepandhaghighi Sep 26, 2019
9c0c35f
doc : minor edit CONTRIBUTING.md
sepandhaghighi Sep 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Please consider the following :
4. Select case sensitive mode in `FONT_MAP` dictionary
- `False` : If font is case sensitive (Example : ```"eftiwater": [eftiwater_dic, False]```)
- `True` : If font is not case sensitive (Example : ```"poison": [poison_dic, True]```)
- This is an *optional* step for memory saving, if you haven't removed capital letters from font data, you can simply select case sensitive mode
5. If font only support capital letters:
- Add font name to `UPPERCASE_FONTS`
6. If font is Non-ASCII:
Expand Down
4 changes: 2 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Core Developer #

----------
- Sepand Haghighi - Sharif University Of Technology/Moduland Co - ([http://github.com/sepandhaghighi](http://github.com/sepandhaghighi)) ([sepand.haghighi@yahoo.com](mailto:sepand.haghighi@yahoo.com))
- Sepand Haghighi - Sharif University Of Technology/Moduland Co - [@sepandhaghighi](http://github.com/sepandhaghighi)
- Sadra Sabouri - Sharif University Of Technology - [@sadrasabouri](https://github.com/sadrasabouri)

# Other Contributors #
----------
- [Sadra Sabouri](https://github.com/sadrasabouri)
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 : 4.0"
"### Version : 4.1"
]
},
{
Expand Down
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@ 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]
## [4.1] - 2019-09-26
### Added
- 20 new fonts
1. fancy75
2. fancy76
3. fancy77
4. fancy78
5. love1
6. fancy79
7. fancy80
8. fancy81
9. fancy82
10. fancy83
11. fancy84
12. fancy85
13. fancy86
14. contouring3
15. contouring4
16. love2
17. black_square
18. white_square
19. black_bubble
20. paranormal
- `get_font_dic` function
### Changed
- `font_check.py` modified
- `font_wizard.py` modified
- `CONTRIBUTING.md` modified
## [4.0] - 2019-09-12
### Added
- `install.sh`
Expand Down Expand Up @@ -1067,7 +1095,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/v4.0...dev
[Unreleased]: https://github.com/sepandhaghighi/art/compare/v4.1...dev
[4.1]: https://github.com/sepandhaghighi/art/compare/v4.0...v4.1
[4.0]: https://github.com/sepandhaghighi/art/compare/v3.9...v4.0
[3.9]: https://github.com/sepandhaghighi/art/compare/v3.8...v3.9
[3.8]: https://github.com/sepandhaghighi/art/compare/v3.7...v3.8
Expand Down
64 changes: 62 additions & 2 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 : 4.0"
"### Version : 4.1"
]
},
{
Expand All @@ -38,7 +38,7 @@
{
"data": {
"text/plain": [
"461"
"481"
]
},
"execution_count": 2,
Expand Down Expand Up @@ -641,6 +641,12 @@
"binary : \n",
"01010100 01000101 01010011 01010100 00110001 00110010 00110011 \n",
"\n",
"black_bubble : \n",
"🅣🅔🅢🅣➊➋➌\n",
"\n",
"black_square : \n",
"🆃🅴🆂🆃123\n",
"\n",
"block : \n",
"\n",
" .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------.\n",
Expand Down Expand Up @@ -1185,6 +1191,12 @@
"contouring2 : \n",
"⒯⒠⒮⒯⑴⑵⑶\n",
"\n",
"contouring3 : \n",
"[̲̅T][̲̅E][̲̅S][̲̅T][̲̅1][̲̅2][̲̅3]\n",
"\n",
"contouring4 : \n",
"(̲̅T)(̲̅E)(̲̅S)(̲̅T)(̲̅1)(̲̅2)(̲̅3)\n",
"\n",
"contrast : \n",
".%%%%%%..%%%%%%...%%%%...%%%%%%....%%.....%%%%...%%%%%%.\n",
"...%%....%%......%%........%%.....%%%........%%.....%%..\n",
Expand Down Expand Up @@ -1727,9 +1739,45 @@
"fancy74 : \n",
"ŧεşŧ123\n",
"\n",
"fancy75 : \n",
"イ乇ㄎイ1ᆯ3\n",
"\n",
"fancy76 : \n",
"էƐϚէ𝟙ϩӠ\n",
"\n",
"fancy77 : \n",
"ƚҽʂƚ123\n",
"\n",
"fancy78 : \n",
"tєรt123\n",
"\n",
"fancy79 : \n",
"†εš†123\n",
"\n",
"fancy8 : \n",
"tєรt123\n",
"\n",
"fancy80 : \n",
"ƭєƨƭ123\n",
"\n",
"fancy81 : \n",
"ƚЄ$ƚ123\n",
"\n",
"fancy82 : \n",
"Ŧ£ŞŦ123\n",
"\n",
"fancy83 : \n",
"τεȘτ123\n",
"\n",
"fancy84 : \n",
"TΞST123\n",
"\n",
"fancy85 : \n",
"ŤĚŠŤ¹²³\n",
"\n",
"fancy86 : \n",
"ᴛᴇSᴛ₁₂₃\n",
"\n",
"fancy9 : \n",
"тeѕт123\n",
"\n",
Expand Down Expand Up @@ -2562,6 +2610,12 @@
" ::| ::::::|,::::/ ::| :::| /::::|\\:,,:'\n",
" \n",
"\n",
"love1 : \n",
"ƬƐSƬ123\n",
"\n",
"love2 : \n",
"ŦƐSŦ123\n",
"\n",
"madrid : \n",
"/=\\ /=\\ /=\\ /=\\ /| /=\\ /=\\ \n",
" | |= \\ | = / =< \n",
Expand Down Expand Up @@ -2771,6 +2825,9 @@
"___oo____ooooooo__ooooo_____oo_____ooooo_oooooooo__oooooo__\n",
"___________________________________________________________\n",
"\n",
"paranormal : \n",
"tєst123\n",
"\n",
"pawp : \n",
" \n",
" _______ ______ _____ _______ ___ ____ ____ \n",
Expand Down Expand Up @@ -3580,6 +3637,9 @@
"white_bubble : \n",
"ⓉⒺⓈⓉ①②③\n",
"\n",
"white_square : \n",
"🅃🄴🅂🅃123\n",
"\n",
"wow : \n",
"`][` ]E ((5 `][` 123\n",
"\n",
Expand Down
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
## Installation

⚠️ ART 4.0 is the last version to support Python 2.7
⚠️ ART 4.1 is the last version to support Python 2.7

### Source code
- Download [Version 4.0](https://github.com/sepandhaghighi/art/archive/v4.0.zip) or [Latest Source ](https://github.com/sepandhaghighi/art/archive/dev.zip)
- Download [Version 4.1](https://github.com/sepandhaghighi/art/archive/v4.1.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==4.0` or `pip3 install art==4.0` (Need root access)
- `pip install art==4.1` or `pip3 install art==4.1` (Need root access)

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

Expand All @@ -21,4 +21,4 @@

### Easy install

- Run `easy_install "art==4.0"` (Need root access)
- Run `easy_install "art==4.1"` (Need root access)
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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-461-blue.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/FontList.ipynb"><img src="https://img.shields.io/badge/Font List-481-blue.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/ArtList.ipynb"><img src="https://img.shields.io/badge/Art List-370-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 @@ -65,7 +65,7 @@ ART is a Python lib for text converting to ASCII art fancy. ;-)
</tr>
<tr>
<td align="center">Font Counter</td>
<td align="center">461</td>
<td align="center">481</td>
</tr>
<tr>
<td align="center">1-Line-Art Counter</td>
Expand Down Expand Up @@ -745,17 +745,18 @@ or send an email to [sepand.haghighi@yahoo.com](mailto:sepand.haghighi@yahoo.com

## Reference

1. [1 Line Art](http://1lineart.kulaone.com/#/)
2. [Text To ASCII](http://patorjk.com/software/taag/#p=display&f=Blocks&t=ART)
3. [ASCII Generator](http://www.network-science.de/ascii/)
4. [Asky](https://asky.io/)
5. [Flipyourtext](https://www.flipyourtext.com/)
6. [YayText](https://yaytext.com)
7. [Coolletters](http://www.coolletters.net/)
8. [Instagram Fonts](https://igfonts.io/)
9. [Cool Symbol](https://coolsymbol.com/)
10. [ASCII Moji](http://asciimoji.com/)
11. [SMILEY COOL](https://smiley.cool/)
1. [FIGlet](http://www.figlet.org/)
2. [1 Line Art](http://1lineart.kulaone.com/#/)
3. [Text To ASCII](http://patorjk.com/software/taag/#p=display&f=Blocks&t=ART)
4. [ASCII Generator](http://www.network-science.de/ascii/)
5. [Asky](https://asky.io/)
6. [Flipyourtext](https://www.flipyourtext.com/)
7. [YayText](https://yaytext.com)
8. [Coolletters](http://www.coolletters.net/)
9. [Instagram Fonts](https://igfonts.io/)
10. [Cool Symbol](https://coolsymbol.com/)
11. [ASCII Moji](http://asciimoji.com/)
12. [SMILEY COOL](https://smiley.cool/)

## Donate to our project

Expand Down
17 changes: 14 additions & 3 deletions art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def tsave(
result = text2art(text, font=font, chr_ignore=chr_ignore)
try:
file.write(result)
except UnicodeDecodeError:
except UnicodeDecodeError: # pragma: no cover
file.close()
file = codecs.open(test_name + extension, "w")
file.write(result)
Expand Down Expand Up @@ -358,7 +358,7 @@ def mix_letters():
letters = fancy1_dic.copy()
for i in letters.keys():
random_font = random.choice(TEST_FILTERED_FONTS)
letters[i] = FONT_MAP[random_font][0][i]
letters[i] = get_font_dic(random_font)[i]
return letters


Expand Down Expand Up @@ -433,7 +433,7 @@ def text2art(text, font=DEFAULT_FONT, chr_ignore=True):
font = font.lower()
if font != "mix":
font = indirect_font(font, text)
letters = FONT_MAP[font][0]
letters = get_font_dic(font)
if FONT_MAP[font][1]:
text_temp = text.lower()
if font in UPPERCASE_FONTS:
Expand Down Expand Up @@ -481,3 +481,14 @@ def set_default(font=DEFAULT_FONT, chr_ignore=True, filename="art",
tprint.__defaults__ = (font, chr_ignore)
tsave.__defaults__ = (font, filename, chr_ignore, print_status, overwrite)
text2art.__defaults__ = (font, chr_ignore)


def get_font_dic(font_name):
"""
Return given font's dictionary.

:param font_name: font's name
:type font_name:str
:return font's dictionary
"""
return FONT_MAP[font_name][0]
Loading