mum4k / termdash Goto Github PK
View Code? Open in Web Editor NEWTerminal based dashboard.
License: Apache License 2.0
Terminal based dashboard.
License: Apache License 2.0
While utf8.RuneCountInString counts the number of runes, it cannot be used to determine the number of cells the text takes. Full-width runes take multiple cells.
This mostly affects the text alignment code and the gauge widget.
This affects widgets that calculate their minimum size based on what data they currently have.
The following causes a race:
Rotation of the mouse wheel or key presses could adjust the scale.
Design and implement a library that would ease detection of mouse button presses.
A press is when both the press and the release is within a defined area.
Look at the existing implementation in the focus tracking code of the container package.
This might be useful for more than just the Gauge widget.
The Gauge widget currently contains this logic, the idea would be to move it out elsewhere.
Implement a line chart widget.
Similar to: https://github.com/gizak/termui/raw/master/_example/linechart.png
And: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/line.gif
Also look at: https://github.com/cjbassi/termui and the use of: https://github.com/exrook/drawille-go
Implement a widget that will allow the user to provide text input. Either single or multi-line.
Also add support for border title and reuse it in container.
Is it possible to use with Text widget esc seq for foreground color?
Example ESC[39;49m
Implement an LCD display widget.
Similar to: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/lcd.gif
This widget would benefit from using the braille canvas and its resolution.
As in (https://github.com/yaronn/blessed-contrib/raw/master/docs/images/line.gif)
I.e. the USA and EUROPE in the picture.
Implement a text table widget.
Similar to: https://github.com/yaronn/blessed-contrib/blob/master/docs/images/table.gif
Targeted features:
The text can either have rotated characters, or just standard text characters flowing vertically.
This would be for the X axis, so that it can display longer custom labels.
Implement a doughnut widget.
Similar to: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/donut.gif
This library would receive a stream of keyboard presses and trigger a callback on the configured key or key combination.
This would ease the development of widgets or code that uses keyboard input and wants to support multi-key shortcuts.
Implement a markdown widget.
Similar to: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/markdown.png
Implement a tree widget.
Similar to: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/tree.gif
The tests (specifically the after function) is currently synchronised by waiting for the event queue to empty. This isn't a good synchronisation, since the event processing code in termdash still races with the test code that evaluates the result.
Example traceback:
The command "go test ./..." exited with 0.
12.77s$ go test -race ./...
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x5f1cc8]
goroutine 38 [running]:
testing.tRunner.func1(0xc4200c05a0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:742 +0x567
panic(0x62cf60, 0x7881a0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/runtime/panic.go:502 +0x24a
github.com/mum4k/termdash.TestRun.func5(0xc42009c750, 0xc42006f100)
/home/travis/gopath/src/github.com/mum4k/termdash/termdash_test.go:239 +0x68
github.com/mum4k/termdash.TestRun.func11(0xc4200c05a0)
/home/travis/gopath/src/github.com/mum4k/termdash/termdash_test.go:358 +0xa00
testing.tRunner(0xc4200c05a0, 0xc4200833e0)
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:777 +0x16e
created by testing.(*T).Run
/home/travis/.gimme/versions/go1.10.3.linux.amd64/src/testing/testing.go:824 +0x565
FAIL github.com/mum4k/termdash 1.068s
Implement a stacked bar chart widget.
Similar to: https://github.com/gizak/termui/raw/master/_example/mbarchart.png
And: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/stacked-bar.png
Add support for wrapping lines at the word boundaries in the text widget.
Text wrapping is already implemented, but it only wraps at character boundaries.
All tests that use the fake widget should use fakewidget.Draw or fakewidget.MustDraw when creating the expected value.
That way changes or enhancements to fakewidget will be limited to that package.
This is an example of a test that doesn't use MustDraw and instead uses primitives directly (MustBorder, MustText):
termdash/container/draw_test.go
Line 67 in f72f1c2
This is an example of a test that uses the desired helper instead of draw primitives:
Line 168 in 6b9ac6b
Some unicode characters take more than one cell to be displayed.
This must be supported by the canvas.SetCell function, the draw.Text function and the text widget.
Implement a picture widget.
Similar to: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/picture.png
This widget would benefit from the higher resolution of the braille canvas.
Implement a spark line widget.
Similar to: https://github.com/gizak/termui/raw/master/_example/sparklines.png
And: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/spark.gif
Should be configurable for:
Implement a stacked gauge widget.
Similar to: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/stackgauge.gif
So that the line can go down below the bottom axis. We could also support a LineChart supporting negative values on both the axes.
Some ideas:
The canvas can track which cells were set and only apply those to the terminal.
Widgets can indicate if they need a redraw or if the content is still the same.
Container can redraw only those widgets that changed.
Thetermdash API can support user triggered redraw instead of periodic.
This should start with an API design and analysis of potential use cases.
We could support dynamic additions / removal / moves of widgets at runtime.
Implement a gauge widget.
Similar to: https://github.com/gizak/termui/raw/master/_example/gauge.png
And: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/gauge.gif
Currently the focus (which widget receives keyboard and mouse events) can only be moved by mouse clicks.
We could enhance the container so that widget focus is moved by configurable keyboard shortcuts. This would involve adding new container options and enhancing the container itself so that it processes events.
Currently both the vertical and the horizontal splits split the container exactly in the middle.
Allow for multiple sizes. Consider using predefined sizes (like SplitHalf, SplitQuarter, ...) instead of accepting number to avoid possibility of input errors.
Implement a bar chart widget.
Similar to: https://github.com/gizak/termui/raw/master/_example/barchart.png
And: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/bar.gif
Implement a simple text block that with styling and wrapping options.
Similar to gizak/termui: https://github.com/gizak/termui/raw/master/_example/par.png
All functions should define their own option type instead of accepting cell options.
One of their options would be to take in a list of cell options.
Implement a rolling text widget.
Similar to: https://github.com/yaronn/blessed-contrib/raw/master/docs/images/log.gif
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.