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.2 #76

Merged
merged 41 commits into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b567e5d
add : smallcaps font added
sadrasabouri Sep 27, 2019
9799e71
add : fraktur font added
sadrasabouri Sep 27, 2019
8dc4e05
add : bold fraktur font added
sadrasabouri Sep 27, 2019
d93bbf8
add : bold script font added
sadrasabouri Sep 27, 2019
9c89cec
add : handwriting1 font added
sadrasabouri Sep 27, 2019
7158692
add : handwriting2 font added
sadrasabouri Sep 27, 2019
c80cd60
add : rusify font added
sadrasabouri Sep 27, 2019
b7c8dc9
add : monospace font added
sadrasabouri Sep 27, 2019
83f36df
add : dirty2 font added
sadrasabouri Sep 27, 2019
8ca3359
add : knight2 font added
sadrasabouri Sep 27, 2019
165ffb1
add : h4k3r font added
sadrasabouri Sep 27, 2019
a45d076
add : thin font added
sadrasabouri Sep 27, 2019
8fc5216
add : tiny2 font added
sadrasabouri Sep 27, 2019
567cc35
add : upside_down font added
sadrasabouri Sep 27, 2019
894e191
fix : pep8ed
sadrasabouri Sep 27, 2019
b1c1b29
fix : Changelog fixed
sadrasabouri Sep 27, 2019
d9185b9
fix : some bugs fixed
sadrasabouri Sep 27, 2019
72b619a
fix : smallcaps font problem fixed
sadrasabouri Sep 27, 2019
4c4d497
fix: typo fixed
sadrasabouri Sep 27, 2019
e343be8
Merge pull request #72 from sadrasabouri/dev
sepandhaghighi Sep 30, 2019
81a971a
doc : CHANGELOG updated
sepandhaghighi Oct 1, 2019
7b6b94c
fix : __init__.py coding fixed
sepandhaghighi Oct 17, 2019
a657227
fix : __init__.py modified
sepandhaghighi Oct 17, 2019
788bd7f
fix : FONT_NAMES and ART_NAMES lists added
sepandhaghighi Oct 17, 2019
fbf1b20
fix : tests updated
sepandhaghighi Oct 17, 2019
84a3951
fix : tests updated
sepandhaghighi Oct 17, 2019
7cc6831
fix : minor edit in tests
sepandhaghighi Oct 17, 2019
fed9d61
doc : CHANGELOG updated
sepandhaghighi Oct 17, 2019
910d375
doc : README updated
sepandhaghighi Oct 17, 2019
8a71c05
doc : README updated
sepandhaghighi Oct 17, 2019
32897b2
doc : CHANGELOG updated
sepandhaghighi Oct 17, 2019
dc2a12f
Merge pull request #73 from sepandhaghighi/optimize-namesapce
sadrasabouri Oct 18, 2019
8e02dde
fix : minor edit in art_param
sepandhaghighi Oct 19, 2019
ea4c9f0
rel : migrate to version 4.2
sepandhaghighi Oct 19, 2019
58e4b33
doc : notebooks updated for version 4.2
sepandhaghighi Oct 19, 2019
9bd64eb
fix : autopep8 fix
sepandhaghighi Oct 19, 2019
918159e
rel : migrate to version 4.2
sepandhaghighi Oct 19, 2019
93a3353
doc : CHANGELOG updated
sepandhaghighi Oct 25, 2019
8714d43
doc : README updated
sepandhaghighi Oct 25, 2019
38e56b9
doc : CODE_OF_CONDUCT.md updated
sepandhaghighi Oct 25, 2019
12c176e
fix : help_func website address updated
sepandhaghighi Oct 25, 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
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at sepand.haghighi@yahoo.com. All
reported by contacting the project team at info@4r7.ir. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
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.1"
"### Version : 4.2"
]
},
{
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ 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.2] - 2019-10-30
### Added
- 14 new fonts
1. smallcaps3
2. fraktur2
3. bold_fraktur
4. bold_script
5. handwriting1
6. handwriting2
7. rusify
8. monospace
9. dirty2
10. knight2
11. h4k3r
12. thin3
13. tiny2
14. upside_down
- `FONT_NAMES` variable
- `ART_NAMES` variable
### Changed
- Namespace optimized
- Website changed to https://www.4r7.ir
## [4.1] - 2019-09-26
### Added
- 20 new fonts
Expand Down Expand Up @@ -1095,7 +1117,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.1...dev
[Unreleased]: https://github.com/sepandhaghighi/art/compare/v4.2...dev
[4.2]: https://github.com/sepandhaghighi/art/compare/v4.1...v4.2
[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
Expand Down
46 changes: 44 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.1"
"### Version : 4.2"
]
},
{
Expand All @@ -38,7 +38,7 @@
{
"data": {
"text/plain": [
"481"
"495"
]
},
"execution_count": 2,
Expand Down Expand Up @@ -671,6 +671,12 @@
" \n",
" \n",
"\n",
"bold_fraktur : \n",
"𝕿𝕰𝕾𝕿յշՅ\n",
"\n",
"bold_script : \n",
"𝓣𝓔𝓢𝓣123\n",
"\n",
"bolger : \n",
"~~~888~~~ 888~~ ,d88~~\\ ~~~888~~~ ,d /~~88b _-~88e \n",
" 888 888___ 8888 888 ,d888 | 888 888b \n",
Expand Down Expand Up @@ -1313,6 +1319,9 @@
"dirty : \n",
"ẗệṩẗ123\n",
"\n",
"dirty2 : \n",
"ṮỆṨṮ123\n",
"\n",
"doh : \n",
" \n",
" \n",
Expand Down Expand Up @@ -1941,6 +1950,9 @@
" \n",
" \n",
"\n",
"fraktur2 : \n",
"𝔗𝔈𝔖𝔗յշՅ\n",
"\n",
"full_width : \n",
"TEST123\n",
"\n",
Expand Down Expand Up @@ -2213,6 +2225,9 @@
" ## # ### ## ## ## #### ###### ## # \n",
" \n",
"\n",
"h4k3r : \n",
"7357123\n",
"\n",
"hades : \n",
"####### ####### ###### ####### ######## ## # \n",
"####### ## ### ##### ####### ## ##### # \n",
Expand All @@ -2223,6 +2238,12 @@
" #### ####### ###### #### ##### # #### \n",
" ## #### ######## \n",
"\n",
"handwriting1 : \n",
"𝒯𝐸𝒮𝒯123\n",
"\n",
"handwriting2 : \n",
"TEST123\n",
"\n",
"heartleft : \n",
" .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. \n",
"( T .' ( E .' ( S .' ( T .' ( 1 .' ( 2 .' ( 3 .' \n",
Expand Down Expand Up @@ -2534,6 +2555,9 @@
"knight : \n",
"ṮḕṠṮ123\n",
"\n",
"knight2 : \n",
"ṮḔṠṮ123\n",
"\n",
"knob : \n",
" _ _________ _ _____ _ _ _____ _ _ _ _ \n",
" _______| |( _ _ )( ) ( _ ) _______| | ______( \\ ( _ ) ( )( ) ( ) ( )\n",
Expand Down Expand Up @@ -2685,6 +2709,9 @@
" | | | |___ _____| | | | | | | |_____ ___| |\n",
" |___| |_______||_______| |___| |___| |_______||_______|\n",
"\n",
"monospace : \n",
"𝚃𝙴𝚂𝚃𝟷𝟸𝟹\n",
"\n",
"morse : \n",
"- . ... - .---- ..--- ...-- \n",
"\n",
Expand Down Expand Up @@ -2991,6 +3018,9 @@
" | | | / | \n",
" | | | / | \n",
"\n",
"rusify : \n",
"TЄ$T123\n",
"\n",
"santaclara : \n",
" ______ ______ __, ______ _ __ __ \n",
"( / ( / ( ( / / ) )\n",
Expand Down Expand Up @@ -3083,6 +3113,9 @@
"smallcaps2 : \n",
"TEST123\n",
"\n",
"smallcaps3 : \n",
"ᴛᴇsᴛ𝟷𝟸𝟹\n",
"\n",
"smisome1 : \n",
" ___ ___ ___ ___ \n",
" /\\ \\ /\\ \\ /\\ \\ /\\ \\ \n",
Expand Down Expand Up @@ -3328,6 +3361,9 @@
"thin2 : \n",
"test123\n",
"\n",
"thin3 : \n",
"TEST123\n",
"\n",
"threepoint : \n",
"~|~(~(~~|~'| '~)'~)\n",
" | (__) | .|. /_._)\n",
Expand Down Expand Up @@ -3371,6 +3407,9 @@
"tiny : \n",
"ᴛᴇᴤᴛ123\n",
"\n",
"tiny2 : \n",
"TEST123\n",
"\n",
"tombstone : \n",
" ___ __, _, ___ , _, _,\n",
" | |_ (_ | | ~ ) ~_)\n",
Expand Down Expand Up @@ -3490,6 +3529,9 @@
" \n",
" \n",
"\n",
"upside_down : \n",
"ʇǝsʇ123\n",
"\n",
"usa : \n",
" \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.1 is the last version to support Python 2.7
⚠️ ART 4.2 is the last version to support Python 2.7

### Source code
- Download [Version 4.1](https://github.com/sepandhaghighi/art/archive/v4.1.zip) or [Latest Source ](https://github.com/sepandhaghighi/art/archive/dev.zip)
- Download [Version 4.2](https://github.com/sepandhaghighi/art/archive/v4.2.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.1` or `pip3 install art==4.1` (Need root access)
- `pip install art==4.2` or `pip3 install art==4.2` (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.1"` (Need root access)
- Run `easy_install "art==4.2"` (Need root access)
13 changes: 9 additions & 4 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-481-blue.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/FontList.ipynb"><img src="https://img.shields.io/badge/Font List-495-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">481</td>
<td align="center">495</td>
</tr>
<tr>
<td align="center">1-Line-Art Counter</td>
Expand Down Expand Up @@ -171,7 +171,9 @@ art.art.artError: number should have int type
'ዞᏜ℘℘Ꮍ ℬℹℛʈዞᗬᏜᎽ '
>>> randart()
'✌(◕‿-)✌ '
```
```

* Note : Use `ART_NAMES` to access all arts name list (new in `Version 4.2`)

### ASCII text

Expand Down Expand Up @@ -335,6 +337,9 @@ Filename: test.txt

```

* Note : Use `FONT_NAMES` to access all fonts name list (new in `Version 4.2`)


### Font modes

These modes are available for `text2art`, `tprint` & `tsave`.
Expand Down Expand Up @@ -722,7 +727,7 @@ ART can be used online in interactive Jupyter Notebooks via the Binder service!
## Issues & bug reports

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

* Please complete the issue template

Expand Down
7 changes: 6 additions & 1 deletion art/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-
"""Art modules."""
from .art import *
from .art import artError
from .art import aprint, art, randart
from .art import tprint, tsave, text2art
from .art import get_font_dic, set_default, help_func, art_list, font_list
from .art_param import ART_VERSION, FONT_NAMES, ART_NAMES, ART_COUNTER, FONT_COUNTER, DEFAULT_FONT
__version__ = ART_VERSION
4 changes: 2 additions & 2 deletions art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def help_func():
tprint("art")
tprint("v" + ART_VERSION)
print(DESCRIPTION + "\n")
print("Webpage : http://art.shaghighi.ir\n")
print("Webpage : https://www.4r7.ir\n")
print("Help : \n")
print(" - list --> (list of arts)\n")
print(" - fonts --> (list of fonts)\n")
Expand Down Expand Up @@ -248,7 +248,7 @@ def tsave(
result = text2art(text, font=font, chr_ignore=chr_ignore)
try:
file.write(result)
except UnicodeDecodeError: # pragma: no cover
except UnicodeDecodeError: # pragma: no cover
file.close()
file = codecs.open(test_name + extension, "w")
file.write(result)
Expand Down
56 changes: 50 additions & 6 deletions art/art_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .text_dic3 import *
from .art_dic import *

ART_VERSION = "4.1" # pragma: no cover
ART_VERSION = "4.2" # pragma: no cover
FONT_SMALL_THRESHOLD = 50 # pragma: no cover
FONT_MEDIUM_THRESHOLD = 100 # pragma: no cover
FONT_LARGE_THRESHOLD = 200 # pragma: no cover
Expand Down Expand Up @@ -260,7 +260,21 @@
"white_square",
"black_square",
"paranormal",
"black_bubble"]
"black_bubble",
"smallcaps3",
"fraktur2",
"bold_fraktur",
"bold_script",
"handwriting1",
"handwriting2",
"rusify",
"monospace",
"dirty2",
"knight2",
"h4k3r",
"thin3",
"tiny2",
"upside_down"]

RANDOM_FILTERED_ARTS = [
"message2",
Expand Down Expand Up @@ -382,7 +396,21 @@
"white_square",
"black_square",
"paranormal",
"black_bubble"]
"black_bubble",
"smallcaps3",
"fraktur2",
"bold_fraktur",
"bold_script",
"handwriting1",
"handwriting2",
"rusify",
"monospace",
"dirty2",
"knight2",
"h4k3r",
"thin3",
"tiny2",
"upside_down"]

DESCRIPTION = '''ASCII art is also known as "computer text art".
It involves the smart placement of typed special characters or
Expand Down Expand Up @@ -721,7 +749,9 @@
"currency": [currency_dic, False],
"special": [special_dic, False],
"dirty": [dirty_dic, False],
"dirty2": [dirty2_dic, False],
"knight": [knight_dic, False],
"knight2": [knight2_dic, False],
"thin2": [thin2_dic, False],
"tiny": [tiny_dic, False],
"fancy1": [fancy1_dic, False],
Expand Down Expand Up @@ -817,9 +847,23 @@
"white_square": [white_square_dic, False],
"black_square": [black_square_dic, False],
"paranormal": [paranormal_dic, False],
"black_bubble": [black_bubble_dic, False]
"black_bubble": [black_bubble_dic, False],
"smallcaps3": [smallcaps3_dic, False],
"fraktur2": [fraktur2_dic, False],
"bold_fraktur": [bold_fraktur_dic, False],
"bold_script": [bold_script_dic, False],
"handwriting1": [handwriting1_dic, False],
"handwriting2": [handwriting2_dic, False],
"rusify": [rusify_dic, False],
"monospace": [monospace_dic, False],
"h4k3r": [h4k3r_dic, False],
"thin3": [thin3_dic, False],
"tiny2": [tiny2_dic, False],
"upside_down": [upside_down_dic, False]
}

FONT_COUNTER = len(FONT_MAP) # pragma: no cover
ART_COUNTER = len(art_dic) # pragma: no cover
FONT_NAMES = sorted(list(FONT_MAP.keys())) # pragma: no cover
ART_NAMES = sorted(list(art_dic.keys())) # pragma: no cover
FONT_COUNTER = len(FONT_NAMES) # pragma: no cover
ART_COUNTER = len(ART_NAMES) # pragma: no cover
DEFAULT_FONT = "standard" # pragma: no cover
Loading