Skip to content

Commit

Permalink
Add readme image for styling tables.
Browse files Browse the repository at this point in the history
Also changelog for #69 and #70
  • Loading branch information
ewels committed May 17, 2022
1 parent 50d89b7 commit 5b5c98a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Version 1.3.3.dev0

- Fixed `AttributeError` from `envvar` code in some Typer usage [[#70](https://github.com/ewels/rich-click/pull/70)]
- Added support for styling the tables that options and commands are displayed in [[#69](https://github.com/ewels/rich-click/issues/69)]

## Version 1.3.2 (2022-05-16)

- Fix missed indentation issue in subcommand help text with `inspect.cleandoc` [[#67](https://github.com/ewels/rich-click/pull/67)]
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ click.rich_click.STYLE_OPTIONS_TABLE_LEADING = 1
click.rich_click.STYLE_OPTIONS_TABLE_BOX = "SIMPLE"
```

You can make some really ~horrible~ _colourful_ solutions using these styles if you wish:

![Rich markup example](https://raw.githubusercontent.com/ewels/rich-click/main/docs/images/style_tables.png)

> See [`examples/click/04_rich_markup.py`](examples/click/10_table_styles.py) for and example.
See the [_Configuration options_](#configuration-options) section below for the full list of available options.

## Groups and sorting
Expand Down
Binary file added docs/images/style_tables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion examples/click/10_table_styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
click.rich_click.STYLE_OPTIONS_TABLE_ROW_STYLES = ["bold", ""]
click.rich_click.STYLE_COMMANDS_TABLE_SHOW_LINES = True
click.rich_click.STYLE_COMMANDS_TABLE_PAD_EDGE = True
click.rich_click.STYLE_COMMANDS_TABLE_PADDING = (1, 2)
click.rich_click.STYLE_COMMANDS_TABLE_BOX = "DOUBLE"
click.rich_click.STYLE_COMMANDS_TABLE_BORDER_STYLE = "red"
click.rich_click.STYLE_COMMANDS_TABLE_ROW_STYLES = ["magenta", "yellow", "cyan", "green"]
Expand Down

0 comments on commit 5b5c98a

Please sign in to comment.