-
Notifications
You must be signed in to change notification settings - Fork 0
Add interactive textual client #40
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great new tool in our toolbox! Making me happy!
It already works quite well. Would it be hard to add the following features from my wish-list?
- Add a button similar to k to show the previous keys? Right now, I can only navigate in one direction
- Instead of these two buttons, have the arrow keys up/down move to the next keys when the end/start of the current list is reached?
- Make the fossildb address configurable (but default to localhost:7155)? This could also be a command line argument
- Have the output files be named after the key and the version? e.g.
<key>_v<version>rather than out.bin - Remove the delete button for now (I think delete is not a common use case, and it does not work now anyway)
For the moment, let’s assess the effort required for these features, and not start right away with implementing. We can then discuss the priority.
With a list of previous offsets that should be relatively easy.
Would need to take a look at how the list works. Most cli applications have 2 ways of navigating, page up/down and line by line. The arrow down (or j and k in vi) should only scroll one line.
Via file trivial, don't know immediately know how to do it via cli because we don't really have control of the startup procedure. But should be a common use case and not too hard.
Seems very straight forward. Not clear what naming scheme you're proposing: <key_name>_v ?
Well that's easy. |
|
Thanks for your thoughts! I think we should go for these ideas. On output file naming: sorry, markup ate my text. I meant I think having a list of previous offsets to support scrolling back is fair :) Might lead to slightly wrong offsets if the server content has changed, but I think that should not do much harm. On command line arguments: I would guess that you could do argparse before the If changing the scrolling behavior is hard, Let’s make it a follow-up issue. Maybe an easier improvement can be found also. My worry is that users won’t notice at all that there might be more keys than are shown (especially since the list does not fill the whole widget/screen if the terminal is larger). Maybe the presence of more keys can be detected (by requesting slightly more than are shown?) and in this case add some sort of marker in the list? Also, could page-down and page-up maybe replace the k shortcut? But again, all of this can be a follow-up issue. Could you address the other points? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Supports listing keys and getting keys. There is a delete button, which I did not implement because I did not want to destroy my annotations (but should be easily done).
Edit: CI doesn't work because of ancient python version