chhsiao90 / gviewer Goto Github PK
View Code? Open in Web Editor NEWSimple, Light Weight, but Powerful Terminal UI Library for Python
License: MIT License
Simple, Light Weight, but Powerful Terminal UI Library for Python
License: MIT License
Because that public method from GVIewer had some major modifiaction (shorter, and cleaner).
Need update README.md for new interface
Need support pypi
Somebody need, somebody don't need.
So I planned to add a config argument to enable/disable auto scroll down when new message received and provide the functionality to auto scroll down.
Reference mike820324/microProxy#156
Currently, when notification happen, it need focus on the notification bar to make sure that the message would be cleanup correctly.
But it cause some user experience problem, that their next key(action) will not do anything but just clean up the notification bar and in-focus it.
I think there might be better solution for it!
Quit without confirmation will bring some bad user experience.
When user try quit from gviewer, it would open a user prompt to ask user really want to quit.
There are bugs when switching summary view
Traceback (most recent call last):
File "/Users/han-pc/.pyenv/versions/mp-tmp/lib/python2.7/site-packages/gviewer/view/detail.py", line 71, in _open
controller=self.controller, context=self.context),
File "/Users/han-pc/.pyenv/versions/mp-tmp/lib/python2.7/site-packages/gviewer/view/detail.py", line 43, in __init__
self.view = self.views[index][1].__call__(self.message)
File "/Users/han-pc/workspace/python/microProxy/microproxy/viewer/tui.py", line 112, in response_view
[gviewer.Prop(k, v) for k, v in response["headers"]]))
File "/Users/han-pc/.pyenv/versions/mp-tmp/lib/python2.7/site-packages/gviewer/view/element.py", line 97, in __init__
max_key_length = max(map(lambda p: len(p.kv[0]), items))
ValueError: max() arg is an empty sequence
Introduce controller for following purpose
Make sure that gviewer could integrate with pygments and provide sample code.
That when using GViewer with searching, it's hard to know that is in search mode or not.
That cause exit GViewer by accident.
I think it should display current search keyword at the bottom.
That gviewer seams to eat many exception and will be hard to debug if program had exception.
So need exception handling on some situation:
Maybe had an exception view for record these error is a good practice
Use function to implement something like to_detail_groups is more simple with implement abstract class DetailDisplayer.
Currently, footer only show [1/5] for the selection on summary view
It would be good to also display XXX[1/5] for which view is display.
The Error:
Defaulting to user installation because normal site-packages is not writeable
Collecting gviewer
Using cached gviewer-3.0.6.tar.gz (22 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-mhbbda84/gviewer_59bd9eeb76e54fe4a0253fdd5ded538d/setup.py", line 10, in <module>
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
File "/usr/lib/python3.10/codecs.py", line 905, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-mhbbda84/gviewer_59bd9eeb76e54fe4a0253fdd5ded538d/README.md'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Provide multiple views in a GViewer.
It seems that the current line number will not update correctly when auto scroll down
The [current/max] should be display on footer
Follow the rule from Google Python Style Guide
Original MicroProxy issue: mike820324/microProxy#154
Just a nice to have feature that pressing some key will scroll to the top/bottom of the page.
For instance,
Need encode with specific encoding(utf8) when write to file
User could bind their custom keys for some actions, but when it duplicate with gviewer built-in keys, it would be ignored.
Need raise Error for this problem
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.