-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for argh #5
Comments
This is a very interesting topic. Similar projects such as Gooey or Wooey have the same limitation of origin, in that they are tied to CLIs implemented in a particular library (argparse in the case of those mentioned). For instance, see chriskiehl/Gooey#478 It would be great to have an abstraction layer that allows to define CLIs implemented in any framework (and language!) in a common format (like OpenAPI does for http API), and that these tools that "augment" the interface are based on that instead of the internal API of a particular framework. Then you could have these interfaces almost for free for any CLI app. I only found this (somehow) related [discussion in HN](https://news.ycombinator.com/item?id=34960260. |
Yes, as someone who does not enjoy click, and does enjoy plumbum, I'm eager to learn what the plans are regarding different CLI toolkits going forward. |
Working directly with import argparse
from trogon import argparse_tui
parser = argparse.ArgumentParser(
prog="ProgramName",
description="What the program does",
epilog="Text at the bottom of help"
)
parser.add_argument("filename")
parser.add_argument("-c", "--count")
parser.add_argument("-v", "--verbose", action="store_true")
argparse_tui(parser) |
AFAIU we need to define an equivalent introspection function for each different cli library. Line 95 in 42564c5
The "abstract layer" I mentioned is covered by the dataclasses ( Also, |
I was going to comment here, but I instead created an issue that was more generic; not specific to this one library: |
Given open or past issues and comments asking about support for at least:
It seems that #43 captures the more generally maintainable way forward. |
(Sorry if it's not the place to ask)
Is there any plan to support argh ? (https://pypi.org/project/argh/)
Thank you,
The text was updated successfully, but these errors were encountered: