Skip to content

Commit

Permalink
Merge pull request #191 from sepandhaghighi/dev
Browse files Browse the repository at this point in the history
Version 5.4
  • Loading branch information
sepandhaghighi authored Dec 22, 2021
2 parents 12a7aee + 03866fb commit 43a62ee
Show file tree
Hide file tree
Showing 24 changed files with 1,377 additions and 995 deletions.
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Please consider the following :
6. If font is **Non-ASCII**:
- Add font name to `NON_ASCII_FONTS` list
- Add a test case to `test2.py` (*Alphabetical order*)
- Add font name to `MIX_FILTERED_FONTS` list to remove it from mix mode (*Optional*)
7. If font is **ASCII**:
- Add a test case to `test.py` (*Alphabetical order*)
- Add font name to `RANDOM_FILTERED_FONTS` list to remove it from random modes (*Optional*)
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/greetings.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10.0]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
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 - [@sepandhaghighi](http://github.com/sepandhaghighi)
- Sadra Sabouri - Sharif University Of Technology - [@sadrasabouri](https://github.com/sadrasabouri)
- Sepand Haghighi - Sharif University of Technology - [@sepandhaghighi](http://github.com/sepandhaghighi)
- Sadra Sabouri - Sharif University of Technology - [@sadrasabouri](https://github.com/sadrasabouri)

# Other Contributors #
----------
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 : 5.3"
"### Version : 5.4"
]
},
{
Expand Down
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ 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]
## [5.4] - 2021-12-22
### Added
- 10 new font
1. fancy131
2. fancy132
3. fancy133
4. fancy134
5. fancy135
6. fancy136
7. fancy137
8. tarty1
9. tarty2
10. tarty3
- Discord badge
### Changed
- Some fonts width bug fixed
- `test.py` modified
- `font_wizard.py` modified
- `font_check.py` modified
- `art_decor_check.py` modified
- `__word2art` function modified
- `mix_letters` function modified
- `AUTHORS.md` updated
- License updated
- `README.md` modified
- `CONTRIBUTING.md` modified
- `Python 3.10` added to `test.yml`
### Removed
- `greetings.yml`
## [5.3] - 2021-08-30
### Added
- 10 new font
Expand All @@ -22,6 +51,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `fantasy` font renamed to `fantasy1`
- `upside_down` font renamed to `upside_down1`
- `sep` parameter added to `text2art`, `tprint`, `tsave` and `set_default` functions
- Default line separator changed from `\r\n` to `\n`
- `__word2art` function modified
- Escaped `\ ` in string literals
## [5.2] - 2021-05-05
Expand Down Expand Up @@ -1954,7 +1984,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/v5.3...dev
[Unreleased]: https://github.com/sepandhaghighi/art/compare/v5.4...dev
[5.4]: https://github.com/sepandhaghighi/art/compare/v5.3...v5.4
[5.3]: https://github.com/sepandhaghighi/art/compare/v5.2...v5.3
[5.2]: https://github.com/sepandhaghighi/art/compare/v5.1...v5.2
[5.1]: https://github.com/sepandhaghighi/art/compare/v5.0...v5.1
Expand Down
2 changes: 1 addition & 1 deletion DecorList.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Version : 5.3"
"### Version : 5.4"
]
},
{
Expand Down
50 changes: 46 additions & 4 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 : 5.3"
"### Version : 5.4"
]
},
{
Expand All @@ -38,7 +38,7 @@
{
"data": {
"text/plain": [
"605"
"615"
]
},
"execution_count": 2,
Expand Down Expand Up @@ -640,7 +640,7 @@
"\n",
"block : \n",
"\n",
" .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------.\n",
" .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. \n",
"| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |\n",
"| | _________ | || | _________ | || | _______ | || | _________ | || | __ | || | _____ | || | ______ | |\n",
"| | | _ _ | | || | |_ ___ | | || | / ___ | | || | | _ _ | | || | / | | || | / ___ `. | || | / ____ `. | |\n",
Expand All @@ -650,7 +650,7 @@
"| | |_____| | || | |_________| | || | |_______.' | || | |_____| | || | |_____| | || | |_______| | || | \\______.' | |\n",
"| | | || | | || | | || | | || | | || | | || | | |\n",
"| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |\n",
" '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------'\n",
" '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' \n",
"\n",
"block2 : \n",
" \n",
Expand Down Expand Up @@ -3881,6 +3881,27 @@
"fancy130 : \n",
"𐨠𐌴Ⲋ𐨠𐄐𐄑𐄒\n",
"\n",
"fancy131 : \n",
"ᵀᴱᔆᵀ¹²³\n",
"\n",
"fancy132 : \n",
"𝕋𝔼𝕊𝕋𝟙𝟚𝟛\n",
"\n",
"fancy133 : \n",
"𝙏𝙀𝙎𝙏123\n",
"\n",
"fancy134 : \n",
"𝑻𝑬𝑺𝑻123\n",
"\n",
"fancy135 : \n",
"𝐓𝐄𝐒𝐓𝟏𝟐𝟑\n",
"\n",
"fancy136 : \n",
"𝗧𝗘𝗦𝗧𝟭𝟮𝟯\n",
"\n",
"fancy137 : \n",
"𝕿𝕰𝕾𝕿123\n",
"\n",
"fancy14 : \n",
"ȶɛֆȶ123\n",
"\n",
Expand Down Expand Up @@ -4346,6 +4367,27 @@
"tai_viet : \n",
"ꪻꫀᦓꪻ᧒ᒿᗱ\n",
"\n",
"tarty1 : \n",
"\n",
"████████╗███████╗░██████╗████████╗░░███╗░░██████╗░██████╗░\n",
"╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝░████║░░╚════██╗╚════██╗\n",
"░░░██║░░░█████╗░░╚█████╗░░░░██║░░░██╔██║░░░░███╔═╝░█████╔╝\n",
"░░░██║░░░██╔══╝░░░╚═══██╗░░░██║░░░╚═╝██║░░██╔══╝░░░╚═══██╗\n",
"░░░██║░░░███████╗██████╔╝░░░██║░░░███████╗███████╗██████╔╝\n",
"░░░╚═╝░░░╚══════╝╚═════╝░░░░╚═╝░░░╚══════╝╚══════╝╚═════╝░\n",
"\n",
"tarty2 : \n",
" \n",
"▀█▀ █▀▀ █▀ ▀█▀ ▄█ ▀█ \n",
"░█░ ██▄ ▄█ ░█░ ░█ █▄ \n",
" \n",
"\n",
"tarty3 : \n",
" \n",
"▀▀█▀▀ ░█▀▀▀ ░█▀▀▀█ ▀▀█▀▀ ▄█─ █▀█ █▀▀█ \n",
"─░█── ░█▀▀▀ ─▀▀▀▄▄ ─░█── ─█─ ─▄▀ ──▀▄ \n",
"─░█── ░█▄▄▄ ░█▄▄▄█ ─░█── ▄█▄ █▄▄ █▄▄█ \n",
"\n",
"thin2 : \n",
"test123\n",
"\n",
Expand Down
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
⚠️ **PyPI** support of these versions will be removed in a **future release**

### Source code
- Download [Version 5.3](https://github.com/sepandhaghighi/art/archive/v5.3.zip) or [Latest Source ](https://github.com/sepandhaghighi/art/archive/dev.zip)
- Download [Version 5.4](https://github.com/sepandhaghighi/art/archive/v5.4.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==5.3` or `pip3 install art==5.3` (Need root access)
- `pip install art==5.4` or `pip3 install art==5.4` (Need root access)

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

Expand All @@ -23,7 +23,7 @@

### Easy install

- Run `easy_install "art==5.3"` (Need root access)
- Run `easy_install "art==5.4"` (Need root access)

### MATLAB

Expand Down
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ MIT License

Copyright (c) 2017 Sepand Haghighi

Copyright (c) 2020 Sadra Sabouri

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
56 changes: 42 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
</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-605-blue.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/FontList.ipynb"><img src="https://img.shields.io/badge/Font List-615-blue.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/ArtList.ipynb"><img src="https://img.shields.io/badge/Art List-710-orange.svg"></a>
<a href="https://github.com/sepandhaghighi/art/blob/master/DecorList.ipynb"><img src="https://img.shields.io/badge/Decor List-218-green.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>
<a href="https://discord.com/invite/FAAyq3QJqP"><img src="https://img.shields.io/discord/897532566301724722.svg" alt="Discord Channel"></a>
</div>

----------
Expand All @@ -36,7 +37,7 @@
* [Contribution](https://github.com/sepandhaghighi/art/blob/master/.github/CONTRIBUTING.md)
* [Reference](https://github.com/sepandhaghighi/art#reference)
* [Authors](https://github.com/sepandhaghighi/art/blob/master/AUTHORS.md)
* [License](https://github.com/sepandhaghighi/art#license)
* [License](https://github.com/sepandhaghighi/art/blob/master/LICENSE)
* [Show Your Support](https://github.com/sepandhaghighi/art#show-your-support)
* [Changelog](https://github.com/sepandhaghighi/art/blob/master/CHANGELOG.md)
* [Code of Conduct](https://github.com/sepandhaghighi/art/blob/master/.github/CODE_OF_CONDUCT.md)
Expand All @@ -56,15 +57,15 @@ ART is a Python lib for text converting to ASCII art fancy. ;-)
</tr>
<tr>
<td align="center">PyPI Counter</td>
<td align="center"><a href="http://pepy.tech/count/art"><img src="http://pepy.tech/badge/art"></a></td>
<td align="center"><a href="http://pepy.tech/project/art"><img src="http://pepy.tech/badge/art"></a></td>
</tr>
<tr>
<td align="center">Github Stars</td>
<td align="center"><a href="https://github.com/sepandhaghighi/art"><img src="https://img.shields.io/github/stars/sepandhaghighi/art.svg?style=social&label=Stars"></a></td>
</tr>
<tr>
<td align="center">Font Counter</td>
<td align="center">605</td>
<td align="center">615</td>
</tr>
<tr>
<td align="center">1-Line-Art Counter</td>
Expand Down Expand Up @@ -647,7 +648,7 @@ ___ ____ ____ ___
>>> help(set_default)
Help on function set_default in module art.art:

set_default(font='standard', chr_ignore=True, filename='art', print_status=True, overwrite=False, decoration=None)
set_default(font='standard', chr_ignore=True, filename='art', print_status=True, overwrite=False, decoration=None, sep='\n')
Change text2art, tprint and tsave default values.

:param font: input font
Expand All @@ -662,6 +663,8 @@ set_default(font='standard', chr_ignore=True, filename='art', print_status=True,
:type overwrite:bool
:param decoration: input decoration
:type decoration:str
:param sep: line separator char
:type sep: str
:return: None

>>> tprint("test")
Expand Down Expand Up @@ -780,10 +783,11 @@ Just send your text to one of these bots. 👇👇👇👇

## 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]").

* Please complete the issue template
1. Fill an issue and describe it. We'll check it ASAP!
- Please complete the issue template
2. Discord : [https://discord.com/invite/FAAyq3QJqP](https://discord.com/invite/FAAyq3QJqP)
3. Website : [https://www.4r7.ir](https://www.4r7.ir)
4. Email : [[email protected]](mailto:[email protected] "[email protected]")

## Dependencies

Expand All @@ -798,10 +802,6 @@ or send an email to [[email protected]](mailto:[email protected] "[email protected]").
</tr>
</table>

## License

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsepandhaghighi%2Fart.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsepandhaghighi%2Fart?ref=badge_large)

## Reference

1. [FIGlet](http://www.figlet.org/)
Expand Down Expand Up @@ -831,6 +831,7 @@ or send an email to [[email protected]](mailto:[email protected] "[email protected]").
25. [Playing cards in Unicode](https://en.m.wikipedia.org/wiki/Playing_cards_in_Unicode)
26. [Text Generator](https://coolfonts.text-generator.org/)
27. [GOGOTEXT](https://instafontsgen.codesdetail.com)
28. [Fsymbols](https://fsymbols.com/)


* Logo designed by [Arta Khanalizadeh](https://www.linkedin.com/in/artakhanalizadeh)
Expand Down Expand Up @@ -864,5 +865,32 @@ bnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qef
<h4>Dash</h4>
Xd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3s
<h4>Stellar</h4>

GALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNL
<h4>Zilliqa</h4>
zil1knmz8zj88cf0exr2ry7nav9elehxfcgqu3c5e5
<h4>Coffeete</h4>
<a href="http://www.coffeete.ir/opensource">
<img src="http://www.coffeete.ir/images/buttons/lemonchiffon.png" style="width:260px;" />
</a>
<h4>Gitcoin</h4>
<a href="https://gitcoin.co/grants/3408/ascii-art-library-for-python">
<img src="https://github.com/sepandhaghighi/art/raw/master/otherfile/gitcoin_btn.png" style="width:260px;" />
</a>

<h3>Become a sponsor to ART</h3>

* Contact us at the email first

<h4>Corporate sponsor</h4>

- **$250** a month
- Your company's logo can be featured on **Readme**
- Intended for small companies


<h4>Mega corporate sponsor</h4>

- **$500** a month
- Your company's logo can be featured on **Readme** and **Website**
- Intended for medium-sized companies

10 changes: 3 additions & 7 deletions art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,9 @@ def mix_letters():
:return: letters as list
"""
letters = fancy1_dic.copy()
fonts = list(set(NON_ASCII_FONTS) - set(MIX_FILTERED_FONTS))
for i in letters.keys():
random_font = random.choice(NON_ASCII_FONTS)
random_font = random.choice(fonts)
letters[i] = get_font_dic(random_font)[i]
return letters

Expand Down Expand Up @@ -459,12 +460,7 @@ def __word2art(word, font, chr_ignore, letters, next_word, sep="\n"):
return ""
for i in range(len(split_list[0])):
temp = ""
for j,item in enumerate(split_list):
if j > 0 and (
i == 1 or i == len(
split_list[0]) -
2) and font == "block":
temp = temp + " "
for j, item in enumerate(split_list):
temp = temp + item[i]
result_list.append(temp)
result = (splitter).join(result_list)
Expand Down
Loading

0 comments on commit 43a62ee

Please sign in to comment.