🌈 Beautify your command line interfaces.

Related tags

CLI Tools iridi
Overview

image

Basics

Install:

pip install iridi

Usage:

import iridi

# Create gradient text
# iridi.print(message, colors, options)

# Ask for input with gradient text:
# iridi.input(message, colors, options)

iridi.print("This is an example message. Colorful, huh?", ["#8A2387", "#E94057", "#F27121"], bold=True)
response = iridi.input("What's your favorite color?", ["#8A2387", "#E94057", "#F27121"])
print(response)

The above should result in this:

image

Presets

There are included presets when importing the module, access them by doing iridi.presets.[name]. Example:

import iridi

iridi.print("Nice preset!", iridi.presets.wiretap)

image

If you'd like to contribute or add official preset gradients to this project, feel free to fork this and make a PR!

Make your own presets:

Iridi comes with the ability to create your own gradients and reuse them.

gradient = iridi.preset(["#D3959B", "#BFE6BA"])

gradient.print("Testing with preset constructors.", bold=True)
response = gradient.input("Test an input: ")
print(response)

Output:

image

Options:

The array can be an array of hex strings, or objects with r, g, and b values. This...

# This works:
iridi.print("Try it with RGB objects next!", ["#7350b3", "#2ebf91"])

# So does this:
iridi.print("Try it with hex values if you haven't!", [{"r": 250, "g": 0, "b": 100}, {"r": 60, "g": 255, "b": 0}])

...results in the following:

image

Want the output in bold? No problem, just add bold=True as the third argument to the function (shown in examples above).


If you end up using this, or just think it's cool, feel free to this repo, it means a lot :)

You might also like...
pyGinit is a command line tools that help you to initialize your current project a local git repo and remote repo

pyGinit pyGinit is a command line tools that help you to initialize your current project a local git repo and remote repo Requirements Requirements be

Fylm is a wonderful automated command line app for organizing your film media.
Fylm is a wonderful automated command line app for organizing your film media.

Overview Fylm is a wonderful automated command line app for organizing your film media. You can pronounce it Film or File 'em, whichever you like! It

Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere
A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

A command-line tool to upload local files and pastebin pastes to your mega account, without signing in anywhere

Command-line tool to use LNURL with your LND instance

LND LNURL Commandline tool to use LNURL payRequest and withdrawRequest with LND. Usage: Customize config lndlnurl.conf Run python main.py LNURL Dock

Collection of useful command line utilities and snippets to help you organise your workspace and improve workflow.

Collection of useful command line utilities and snippets to help you organise your workspace and improve workflow.

Booky - A command line utility for bookmarking files on your terminal!

Booky A command line utility for bookmarking files for quick access With it you can: Bookmark and delete your (aliases of) files at demand Launch them

Command line interface to watch your childhood shows in hindi and english, designed with python
Command line interface to watch your childhood shows in hindi and english, designed with python

Sweet dreams: Most of your childhood shows Command line interface to watch your

This is a Command Line program to interact with your NFTs, Cryptocurrencies etc

This is a Command Line program to interact with your NFTs, Cryptocurrencies etc. via the ThirdWeb Platform. This is just a fun little project that I made to be able to connect to blockchains and Web3 from the command line.

Comments
  • chore: typhints, formatting; fix: don't print newline when bolding

    chore: typhints, formatting; fix: don't print newline when bolding

    👍🏼 looks pretty good.

    suggested api changes:

    import iridi
    
    # could be iridi.print()
    iridi.beautify("Looks beautiful, huh?", ["#8A2387", "#E94057", "#F27121"])
    
    wiretap = iridi.preset(["#8A2387", "#E94057", "#F27121"])
    wiretap.beautify("Smile for the camera!")
    

    lmk what you think!

    opened by hexiro 2
  • Adding italic option

    Adding italic option

    Nice repo!!

    Adding italic option to colored text, so with this:

    import iridi
    
    iridi.print("This is a normal message", ["#8A2387", "#E94057", "#F27121"], bold=False, italic=False)
    iridi.print("This is a bold message", ["#8A2387", "#E94057", "#F27121"], bold=True, italic=False)
    iridi.print("This is an italic message", ["#8A2387", "#E94057", "#F27121"], bold=False, italic=True)
    iridi.print("This is a bold and italic message", ["#8A2387", "#E94057", "#F27121"], bold=True, italic=True)
    

    you will have:

    image

    opened by peterhttps 1
  • get colorful text output, better presets syntax, less redundancy, fix `__init__.py` imports

    get colorful text output, better presets syntax, less redundancy, fix `__init__.py` imports

    now instead of

    iridi.print("Nice preset!", iridi.presets.wiretap)
    

    the syntax is

    iridi.presets.wiretap.print("Nice preset!")
    

    and the code is made less redundant by having the shorthand functions and the other methods call preset.beautify to make the code

    lmk if you have any issues with this 👍🏼

    oh yeah and this closes #1

    opened by hexiro 1
Owner
Conrad Crawford
Pursuing full-stack (TypeScript) web development.
Conrad Crawford
Ralph is a command-line tool to fetch, extract, convert and push your tracking logs from various storage backends to your LRS or any other compatible storage or database backend.

Ralph is a command-line tool to fetch, extract, convert and push your tracking logs (aka learning events) from various storage backends to your

France Université Numérique 18 Jan 5, 2023
A cd command that learns - easily navigate directories from the command line

NAME autojump - a faster way to navigate your filesystem DESCRIPTION autojump is a faster way to navigate your filesystem. It works by maintaining a d

William Ting 14.5k Jan 3, 2023
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

null 37 Dec 15, 2022
Get latest astronomy job and rumor news in your command line

astrojobs Tired of checking the AAS job register and astro rumor mill for job news? Get the latest updates in the command line! astrojobs automaticall

Philip Mocz 19 Jul 20, 2022
organize your books on the command line

organize your books on the command line

Ben Winston 19 Jan 21, 2022
Access hacksec.in from your command-line

Access hacksec.in from your command-line

hacksec.in 3 Oct 26, 2022
Command line tool to keep track of your favorite playlists on YouTube and many other places.

Command line tool to keep track of your favorite playlists on YouTube and many other places.

Wolfgang Popp 144 Jan 5, 2023
A command line tool to query source code from your current Python env

wxc wxc (pronounced "which") allows you to inspect source code in your Python environment from the command line. It is based on the inspect module fro

Clément Robert 13 Nov 8, 2022
A command line tool to create a graph representing your Ansible playbook tasks and roles

Ansible Playbook Grapher ansible-playbook-grapher is a command line tool to create a graph representing your Ansible playbook plays, tasks and roles.

Mohamed El Mouctar Haidara 424 Dec 20, 2022