-
Notifications
You must be signed in to change notification settings - Fork 193
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
Offer of help #682
Comments
Brilliant - thank you very much @willmcgugan, much appreciated! I've been really enjoying myself over the past few days playing with Rich. We're doing a week long hackathon for @nf-core (see https://nf-co.re/events/2020/hackathon-july-2020) so I've been on a mission to start using Rich throughout the code base since I found out about it! It's a beautiful library - both in terms of code and output 🤩 We only have a couple of instances of Lines 117 to 121 in bf950c9
I saw that Rich has an |
Glad its working for you! The hackathon explains why you've been so busy. I think if console.input("[yellow]Do you want to overwrite this file?[/] [red][[y/N]]").lower() == "y":
overwrite() |
Sounds like solid advice, thanks 👍🏻 Is the |
For this example, you don't strictly need the closing tag. Since the red foreground replaces the yellow foreground. But other styles can overlap. For instance if the first part of the the text was "bold yellow" you might need to close it, or the [y/N] would also be bold. |
Amazing! Thank you - I'll give it a try asap. |
Ok, now I'm going to get really cheeky whilst I have your ear. Feel free to tell me that this is way out of scope and I'll move on 😅 We have a new command-line wizard feature which I wrote using the PyInquirer package. It generally works well (see a demo on YouTube from last week), but PyInquirer seems to have some problems with package management and I need to strip it out (#641). I'm currently working on alternatives now, such as the much simpler pick for select lists. Any thoughts whether Rich could support any functionality like this? We actually looked for and found Rich in the first place to render the markdown help above these questions. It would be super cool if we could just render the whole console interface through Rich... |
TBH I've been thinking about this for a while. I've seen pyInquirer and similar console packages in other languages, and I would love to implement something similar using Rich to do the rendering. If it happens, it would probably be an external package, perhaps "rich-interactive", to keep dependancies down for those who don't need it. Reason it might not happen is my wife says I spend too much time working and not getting paid for it, and she's right. It would be easier to justify if I get Github sponsorship. |
That would be awesome! I've just pinned PyInquirer with a couple of workarounds which should keep things ticking for a bit, but if a Rich package ever turns up I'd love to give it a go (we don't use 90% of the PyInquirer features).
A very valid reason! I totally understand. I struggle with this a bit as we are primarily academic and government / grant funded (so a lot of bureaucracy) and also open source / largely volunteer driven. I'll have a think about whether we can compile a list of "upstream developers" or something though, to present to people using our tools. Probably won't amount to much but can't hurt.. 🤔 Made an issue: nf-core/website#448 |
I've pushed Rich 3.4.0, with rich.prompt. |
Not an issue per se. I noticed you guys are using Rich to do some interesting stuff. I'm the author or Rich, and I just wanted to say feel free to mention me if you ever need any assistance with it.
The text was updated successfully, but these errors were encountered: