All Projects → click-contrib → click-help-colors

click-contrib / click-help-colors

Licence: MIT License
Colorization of help messages in Click 🎨

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to click-help-colors

spot price machine learning
Machine Learning for Spot Prices
Stars: ✭ 25 (-62.69%)
Mutual labels:  click
GAlogger
Log R Events and R Usage to Google Analytics
Stars: ✭ 23 (-65.67%)
Mutual labels:  click
cliar
Create modular Python CLIs with type annotations and inheritance
Stars: ✭ 47 (-29.85%)
Mutual labels:  click
wc18-cli
An easy command line interface for the 2018 World Cup
Stars: ✭ 15 (-77.61%)
Mutual labels:  click
metronome
An elementary OS app
Stars: ✭ 16 (-76.12%)
Mutual labels:  click
configmanager
Forget about configparser, YAML, or JSON parsers. Focus on configuration. NOT RECOMMENDED FOR USE (2019-01-26)
Stars: ✭ 15 (-77.61%)
Mutual labels:  click
esque
esque - an operational kafka tool.
Stars: ✭ 22 (-67.16%)
Mutual labels:  click
react-native-double-click
A Component Wrapper for Double Click/Tap
Stars: ✭ 42 (-37.31%)
Mutual labels:  click
three-onEvent
Add an EventListener for Object3d in your three.js project.(support click,hover or gaze)
Stars: ✭ 55 (-17.91%)
Mutual labels:  click
exch
a command-line tool to see currency exchange rates
Stars: ✭ 20 (-70.15%)
Mutual labels:  click
crawler click tutorial
click tutorial ( crawler ) use python
Stars: ✭ 15 (-77.61%)
Mutual labels:  click
website
Website for the Pallets projects
Stars: ✭ 126 (+88.06%)
Mutual labels:  click
clickos
The Click modular router: fast modular packet processing and analysis
Stars: ✭ 127 (+89.55%)
Mutual labels:  click
ansible-taskrunner
Ansible Taskrunner - ansible-playbook wrapper with YAML-abstracted python click cli options!
Stars: ✭ 14 (-79.1%)
Mutual labels:  click
JHTapTextView
Tap TextView,Text Tap,文本点击
Stars: ✭ 23 (-65.67%)
Mutual labels:  click
pyGinit
A simple github automation cli
Stars: ✭ 15 (-77.61%)
Mutual labels:  click
cloup
Library to build command line interfaces (CLIs) based on Click. Cloup = Click + option groups, constraints, command aliases, command sections, help themes, "did you mean ...?" suggestions ...
Stars: ✭ 44 (-34.33%)
Mutual labels:  click
Utlyz-CLI
Let's you to access your FB account from the command line and returns various things number of unread notifications, messages or friend requests you have.
Stars: ✭ 30 (-55.22%)
Mutual labels:  click
focus-outside
📦 一个很棒的 clickOutside 库,它解决了 iframe 无法触发 clickOutside 的问题,并且它支持分组绑定处理。A good clickOutside library, which solves the problem that iframe cannot trigger clickOutside, and it supports grouping binding processing.
Stars: ✭ 74 (+10.45%)
Mutual labels:  click
Click-Counter-Bot
A telegram bot module for how to count total clicks on button.
Stars: ✭ 23 (-65.67%)
Mutual labels:  click

click-help-colors

build PyPI PyPI - Downloads

Colorization of help messages in Click.

Usage

import click
from click_help_colors import HelpColorsGroup, HelpColorsCommand

@click.group(
    cls=HelpColorsGroup,
    help_headers_color='yellow',
    help_options_color='green'
)
def cli():
    pass

@cli.command()
@click.option('--count', default=1, help='Some number.')
def command1(count):
    click.echo('command 1')

@cli.command(
    cls=HelpColorsCommand,
    help_options_color='blue'
)
@click.option('--name', help='Some string.')
def command2(name):
    click.echo('command 2')
$ python example.py --help

https://raw.githubusercontent.com/click-contrib/click-help-colors/master/examples/screenshots/1.png

$ python example.py command1 --help

https://raw.githubusercontent.com/click-contrib/click-help-colors/master/examples/screenshots/2.png

$ python example.py command2 --help

https://raw.githubusercontent.com/click-contrib/click-help-colors/master/examples/screenshots/3.png

import click
from click_help_colors import HelpColorsGroup, HelpColorsCommand

@click.group(
    cls=HelpColorsGroup,
    help_headers_color='yellow',
    help_options_color='green',
    help_options_custom_colors={'command3': 'red', 'command4': 'cyan'}
)
def cli():
    pass


@cli.command(
    cls=HelpColorsCommand,
    help_headers_color=None,
    help_options_color=None,
    help_options_custom_colors={'--count': 'red', '--subtract': 'green'}
)
@click.option('--count', default=1, help='Count help text.')
@click.option('--add', default=1, help='Add help text.')
@click.option('--subtract', default=1, help='Subtract help text.')
def command1(count, add, subtract):
    """A command"""
    click.echo('command 1')

...
$ python example_with_custom_colors.py --help

https://raw.githubusercontent.com/click-contrib/click-help-colors/master/examples/screenshots/4.png

$ python example_with_custom_colors.py command1 --help

https://raw.githubusercontent.com/click-contrib/click-help-colors/master/examples/screenshots/5.png

from click_help_colors import version_option

@click.group()
def cli():
    pass

@cli.command()
@version_option(
    version='1.0',
    prog_name='example',
    message_color='green'
)
def cmd1():
    pass

@cli.command()
@version_option(
    version='1.0',
    prog_name='example',
    version_color='green',
    prog_name_color='yellow'
)
def cmd2():
    pass

@cli.command()
@version_option(
    version='1.0',
    prog_name='example',
    version_color='green',
    prog_name_color='white',
    message='%(prog)s %(version)s\n   python=3.7',
    message_color='bright_black'
)
def cmd3():
    pass

https://raw.githubusercontent.com/click-contrib/click-help-colors/master/examples/screenshots/6.png

Installation

With pip:

$ pip install click-help-colors

From source:

$ git clone https://github.com/click-contrib/click-help-colors.git
$ cd click-help-colors
$ python setup.py install
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].