Git Product home page Git Product logo

Comments (11)

Matt3o12 avatar Matt3o12 commented on August 17, 2024

Good point, although you are going to need to write Go code eventually (unless you want to have a completely static app of course). If you only use the available widgets, you won't be able to get dynamic content.
I currently write widgets for termui that are kind of "higher level widgets" and only fulfill one task. The first widget is going to be a Hacker News newsfeed (that includes the top stories as well as the most recent ones). Later I will write widget that pulls my server's load (and CPU usage, memory, etc) using new relic. They have a pretty straightforward API and connecting your server to their service is free and super easy (it only took me a minute)*.

Right now, implementing that is kind of pointless, though. The only advantage is cleaner code but that's it.

* just make sure you add the server to their Server monitoring Service and not the application service (because the usage is very limited if you don't pay).

from termui.

gizak avatar gizak commented on August 17, 2024

Hi @slezica, it's a good idea! Reminds me of graphite-web. I think this can be done by wrapping it up as a command line tool which continuously fetches data from an URI (*.json maybe). But as @Matt3o12 said, you may need some go codes if you want adding in custom logic.

Actually I've came across a similiar idea when implementing grid layout, thought a html-like tamplate would be helpful to define layout. Now this seems doable!

from termui.

RangerMauve avatar RangerMauve commented on August 17, 2024

Yeah, what you're describing sounds more like a project that someone should make using this as a rendering background, rather than having the library itself focus on making "html-like" directly.

from termui.

Matt3o12 avatar Matt3o12 commented on August 17, 2024

👍

from termui.

andyl avatar andyl commented on August 17, 2024

+1 for plain text configuration, and for polling JSON files or URL to ingest data. Termui is great but we can't write custom go code.

Another idea for data sources: add an adapter to InfluxDB. All of our stats are stored in InfluxDB, but we don't have any way to display on the terminal.

To display InfluxDB stats on the browser we use Grafana - might be an interesting comparable for termui.

I agree with the OP - termui is a surprising and awesome tool. I think you are very close to having a tool that will attract a huge audience.

from termui.

fgrehm avatar fgrehm commented on August 17, 2024

Another idea that would make things a bit more dynamic would be to expose a JS api through something like otto, but I'm relatively new to termui to know if that would be doable or not 😁

from termui.

RangerMauve avatar RangerMauve commented on August 17, 2024

@fgrehm If you want a JS API, why not just go with blessed-contrib which is node-based?

from termui.

gizak avatar gizak commented on August 17, 2024

Just open a new repo termuid in response;)

from termui.

alphapapa avatar alphapapa commented on August 17, 2024

Yes, this looks really neat, but all I want to do is pipe some data to a widget and have it displayed. It seems like a widget should be able to accept a plain number, CSV, JSON, etc.

And to be sure this isn't already possible and I wasn't missing something, I had to come find this issue... :)

from termui.

fgrehm avatar fgrehm commented on August 17, 2024

I just came across https://github.com/yaronn/wopr which might be used as an inspiration

from termui.

cjbassi avatar cjbassi commented on August 17, 2024

A plain text configuration is a cool idea, but it's somewhat out of the scope of termui (I think). As was mentioned, you can create a higher level widget that reads its data from a file. But the widget design itself has to be in Go.

I realize this is an older issue, but just doing some housekeeping. 😺

from termui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.