Skip to main content
          _____                    _____                    _____                _____
         /\    \                  /\    \                  /\    \              /\    \
        /::\    \                /::\    \                /::\    \            /::\    \
       /::::\    \              /::::\    \              /::::\    \           \:::\    \
      /::::::\    \            /::::::\    \            /::::::\    \           \:::\    \
     /:::/\:::\    \          /:::/\:::\    \          /:::/\:::\    \           \:::\    \
    /:::/__\:::\    \        /:::/__\:::\    \        /:::/__\:::\    \           \:::\    \
   /::::\   \:::\    \      /::::\   \:::\    \      /::::\   \:::\    \          /::::\    \
  /::::::\   \:::\    \    /::::::\   \:::\    \    /::::::\   \:::\    \        /::::::\    \
 /:::/\:::\   \:::\    \  /:::/\:::\   \:::\    \  /:::/\:::\   \:::\____\      /:::/\:::\    \
/:::/  \:::\   \:::\____\/:::/  \:::\   \:::\____\/:::/  \:::\   \:::|    |    /:::/  \:::\____\
\::/    \:::\   \::/    /\::/    \:::\  /:::/    /\::/   |::::\  /:::|____|   /:::/    \::/    /
 \/____/ \:::\   \/____/  \/____/ \:::\/:::/    /  \/____|:::::\/:::/    /   /:::/    / \/____/
          \:::\    \               \::::::/    /         |:::::::::/    /   /:::/    /
           \:::\____\               \::::/    /          |::|\::::/    /   /:::/    /
            \::/    /               /:::/    /           |::| \::/____/    \::/    /
             \/____/               /:::/    /            |::|  ~|           \/____/
   __                _            /:::/    /             |::|   |
  / _|  __ _   _ _  | |_         /:::/    /              \::|   |
 |  _| / _` | | '_| |  _|        \::/    /                \:|   |
 |_|   \__,_| |_|    \__|         \/____/                  \|___|

    ,...
  .d' ""                    mm         ,dPYb,                           I8
  dM`                       MM         IP'`Yb                           I8
 mMMmm   ,6"Yb.  `7Mb,od8 mmMMmm       I8  8I                        88888888
  MM    8)   MM    MM' "'   MM         I8  8'                           I8
  MM     ,pm9MM    MM       MM         I8 dP     ,gggg,gg   ,gggggg,    I8
  MM    8M   MM    MM       MM         I8dP     dP"  "Y8I   dP""""8I    I8
.JMML.  `Moo9^Yo..JMML.     `Mbmo      I8P     i8'    ,8I  ,8'    8I   ,I8,
                                      ,d8b,_  ,d8,   ,d8b,,dP     Y8, ,d88b,
                                      PI8"8888P"Y8888P"`Y88P      `Y888P""Y88
 _______  _______  ______    _______  I8 `8,
|       ||   _   ||    _ |  |       | I8  `8,       ___       __  ___
|    ___||  |_|  ||   | ||  |_     _| I8   8I      |__   /\  |__)  |
|   |___ |       ||   |_||_   |   |   I8   8I      |    /~~\ |  \  |
|    ___||       ||    __  |  |   |   I8, ,8'
|   |    |   _   ||   |  | |  |   |    "Y8P'
|___|    |__| |__||___|  |_|  |___|

         _               _                   _             _
        /\ \            / /\                /\ \          /\ \
       /  \ \          / /  \              /  \ \         \_\ \
      / /\ \ \        / / /\ \            / /\ \ \        /\__ \
     / / /\ \_\      / / /\ \ \          / / /\ \_\      / /_ \ \
    / /_/_ \/_/     / / /  \ \ \        / / /_/ / /     / / /\ \ \
   / /____/\       / / /___/ /\ \      / / /__\/ /     / / /  \/_/
  / /\____\/      / / /_____/ /\ \    / / /_____/     / / /
 / / /           / /_________/\ \ \  / / /\ \ \      / / /
/ / /           / / /_       __\ \_\/ / /  \ \ \    /_/ /
\/_/            \_\___\     /____/_/\/_/    \_\/    \_\/

 # ---------------------------------  fart!  --------------------------------- #
Latest PyPI version

Make text banners to visually divide segments in your code with fart.

What’s a fart?

//-----------------------------------------------------------------------------//
//                               This is a fart.                               //
//-----------------------------------------------------------------------------//


#=============================================================================#
#              ____              _           _     _       _                  #
#             / ___|    ___     (_)  ___    | |_  | |__   (_)  ___            #
#             \___ \   / _ \    | | / __|   | __| | '_ \  | | / __|           #
#              ___) | | (_) |   | | \__ \   | |_  | | | | | | \__ \           #
#             |____/   \___/    |_| |___/    \__| |_| |_| |_| |___/           #
#                                                                             #
#=============================================================================#

Fart is short for Figlet ART. This program is very similar to Figlet, and most fonts are borrowed from from it. Fart is focused on making text banners for use in code documentation.

As such, all generated text is encapsulated by commenting characters and copied to clipboard, so you can easily paste your fart into your code.

Usage

There are two types of farts currently supported:

$ fart text-box style

#=============================================================================#
#                                text-box style                               #
#=============================================================================#

$ fart -o one-line text-box style

#=========================  one-line text-box style  =========================#

and…

$ fart --font big figlet style

#=============================================================================#
#        __   _           _          _             _             _            #
#       / _| (_)         | |        | |           | |           | |           #
#      | |_   _    __ _  | |   ___  | |_     ___  | |_   _   _  | |   ___     #
#      |  _| | |  / _` | | |  / _ \ | __|   / __| | __| | | | | | |  / _ \    #
#      | |   | | | (_| | | | |  __/ | |_    \__ \ | |_  | |_| | | | |  __/    #
#      |_|   |_|  \__, | |_|  \___|  \__|   |___/  \__|  \__, | |_|  \___|    #
#                  __/ |                                  __/ |               #
#                 |___/                                  |___/                #
#                                                                             #
#=============================================================================#

You can specify which characters to use for the commenting char (“cap”) and line char (“line”). For example:

$ fart C++ -f georgia11 -c // -l '#'

//#############################################################################//
//                                                                             //
//                         .g8"""bgd                                           //
//                       .dP'     `M                                           //
//                       dM'       `     M         M                           //
//                       MM              M         M                           //
//                       MM.         mmmmMmmmm mmmmMmmmm                       //
//                       `Mb.     ,'     M         M                           //
//                         `"bmmmd'      M         M                           //
//                                                                             //
//#############################################################################//

