pyfiglet


Namepyfiglet JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/pwaller/pyfiglet
SummaryPure-python FIGlet implementation
upload_time2023-09-13 20:56:21
maintainer
docs_urlNone
authorPeter Waller (Thanks to Christopher Jones and Stefano Rivera)
requires_python>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # **pyfiglet**

```
                        _|_|  _|            _|              _|
_|_|_|    _|    _|    _|            _|_|_|  _|    _|_|    _|_|_|_|
_|    _|  _|    _|  _|_|_|_|  _|  _|    _|  _|  _|_|_|_|    _|
_|    _|  _|    _|    _|      _|  _|    _|  _|  _|          _|
_|_|_|      _|_|_|    _|      _|    _|_|_|  _|    _|_|_|      _|_|
_|              _|                      _|
_|          _|_|                    _|_|
```

## **Synopsis**

pyfiglet is a full port of FIGlet (http://www.figlet.org/) into pure
python. It takes ASCII text and renders it in ASCII art fonts (like
the title above, which is the 'block' font).

## **FAQ**

- **Q**: Why? WHY?!!

  **A**: I was bored. Really bored.
- **Q**: What the hell does this do that FIGlet doesn't?

  **A**: Not much, except allow your font collection to live
           in one big zipfile. The point of this code is to embed
           dynamic figlet rendering in Python without having to
           execute an external program, although it operates on the
           commandline as well.  See below for USAGE details. You can
           think of this as a python FIGlet driver.
- **Q**: Does this support kerning/smushing like FIGlet?

  **A**: Yes, yes it does. Output should be identical to FIGlet. If
           not, this is a bug, which you should report to me!
- **Q**: Can I use/modify/redstribute this code?

  **A**: Yes, under the terms of the MIT (see LICENSE below).
- **Q**: I improved this code, what should I do with it?

  **A**: You can submit changes to https://github.com/pwaller/pyfiglet/pulls.
           If you make changes to the kerning/mushing/rendering portion, PLEASE
           test it throroughly. The code is fragile and complex.
- **Q**: Where did my font go?

  **A**: It turns out that we didn't have distribution rights for some of the
           fonts and so we had to remove them.  Full details of the change and
           why we did it are in https://github.com/pwaller/pyfiglet/issues/59.
- **Q**: Where can I find these and other fonts?

  **A**: Do a quick search for "figlet fonts" on your favourite search engine
           should give you what you need.  However, if you are looking for the
           specific removed fonts, please go to http://www.jave.de/figlet/fonts.html.

- **Q** Why are some fonts missing in <my favourite> distribution?
  **A** Some Linux distributions have very strict legal restrictions on what
           contributions they will take.  For these systems, we have divided the
           fonts into ones that have a clear redistribution license and those that
           don't.  These are the fonts-standard and fonts-contrib directories in
           this repository.
- **Q** What about those other fonts?
  **A** While there isn't a watertight case for the license, we believe that
           any legal constraint for these fonts has long expired and so they
           are public domain, so are continuing to redistribute via pypi.  If
           an owner of any of these fonts wants us to stop, please just
           raise an issue on https://github.com/pwaller/pyfiglet/issues
           proving your ownership and we will remove the requested fonts.


## **Usage**

You can use pyfiglet in one of two ways. First, it operates on the
commandline as C figlet does and supports most of the same options.
Run with `--help` to see a full list of tweaks.  Mostly you will only
use `-f` to change the font. It defaults to standard.flf.

`tools/pyfiglet 'text to render'`

### Pyfiglet is also a library that can be used in python code:

```py
from pyfiglet import Figlet
f = Figlet(font='slant')
print(f.renderText('text to render'))
```

or

```py
from pyfiglet import Figlet
f = pyfiglet.figlet_format("text to render", font="slant")
print(f)
```
If you have found some new fonts that you want to use, you can use the
command line interface to install your font file as follows:

`pyfiglet -L <font file>`

The font file can be a ZIP file of lots of fonts or just a single font.
Depending on how you installed pyfiglet, you may find that you need
root access to install the font - e.g. `sudo pyfiglet -L <font file>`.

## **Author**

All of the documentation and the majority of the work done was by
Christopher Jones (cjones@insub.org) and many other ccontributors.
Packaged by Peter Waller (p@pwaller.net), various enhancements by
Stefano Rivera (stefano@rivera.za.net),
and lots of help from many contributors!

Thank you all for your efforts, please send a pull request to add yourself to
this list if you would like to take credit.

(In the words of the original author) pyfiglet is a **port** of FIGlet, and much
of the code is directly translated from the C source. I optimized some bits
where I could, but because the smushing and kerning code is so incredibly
complex, it was safer and easier to port the logic almost exactly. Therefore, I
can't really take much credit for authorship, just translation. The original
authors of FIGlet are listed on their website at http://www.figlet.org/.

The Python port was done by Christopher Jones <cjones@insub.org> (http://gruntle.org/).

It is currently maintained by Peter Waller (p@pwaller.net, github:pwaller)

The toilet fonts (.tlf) were imported from toilet 0.3-1, by Sam Hocevar (sam@zoy.org).

## **Thanks**

Lots of people have helped make pyfiglet what it is but I particularly want to
call out.

github:stefanor for various bug fixes and improvements and the debian packaging.
github:peterbrittain for helping to close lots of issues.


## **License**
The MIT License (MIT)
Copyright © 2007-2023
```
Christopher Jones <cjones@insub.org>
Stefano Rivera <stefano@rivera.za.net>
Peter Waller <p@pwaller.net>
And various contributors (see git history).
```
(see LICENSE for full details)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pwaller/pyfiglet",
    "name": "pyfiglet",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "Peter Waller (Thanks to Christopher Jones and Stefano Rivera)",
    "author_email": "p@pwaller.net",
    "download_url": "https://files.pythonhosted.org/packages/a0/f2/2649b2acace54f861eccd4ab163bfd914236fc93ddb1df02dad2a2552b14/pyfiglet-1.0.2.tar.gz",
    "platform": null,
    "description": "# **pyfiglet**\n\n```\n                        _|_|  _|            _|              _|\n_|_|_|    _|    _|    _|            _|_|_|  _|    _|_|    _|_|_|_|\n_|    _|  _|    _|  _|_|_|_|  _|  _|    _|  _|  _|_|_|_|    _|\n_|    _|  _|    _|    _|      _|  _|    _|  _|  _|          _|\n_|_|_|      _|_|_|    _|      _|    _|_|_|  _|    _|_|_|      _|_|\n_|              _|                      _|\n_|          _|_|                    _|_|\n```\n\n## **Synopsis**\n\npyfiglet is a full port of FIGlet (http://www.figlet.org/) into pure\npython. It takes ASCII text and renders it in ASCII art fonts (like\nthe title above, which is the 'block' font).\n\n## **FAQ**\n\n- **Q**: Why? WHY?!!\n\n  **A**: I was bored. Really bored.\n- **Q**: What the hell does this do that FIGlet doesn't?\n\n  **A**: Not much, except allow your font collection to live\n           in one big zipfile. The point of this code is to embed\n           dynamic figlet rendering in Python without having to\n           execute an external program, although it operates on the\n           commandline as well.  See below for USAGE details. You can\n           think of this as a python FIGlet driver.\n- **Q**: Does this support kerning/smushing like FIGlet?\n\n  **A**: Yes, yes it does. Output should be identical to FIGlet. If\n           not, this is a bug, which you should report to me!\n- **Q**: Can I use/modify/redstribute this code?\n\n  **A**: Yes, under the terms of the MIT (see LICENSE below).\n- **Q**: I improved this code, what should I do with it?\n\n  **A**: You can submit changes to https://github.com/pwaller/pyfiglet/pulls.\n           If you make changes to the kerning/mushing/rendering portion, PLEASE\n           test it throroughly. The code is fragile and complex.\n- **Q**: Where did my font go?\n\n  **A**: It turns out that we didn't have distribution rights for some of the\n           fonts and so we had to remove them.  Full details of the change and\n           why we did it are in https://github.com/pwaller/pyfiglet/issues/59.\n- **Q**: Where can I find these and other fonts?\n\n  **A**: Do a quick search for \"figlet fonts\" on your favourite search engine\n           should give you what you need.  However, if you are looking for the\n           specific removed fonts, please go to http://www.jave.de/figlet/fonts.html.\n\n- **Q** Why are some fonts missing in <my favourite> distribution?\n  **A** Some Linux distributions have very strict legal restrictions on what\n           contributions they will take.  For these systems, we have divided the\n           fonts into ones that have a clear redistribution license and those that\n           don't.  These are the fonts-standard and fonts-contrib directories in\n           this repository.\n- **Q** What about those other fonts?\n  **A** While there isn't a watertight case for the license, we believe that\n           any legal constraint for these fonts has long expired and so they\n           are public domain, so are continuing to redistribute via pypi.  If\n           an owner of any of these fonts wants us to stop, please just\n           raise an issue on https://github.com/pwaller/pyfiglet/issues\n           proving your ownership and we will remove the requested fonts.\n\n\n## **Usage**\n\nYou can use pyfiglet in one of two ways. First, it operates on the\ncommandline as C figlet does and supports most of the same options.\nRun with `--help` to see a full list of tweaks.  Mostly you will only\nuse `-f` to change the font. It defaults to standard.flf.\n\n`tools/pyfiglet 'text to render'`\n\n### Pyfiglet is also a library that can be used in python code:\n\n```py\nfrom pyfiglet import Figlet\nf = Figlet(font='slant')\nprint(f.renderText('text to render'))\n```\n\nor\n\n```py\nfrom pyfiglet import Figlet\nf = pyfiglet.figlet_format(\"text to render\", font=\"slant\")\nprint(f)\n```\nIf you have found some new fonts that you want to use, you can use the\ncommand line interface to install your font file as follows:\n\n`pyfiglet -L <font file>`\n\nThe font file can be a ZIP file of lots of fonts or just a single font.\nDepending on how you installed pyfiglet, you may find that you need\nroot access to install the font - e.g. `sudo pyfiglet -L <font file>`.\n\n## **Author**\n\nAll of the documentation and the majority of the work done was by\nChristopher Jones (cjones@insub.org) and many other ccontributors.\nPackaged by Peter Waller (p@pwaller.net), various enhancements by\nStefano Rivera (stefano@rivera.za.net),\nand lots of help from many contributors!\n\nThank you all for your efforts, please send a pull request to add yourself to\nthis list if you would like to take credit.\n\n(In the words of the original author) pyfiglet is a **port** of FIGlet, and much\nof the code is directly translated from the C source. I optimized some bits\nwhere I could, but because the smushing and kerning code is so incredibly\ncomplex, it was safer and easier to port the logic almost exactly. Therefore, I\ncan't really take much credit for authorship, just translation. The original\nauthors of FIGlet are listed on their website at http://www.figlet.org/.\n\nThe Python port was done by Christopher Jones <cjones@insub.org> (http://gruntle.org/).\n\nIt is currently maintained by Peter Waller (p@pwaller.net, github:pwaller)\n\nThe toilet fonts (.tlf) were imported from toilet 0.3-1, by Sam Hocevar (sam@zoy.org).\n\n## **Thanks**\n\nLots of people have helped make pyfiglet what it is but I particularly want to\ncall out.\n\ngithub:stefanor for various bug fixes and improvements and the debian packaging.\ngithub:peterbrittain for helping to close lots of issues.\n\n\n## **License**\nThe MIT License (MIT)\nCopyright \u00a9 2007-2023\n```\nChristopher Jones <cjones@insub.org>\nStefano Rivera <stefano@rivera.za.net>\nPeter Waller <p@pwaller.net>\nAnd various contributors (see git history).\n```\n(see LICENSE for full details)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pure-python FIGlet implementation",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/pwaller/pyfiglet"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a03bef6fff907e212d67a0003f8ea4819307bba91b2856074a0763dd483ccc4",
                "md5": "e0096389091aaaf4ba30afd005d5c5bd",
                "sha256": "889b351d79c99e50a3f619c8f8e6ffdb27fd8c939fc43ecbd7559bd57d5f93ea"
            },
            "downloads": -1,
            "filename": "pyfiglet-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e0096389091aaaf4ba30afd005d5c5bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 1085824,
            "upload_time": "2023-09-13T20:56:18",
            "upload_time_iso_8601": "2023-09-13T20:56:18.707501Z",
            "url": "https://files.pythonhosted.org/packages/1a/03/bef6fff907e212d67a0003f8ea4819307bba91b2856074a0763dd483ccc4/pyfiglet-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a0f22649b2acace54f861eccd4ab163bfd914236fc93ddb1df02dad2a2552b14",
                "md5": "0cb431d9b6b11de98a635f5466455a63",
                "sha256": "758788018ab8faaddc0984e1ea05ff330d3c64be663c513cc1f105f6a3066dab"
            },
            "downloads": -1,
            "filename": "pyfiglet-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0cb431d9b6b11de98a635f5466455a63",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 832345,
            "upload_time": "2023-09-13T20:56:21",
            "upload_time_iso_8601": "2023-09-13T20:56:21.022162Z",
            "url": "https://files.pythonhosted.org/packages/a0/f2/2649b2acace54f861eccd4ab163bfd914236fc93ddb1df02dad2a2552b14/pyfiglet-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-13 20:56:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pwaller",
    "github_project": "pyfiglet",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyfiglet"
}
        
Elapsed time: 0.14345s