art Python Library
repository·master·Indexed 25 days ago
https://github.com/sepandhaghighi/artA Python library for converting text into various forms of ASCII art, including 1-line art, decorated text, and different font modes. It provides utilities for generating ASCII text via text2art() and tprint(), saving art with tsave(), and creating character grids. The library also supports integration with MATLAB and includes a CLI for listing fonts and arts.
What's inside art
- ART is a Python library designed to convert standard text into fancy ASCII art. It uses the smart placement of special characters or letters to create visual shapes spread across multiple lines of text.
Python version compatibility requirements
masterPlease note the following official support limits for older Python versions:
- Python 3.6: Supported up to ART 6.4.
- Python 3.5: Supported up to ART 6.1.
- Python 2.7 & Python 3.4: Supported up to ART 4.4.
Support for these older versions on PyPI will be removed in a future release.
Handle unsupported characters in MATLAB
masterWhen usingtprint,text2art, ortsavefunctions within MATLAB, thechr_ignoreflag is not required. If the input contains unsupported characters, they will be displayed as a question mark (?) instead of being ignored.Install ART from source code
masterTo install from source, download the desired version (e.g., Version 6.5 or the Latest Source) and run the installation command from the root directory of the extracted archive.
pip install .Use ART in MATLAB via Python Libraries
masterART can be used within MATLAB by leveraging MATLAB's ability to call Python libraries. You must ensure that the Python environment containing theartpackage is configured and accessible within your MATLAB session.Install ART via PyPI
masterYou can install the
artpackage usingpip. To install the specific version 6.5, use the following command:pip install art==6.5Install ART for MATLAB
masterTo install ART for use in MATLAB, follow the specific installation instructions provided in the dedicated MATLAB installation guide: https://github.com/sepandhaghighi/art/blob/master/INSTALL.md#matlabInstall ART via Conda
masterART is available on Conda through both the public
conda-forgechannel and a private channel.To install from
conda-forge:conda install -c conda-forge ascii-artTo install from the private
sepandhaghighichannel:conda install -c sepandhaghighi artconda install -c conda-forge ascii-art # OR conda install -c sepandhaghighi artInstall and configure ART for MATLAB
masterTo use ART within MATLAB, follow these steps:
- Ensure MATLAB (>=8.5, 64/32 bit) is installed.
- Install Python 3.x (>=3.7, 64/32 bit) and ensure you select the
Add to PATHandInstall pipoptions during setup. - Install the package via pip:
pip install art. - Configure the Python interpreter in MATLAB using the
pyversioncommand with the full path to your Python executable.
>> pyversion PYTHON_EXECUTABLE_FULL_PATHImportant considerations for fonts
masterWhen working with fonts in
art, keep the following limitations in mind:- Character Support: Some fonts do not support all characters. Always verify if your input string is compatible with the chosen font.
- Non-ASCII Compatibility: Non-ASCII fonts (added in Version 3.3) may not be compatible with all terminal or system environments. Use them with caution if your environment has limited character encoding support.
Install and import the art library
masterTo use the
artlibrary, import all its functions and classes using the wildcard import syntax. This provides access to the various art generation and listing utilities.from art import *Import the art library
masterTo use the
artlibrary, import all its functions and constants using the wildcard import pattern. This provides access to various ASCII art generation, decoration, and font utilities.from art import *