mkrl / ttty

A very simple pure JS lightweight terminal "emulator"
http://mkrl.xyz/ttty
MIT License
57 stars 10 forks source link

Add more interactive examples to the website #13

Open mkrl opened 3 years ago

mkrl commented 3 years ago

Is your feature request related to a problem? Please describe.

The website itself is pretty boring for now. There's so much you can do with the power of ttty!

Describe the solution you'd like

I think it would be great to add one or more of the following:

  1. More commands to the demo website (fetching a Chuck Norris joke? Downloading kitten pictures? Rickrolling?)
  2. Ideally every new command should demonstrate or teach an interesting use case as an example (multiple arguments, adding more terminals, working with the existing terminal instance, etc.)
  3. Something else that's cool and engaging.

Additional context

You can use a pre-existing system for "clickable" feature list in the index.html (based on data-exec attributes).

runningdeveloper commented 3 years ago

Hi can I add an example to fetch a Github profile picture and public repos from the username? It could be something like github username then it returns an image and the amount of public repos the username has.

This will show doing a simple GET request and that you can print out raw html (for the image). They have a public users api with basic info like - https://api.github.com/users/runningdeveloper

mkrl commented 3 years ago

@runningdeveloper that's a great idea! I would say displaying an image in the terminal would kind of go "against the terminal principles" (even though it is technically possible), but you can fetch some other useful info. Other than that, that sounds great. You can use the start/stop to prevent user interaction until the GET request resolves.

runningdeveloper commented 3 years ago

Ok thanks @mkrl I agree with you and will only display some text. I'll do a pull request this week and you can let me know what you think.