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.0 #64

Merged
merged 95 commits into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
967c53d
fix : minor edit in test.sh
sepandhaghighi Aug 21, 2019
4278fcd
fix : minor edit in tsave function saving process #55
sepandhaghighi Aug 22, 2019
66b3669
fix : test2 modified #55
sepandhaghighi Aug 22, 2019
9f3f394
fix : test modified #55
sepandhaghighi Aug 22, 2019
dc56618
fix : test.sh modified #55
sepandhaghighi Aug 22, 2019
a63347b
fix : minor but in test2 fixed #55
sepandhaghighi Aug 22, 2019
842ae88
fix : minor but in test2 fixed #55
sepandhaghighi Aug 22, 2019
267ee03
fix : UTF-8 compatibility test added to font_check scrirpt #55
sepandhaghighi Aug 22, 2019
0b916ec
fix : minor edit in font_check script
sepandhaghighi Aug 22, 2019
69e1214
fix : UTF-8 compatibility check added to font_wizard #55
sepandhaghighi Aug 22, 2019
09334db
fix : minor edit in is_utf8 function
sepandhaghighi Aug 22, 2019
f095439
fix : minor edit in is_utf8 function
sepandhaghighi Aug 22, 2019
3325256
fix : minor edit in font_check test
sepandhaghighi Aug 22, 2019
4a16e39
fix : test.sh modified
sepandhaghighi Aug 22, 2019
476bb87
fix : install.sh added
sepandhaghighi Aug 22, 2019
d7fe8f3
fix : minor edit in travis config
sepandhaghighi Aug 22, 2019
1fccbef
doc : CHANGELOG updated
sepandhaghighi Aug 22, 2019
ac4b339
fix : autopep8 fix
sepandhaghighi Aug 22, 2019
8ec3a50
fix : minor bug in test.py fixed
sepandhaghighi Aug 22, 2019
4f67064
doc : INSTALL.md updated
sepandhaghighi Aug 22, 2019
eed28b0
fix : vulture test command fixed
sepandhaghighi Aug 23, 2019
3a0bef9
doc : CHANGELOG updated
sepandhaghighi Aug 23, 2019
24d9275
fix : minor edit in font_check script
sepandhaghighi Aug 23, 2019
2b0badf
add : overwrite flag added.
sadrasabouri Aug 29, 2019
f091162
add : overwrite feature added
sadrasabouri Aug 29, 2019
923c05e
add : change description added to CHANGELOG.md
sadrasabouri Aug 29, 2019
3377ecf
fix : Missing is or is not for singleton comparison
sadrasabouri Aug 29, 2019
173c470
fix : More than one dot filename saving issue fixed
sadrasabouri Aug 30, 2019
f55bab7
fix : none specified file extension filenames bug fixed.
sadrasabouri Aug 30, 2019
df59b24
add : tests for tsave function (overwrite and #58) added
sadrasabouri Aug 30, 2019
8165017
fix : trailing-whitespace (C0303) fixed
sadrasabouri Aug 30, 2019
292c983
fix : extra test deleted
sadrasabouri Aug 30, 2019
533fc07
fix : tests are now suitable for all Python versions
sadrasabouri Aug 30, 2019
d8dc491
Merge pull request #57 from sadrasabouri/dev
sepandhaghighi Aug 30, 2019
cfe117b
fix : shebang added to test.sh and install.sh
sepandhaghighi Aug 30, 2019
384f3ab
doc : CHANGELOG updated
sepandhaghighi Aug 30, 2019
b98488e
doc : AUTHORS.md updated
sepandhaghighi Aug 30, 2019
9b2a9d5
doc : CONTRIBUTING.md updated
sepandhaghighi Aug 30, 2019
923e4ff
doc : README updated
sepandhaghighi Aug 30, 2019
940a822
doc : CHANGELOG updated
sepandhaghighi Aug 30, 2019
e21a0ce
add : fancy56 font added.
sadrasabouri Sep 1, 2019
019ad2c
add : fancy57 font added
sadrasabouri Sep 1, 2019
e2a257f
add : font fancy58 added
sadrasabouri Sep 1, 2019
7140ffd
add : font fancy59 added
sadrasabouri Sep 1, 2019
39966da
add : font fancy60 added
sadrasabouri Sep 1, 2019
b54bc19
update : Fontlis updated
sadrasabouri Sep 1, 2019
36e02e0
fix : minor bug fixed
sadrasabouri Sep 2, 2019
417884f
fix : typo fixed
sadrasabouri Sep 2, 2019
d53dd95
fix : fancy60 test and fancy6 test place's have been replaced
sadrasabouri Sep 2, 2019
7a5d4c9
fix : fancy60 test fixed
sadrasabouri Sep 2, 2019
25d874c
Merge pull request #61 from sadrasabouri/dev
sepandhaghighi Sep 3, 2019
60645c2
doc : CHANGELOG updated #60
sepandhaghighi Sep 3, 2019
cade702
doc : CONTRIBUTING.md updated
sepandhaghighi Sep 3, 2019
c895de4
doc : CONTRIBUTING.md updated
sepandhaghighi Sep 3, 2019
40eca56
fix : autopep8 fix
sepandhaghighi Sep 3, 2019
e4de086
add : autopep8.sh added for GNU
sadrasabouri Sep 3, 2019
ed6d07a
add : fancy61 font added
sadrasabouri Sep 3, 2019
9c2b98a
add : fancy62 font added
sadrasabouri Sep 6, 2019
c201a76
add : fancy63 font added
sadrasabouri Sep 6, 2019
b29e18c
add : fancy64 font added
sadrasabouri Sep 6, 2019
ff3e78b
add : fancy65 font added
sadrasabouri Sep 6, 2019
2204210
add : fancy66 font added
sadrasabouri Sep 6, 2019
ffb5f45
add : fancy67 font added
sadrasabouri Sep 6, 2019
93e0eb7
add : fancy68 font added
sadrasabouri Sep 6, 2019
800329e
add : fancy69 font added
sadrasabouri Sep 6, 2019
9beecb5
add : fancy70 font added
sadrasabouri Sep 6, 2019
534756f
add : fancy71 font added
sadrasabouri Sep 6, 2019
4661270
add : fancy72 font added
sadrasabouri Sep 6, 2019
a39cbf7
add : fancy73 font added
sadrasabouri Sep 6, 2019
a857a0f
add : fancy74 font added
sadrasabouri Sep 6, 2019
608e667
fix : autopep8 fixed
sadrasabouri Sep 6, 2019
6275c7c
add : font contouring1 added
sadrasabouri Sep 6, 2019
97fc3ca
add : font contouring2 added
sadrasabouri Sep 6, 2019
25a6d0e
add : CHANGELOG.md font description added
sadrasabouri Sep 7, 2019
f06121d
fix : Respected to CHANGELOG.md format, descriptions fix
sadrasabouri Sep 7, 2019
874b787
Merge pull request #63 from sadrasabouri/dev
sepandhaghighi Sep 7, 2019
5bb6803
doc : CHANGELOG updated
sepandhaghighi Sep 7, 2019
98a1c8b
doc : CONTRIBUTING.md modified
sepandhaghighi Sep 7, 2019
714be62
doc : aprint and art function docstrings updated
sepandhaghighi Sep 8, 2019
8bee77c
fix : minor edit in tprint UnicodeEncode exception #62
sepandhaghighi Sep 8, 2019
1d16ebf
fix : minor edit in aprint UnicodeEncode exception #62
sepandhaghighi Sep 8, 2019
7b8cdcd
fix : tests updated #62
sepandhaghighi Sep 8, 2019
10cfd07
doc : CHANGELOG updated #62
sepandhaghighi Sep 8, 2019
3b3082f
doc : CONTRIBUTING.md updated
sepandhaghighi Sep 8, 2019
9f2a1f6
doc : minor edit in docstring
sepandhaghighi Sep 8, 2019
cd87cc8
fix : tests updated #62
sepandhaghighi Sep 8, 2019
b594757
fix : overwrite parameter added to set_deafult function
sepandhaghighi Sep 8, 2019
ddbade1
doc : CHANGELOG updated
sepandhaghighi Sep 8, 2019
18b218c
fix : autopep8 fix
sepandhaghighi Sep 8, 2019
006a057
rel : migrate to version 4.0
sepandhaghighi Sep 8, 2019
6114ad7
doc : notebooks updated for version 4.0
sepandhaghighi Sep 8, 2019
dfe6dbb
doc : CHANGELOG date updated
sepandhaghighi Sep 12, 2019
8ec9da2
doc : README updated
sepandhaghighi Sep 12, 2019
8ff1dca
doc : minor edit in set_default docstring
sepandhaghighi Sep 12, 2019
9935404
fix : minor edit in font_wizard and font_check
sepandhaghighi Sep 12, 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
18 changes: 13 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ Please consider the following :
7. Pass all CI tests
8. Update `CHANGELOG.md`
- Describe changes under `[Unreleased]` section
9. Submit a pull request into `dev` (please complete the pull request template)

9. Update `AUTHORS.md`
- Add your name under `# Other Contributors #` section
10. Submit a pull request into `dev` (please complete the pull request template)

⚠️ If you want to suggest fonts and arts, visit [this issue](https://github.com/sepandhaghighi/art/issues/59)

## Font

Expand All @@ -39,9 +41,12 @@ Please consider the following :
7. If font is ASCII:
- Add a test case to `test.py` (*Alphabetical order*)
8. Re-run `FontList.ipynb`
9. Update counters in `README.md`
- Before this step you should re-install `art` package : ```python setup.py install```
9. Update 2 font counters in `README.md`
- Badge section
- Overview section
10. Update `Reference` section in `README.md`
11. Run `autopep8.bat` (*Optional*, need to install latest version of `autopep8` package)
11. Run `autopep8.bat`/`autopep8.sh` (*Optional*, need to install latest version of `autopep8` package)


## 1-Line art
Expand All @@ -55,5 +60,8 @@ Please consider the following :
- Add 1-line art name to `RANDOM_FILTERED_ARTS` list
5. Add a test case to `test.py` (*Alphabetical order*)
6. Re-run `ArtList.ipynb`
7. Update counters in `README.md`
- Before this step you should re-install `art` package : ```python setup.py install```
7. Update 2 art counters in `README.md`
- Badge section
- Overview section
8. Update `Reference` section in `README.md`
15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ matrix:
allow_failures:
- os: osx
language: generic
env: TOXENV=py27
env: TOXENV=py36
- os: linux
python: 3.8-dev
dist: xenial
Expand All @@ -25,7 +25,7 @@ matrix:
python: 2.7
- os: osx
language: generic
env: TOXENV=py27
env: TOXENV=py36
- os: linux
python: 3.7-dev
dist: xenial
Expand All @@ -36,12 +36,9 @@ matrix:
python: nightly
dist: xenial
install:
- pip install -r requirements.txt
- python setup.py install
- python -m art test
- chmod +x .travis/install.sh
- ./.travis/install.sh
before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install -r dev-requirements.txt --user ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip install -r dev-requirements.txt ; fi
- chmod +x otherfile/test.sh
- chmod +x .travis/test.sh
script:
- ./otherfile/test.sh
- ./.travis/test.sh
24 changes: 24 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e
set -x


PYTHON_COMMAND=python
PIP_COMMAND=pip

if [ "$TRAVIS_OS_NAME" == "osx" ]
then
PYTHON_COMMAND=python3
PIP_COMMAND=pip3
fi

$PIP_COMMAND install -r requirements.txt
$PYTHON_COMMAND setup.py install
$PYTHON_COMMAND -m art test

if [ "$TRAVIS_OS_NAME" == "osx" ]
then
$PIP_COMMAND install --upgrade --upgrade-strategy=only-if-needed -r dev-requirements.txt --user
else
$PIP_COMMAND install --upgrade --upgrade-strategy=only-if-needed -r dev-requirements.txt
fi
32 changes: 32 additions & 0 deletions .travis/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -e
set -x


IS_IN_TRAVIS=false
PYTHON_COMMAND=python

if [ "$TRAVIS_OS_NAME" == "osx" ]
then
PYTHON_COMMAND=python3
fi

if [ "$CI" = 'true' ] && [ "$TRAVIS" = 'true' ]
then
IS_IN_TRAVIS=true
fi

$PYTHON_COMMAND otherfile/version_check.py
$PYTHON_COMMAND otherfile/font_check.py
$PYTHON_COMMAND -m art testcov2

if [ "$IS_IN_TRAVIS" = 'false' ] || [ "$TRAVIS_PYTHON_VERSION" = '3.6' ]
then
$PYTHON_COMMAND -m vulture art/ otherfile/ setup.py art_profile.py --min-confidence 65 --exclude=build,.eggs --sort-by-size
$PYTHON_COMMAND -m bandit -r art -s B311
$PYTHON_COMMAND -m pydocstyle --match='(?!test).*\.py'
codecov
fi


$PYTHON_COMMAND -m cProfile -s cumtime art_profile.py
8 changes: 6 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Core Developers #
# 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 - ([http://github.com/sepandhaghighi](http://github.com/sepandhaghighi)) ([sepand.haghighi@yahoo.com](mailto:sepand.haghighi@yahoo.com))

# 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 : 3.9"
"### Version : 4.0"
]
},
{
Expand Down
39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,42 @@ 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.0] - 2019-09-12
### Added
- `install.sh`
- `autopep8.sh`
- 21 new fonts
1. fancy56
2. fancy57
3. fancy58
4. fancy59
5. fancy60
6. fancy61
7. fancy62
8. fancy63
9. fanyc64
10. fancy65
11. fancy66
12. fancy67
13. fancy68
14. fancy69
15. fanyc70
16. fancy71
17. fancy72
18. fancy73
19. fancy74
20. contouring1
21. contouring2
### Changed
- `test.sh` moved to `.travis` folder
- `font_wizard.py` updated
- `font_check.py` updated
- `tsave` function bugs fixed
- `aprint` and `tprint` functions modified
- Test system modified
- `overwrite` parameter added to `tsave` and `set_default` functions
- `README.md` modified
- `CONTRIBUTING.md` modified
## [3.9] - 2019-08-21
### Added
- `__version__` variable
Expand Down Expand Up @@ -1031,7 +1067,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/v3.9...dev
[Unreleased]: https://github.com/sepandhaghighi/art/compare/v4.0...dev
[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
[3.7]: https://github.com/sepandhaghighi/art/compare/v3.6...v3.7
Expand Down
67 changes: 65 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 : 3.9"
"### Version : 4.0"
]
},
{
Expand All @@ -38,7 +38,7 @@
{
"data": {
"text/plain": [
"440"
"461"
]
},
"execution_count": 2,
Expand Down Expand Up @@ -1179,6 +1179,12 @@
" | [___.__) | .|. /_. ._) \n",
" \n",
"\n",
"contouring1 : \n",
"ⓉⒺⓈⓉ①②③\n",
"\n",
"contouring2 : \n",
"⒯⒠⒮⒯⑴⑵⑶\n",
"\n",
"contrast : \n",
".%%%%%%..%%%%%%...%%%%...%%%%%%....%%.....%%%%...%%%%%%.\n",
"...%%....%%......%%........%%.....%%%........%%.....%%..\n",
Expand Down Expand Up @@ -1658,12 +1664,69 @@
"fancy55 : \n",
"T£§T123\n",
"\n",
"fancy56 : \n",
"𝐓𝐄𝐒𝐓𝟏𝟐𝟑\n",
"\n",
"fancy57 : \n",
"𝚃𝙴𝚂𝚃𝟷𝟸𝟹\n",
"\n",
"fancy58 : \n",
"𝕿𝕰𝕾𝕿123\n",
"\n",
"fancy59 : \n",
"𝕋𝔼𝕊𝕋𝟙𝟚𝟛\n",
"\n",
"fancy6 : \n",
"ƭεรƭ123\n",
"\n",
"fancy60 : \n",
"𝗧𝗘𝗦𝗧𝟭𝟮𝟯\n",
"\n",
"fancy61 : \n",
"𝑇𝐸𝑆𝑇123\n",
"\n",
"fancy62 : \n",
"𝘛𝘌𝘚𝘛123\n",
"\n",
"fancy63 : \n",
"𝑻𝑬𝑺𝑻123\n",
"\n",
"fancy64 : \n",
"𝙏𝙀𝙎𝙏123\n",
"\n",
"fancy65 : \n",
"𝒯𝐸𝒮𝒯𝟣𝟤𝟥\n",
"\n",
"fancy66 : \n",
"𝓣𝓔𝓢𝓣𝟏𝟐𝟑\n",
"\n",
"fancy67 : \n",
"TEST123\n",
"\n",
"fancy68 : \n",
"𝔗𝔈𝔖𝔗𝟷𝟸𝟹\n",
"\n",
"fancy69 : \n",
"ᵀᴱᶳᵀ¹²³\n",
"\n",
"fancy7 : \n",
"丅ᗴᔕ丅123\n",
"\n",
"fancy70 : \n",
"тEѕт123\n",
"\n",
"fancy71 : \n",
"ƬƐѕƬ123\n",
"\n",
"fancy72 : \n",
"ƬƐѕƬ123\n",
"\n",
"fancy73 : \n",
"ŢĚŞŢ¹²³\n",
"\n",
"fancy74 : \n",
"ŧεşŧ123\n",
"\n",
"fancy8 : \n",
"tєรt123\n",
"\n",
Expand Down
10 changes: 6 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
## Installation
## Installation

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

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

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

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

### Easy install

- Run `easy_install "art==3.9"` (Need root access)
- Run `easy_install "art==4.0"` (Need root access)
18 changes: 12 additions & 6 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-440-blue.svg"></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/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">440</td>
<td align="center">461</td>
</tr>
<tr>
<td align="center">1-Line-Art Counter</td>
Expand Down Expand Up @@ -317,7 +317,7 @@ ___ ____ _ ____ ____

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
>>> Response=tsave("art",filename="test.txt") # save ASCII text in test.txt file with save message (print_status==True), return dict
Saved!
Filename: test.txt
>>> Response["Message"]
Expand All @@ -329,6 +329,9 @@ Filename: test.txt
True
>>> tsave(22,font=DEFAULT_FONT,filename="art",chr_ignore=True,print_status=True)
{'Status': False, 'Message': "'int' object has no attribute 'split'"}
>>> Response=tsave("art",filename="test.txt",overwrite=True) # overwrite parameter is added in Version 4.0
Saved!
Filename: test.txt

```

Expand Down Expand Up @@ -606,16 +609,19 @@ ___ ____ ____ ___
>>> help(set_default)
Help on function set_default in module art.art:

set_default(font='standard', chr_ignore=True, filename='art', print_status=True)
This fuction change text2art tprint and tsave default values
set_default(font='standard', chr_ignore=True, filename='art', print_status=True, overwrite=False)
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
:param overwrite : overwrite the saved file if true (only tsave)
:type overwrite:bool
:return: None

>>> tprint("test")
Expand Down
Loading