• Stars
    star
    164
  • Rank 228,678 (Top 5 %)
  • Language
    Python
  • License
    Do What The F*ck ...
  • Created almost 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

generate art ascii texts

xart: generate art ascii texts. Version WTFPL License

xart is a pure Python library that provides an easy way to generate art ascii texts. Life is short, be cool.

 β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
 β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ•β•β–ˆβ–ˆβ•”β•β•β•
  β•šβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•   β–ˆβ–ˆβ•‘
  β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘
 β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
 β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•   β•šβ•β•

Getting Started


help

$ xart -h
usage: __init__.py [-h] [-f FONT] [-c COLOR] [-i] [-s] [-l] [-v]

xart : generate art ascii texts.

optional arguments:
  -h, --help            show this help message and exit
  -f FONT, --font FONT  font to render with, default random
  -c COLOR, --color COLOR
                        font color, default WHITE, all : BLACK, RED, GREEN,
                        YELLOW, BLUE, PURPLE, CYAN, GRAY, WHITE
  -i, --info            show information of given font
  -s, --show            show random fonts
  -l, --list            list all supported fonts
  -v, --version         version

generate ascii text via random font

$ xart test
    β–ˆβ–ˆβ–ˆ        β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ    β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     β–ˆβ–ˆβ–ˆ
β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„   β–ˆβ–ˆβ–ˆ    β–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ    β–ˆβ–ˆβ–ˆ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„
   β–€β–ˆβ–ˆβ–ˆβ–€β–€β–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ    β–ˆβ–€    β–ˆβ–ˆβ–ˆ    β–ˆβ–€     β–€β–ˆβ–ˆβ–ˆβ–€β–€β–ˆβ–ˆ
    β–ˆβ–ˆβ–ˆ   β–€  β–„β–ˆβ–ˆβ–ˆβ–„β–„β–„       β–ˆβ–ˆβ–ˆ            β–ˆβ–ˆβ–ˆ   β–€
    β–ˆβ–ˆβ–ˆ     β–€β–€β–ˆβ–ˆβ–ˆβ–€β–€β–€     β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     β–ˆβ–ˆβ–ˆ
    β–ˆβ–ˆβ–ˆ       β–ˆβ–ˆβ–ˆ    β–ˆβ–„           β–ˆβ–ˆβ–ˆ     β–ˆβ–ˆβ–ˆ
    β–ˆβ–ˆβ–ˆ       β–ˆβ–ˆβ–ˆ    β–ˆβ–ˆβ–ˆ    β–„β–ˆ    β–ˆβ–ˆβ–ˆ     β–ˆβ–ˆβ–ˆ
   β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€     β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€

generate ascii text via given font

$ xart test -f 3D_Diagonal

    ___                                 ___
  ,--.'|_                             ,--.'|_
  |  | :,'                            |  | :,'
  :  : ' :               .--.--.      :  : ' :
.;__,'  /      ,---.    /  /    '   .;__,'  /
|  |   |      /     \  |  :  /`./   |  |   |
:__,'| :     /    /  | |  :  ;_     :__,'| :
  '  : |__  .    ' / |  \  \    `.    '  : |__
  |  | '.'| '   ;   /|   `----.   \   |  | '.'|
  ;  :    ; '   |  / |  /  /`--'  /   ;  :    ;
  |  ,   /  |   :    | '--'.     /    |  ,   /
   ---`-'    \   \  /    `--'---'      ---`-'
              `----'

generate ascii text via given color

$ xart -cRED test

COLOR

show all supported fonts

$ xart -l
xart : generate art ascii texts.

  0. 1Row
  1. 3-D
  ...
  277. Wow

All 278 fonts.

show font infomation

$ xart -i -f Weird
weird.flf (version 2)
by:  Bas Meijer   [email protected]   [email protected]
fixed by: Ryan Youck   [email protected]
some special characters '#%*' etc. are not matching, they are from other fonts.
Explanation of first line:
flf2 - "magic number" for file identification
a    - should always be `a', for now
$    - the "hardblank" -- prints as a blank, but can't be smushed
6    - height of a character
5    - height of a character, not including descenders
20   - max line length (excluding comment lines) + a fudge factor
15   - default smushmode for this font (like "-m 15" on command line)
13   - number of comment lines

version

$ xart -v
xart : generate art ascii fonts, version 0.1.5.

    ,----..                 ,----,              ,----..
   /   /   \              .'   .' \            /   /   \
  /   .     :           ,----,'    |          /   .     :
 .   /   ;.  \          |    :  .  ;         .   /   ;.  \
.   ;   /  ` ;          ;    |.'  /         .   ;   /  ` ;
;   |  ; \ ; |          `----'/  ;          ;   |  ; \ ; |
|   :  | ; | '            /  ;  /           |   :  | ; | '
.   |  ' ' ' :           ;  /  /-,          .   |  ' ' ' :
'   ;  \; /  |          /  /  /.`|          '   ;  \; /  |
 \   \  ',  /   ___   ./__;      :    ___    \   \  ',  /
  ;   :    /   /  .\  |   :    .'    /  .\    ;   :    /
   \   \ .'    \  ; | ;   | .'       \  ; |    \   \ .'
    `---`       `--"  `---'           `--"      `---`

Installation


xart is hosted on PYPI and can be installed as such:

$ pip install xart

Alternatively, you can also get the latest source code from GitHub and install it manually:

$ git clone [email protected]:xlzd/xart.git
$ cd xart
$ python setup.py install

For update:

$ pip install xart --upgrade

License


WTFPL (here)