Comments (3)
Yeah, I'm aware of this one. However, I haven't been able to think of a good way to standardise it. The columns in the different panels are totally separate and I want the widths to be flexible to best accommodate the content.
Any suggestions welcome!
from rich-click.
I just noticed that the issue becomes even harder when there's a required option that adds a *
:
╭─ Other ──────────────────────────────────────────────────────────────────────────────────────────╮
│ --help -h Show this message and exit. │
│ --version Show the version and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ * --input -i TEXT Input path [required] │
│ --output -o TEXT Output path │
│ --all Sync all the things? │
│ --overwrite Overwrite local files │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
I guess the best thing to to would be to get all the different types of columns used by all the groups and apply them to each group. I'm not too familiar with click's API, tough 😕
from rich-click.
That one is a bit easier - the code strips the first column if none are required to avoid an unnecessary column of whitespace. But it still wouldn't be exactly the same width even if we kept it.
The only idea I have is to make one massive table with everything, somehow figure out the dynamically chosen column widths, then discard it without printing and apply those widths to all tables. But I'm not sure if it's possible to get widths like that from rich (it probably is, you can do most things).
from rich-click.
Related Issues (20)
- Expose a way to send usage information to stderr HOT 9
- Rich-Click does not translate the ascii codes into colors on windows 64 cmd.exe anymore HOT 3
- support providing a default/global `option_groups` config to apply to all commands HOT 7
- Unit tests should assert output to stderr on errors
- Either update or deprecate MacPorts install HOT 5
- `text_markup: Literal["rich", "markdown", "rst", None]` config option HOT 1
- Additional style options HOT 1
- `rich-click` CLI for version `1.8.0dev1` breaks backwards compatibility in edge case
- 1.9 wishlist
- 2.0 roadmap
- 'RichGroup' object has no attribute 'isolation' HOT 2
- Bugs (a) generating svg/html with decorator. (b) with root directory scripts HOT 1
- Interim blog post - "5 cool pre-made styles for your CLI" (title tentative)
- Color part of the help massage HOT 8
- OptionHighlighter is deprecated and will be removed in a future version. HOT 6
- Invalid MRO when importing rich_click HOT 4
- Continuting to receive "DeprecationWarning: OptionHighlighter is deprecated" as of 1.8.1 HOT 2
- Fix warning (again)
- Show commands before options HOT 5
- Grouped `--help` output is not shown for `__main__.py` CLIs (`python -m foo`) / add support for `prog_name`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rich-click.