You can also optionally pad the inside of “cap” char with a space, as it ‘space following a comment char’ is a common linting rule and will ruin your farts.

If you can’t fart around your linter due to this rule, this is the option for you!

Specify the -p --pad-caps option:

$ fart -p -f small Nice try Black!

# =============================================================================== #
#    _  _   _                _                    ___   _               _     _   #
#   | \| | (_)  __   ___    | |_   _ _   _  _    | _ ) | |  __ _   __  | |__ | |  #
#   | .` | | | / _| / -_)   |  _| | '_| | || |   | _ \ | | / _` | / _| | / / |_|  #
#   |_|\_| |_| \__| \___|    \__| |_|    \_, |   |___/ |_| \__,_| \__| |_\_\ (_)  #
#                                        |__/                                     #
#                                                                                 #
# =============================================================================== #

Farts are automatically copied to your clipboard for convenience. To disable this functionality, make sure to flag your farts with -n.

To see all available fonts and their supported character-sets, enter fart -s or fart --sample.

Installation

Install through pip:

pip install fart

Requirements

This package was built for use in Python 3 in Linux. I expect this package should work for other environments, but no support for other OS is planned.

Acknowledgements

FIGlet fonts are licensed under the BSD-3 by the original authors at http://www.figlet.org.

This package also uses pyperclip code to copy farts to the clipboard.

Big thanks to the members of the Laboratory of Plasma Physics (LPP) who were the original farters on PyPi with Find All Roots with a Tree, but graciously allowed me fart on PyPi.

License

Code is licensed under BSD-3 and any font assets are copyright by original authors.

Metadata

Release files for fart 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fart 0.2.3
File Size Uploaded
fart-0.2.3.tar.gz 71.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fart 0.2.3
File Interpreter ABI Platform
fart-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 147.7 kB

Release files / fart-0.2.3.tar.gz

Download URL fart-0.2.3.tar.gz
Size 71.8 kB
Tags Source
SHA-256 checksum
How to use checksums
84186d3568e7e9c2b767694f0f9401bf6711de8638fc68244bc840664494221f
BLAKE2b-256 checksum
How to use checksums
52bce4546a8c5820e76e2a6589036b0c3371cd3cfbfb95c41b456606312863bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / fart-0.2.3-py3-none-any.whl

Download URL fart-0.2.3-py3-none-any.whl
Size 75.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84f569689caa8125ef67b4aa7e84933907cc2889a4999f7806a01e4badc8c8df
BLAKE2b-256 checksum
How to use checksums
f4fecf970047f1f9000ca63266f1fc91834941f7523153c2f680f63210393af8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

1 release file

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page