Skip to content

Commit

Permalink
Merge pull request #76 from sepandhaghighi/dev
Browse files Browse the repository at this point in the history
Version 4.2
  • Loading branch information
sadrasabouri authored Oct 30, 2019
2 parents b408b3b + 12c176e commit cd3aeba
Show file tree
Hide file tree
Showing 14 changed files with 1,540 additions and 33 deletions.
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 [email protected]. All
reported by contacting the project team at [email protected]. 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 [[email protected]](mailto:[email protected] "[email protected]").
or send an email to [[email protected]](mailto:[email protected] "[email protected]").

* 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

0 comments on commit cd3aeba

Please sign in to comment.