fxn / tkn

Terminal Keynote - A hack for terminal-based talks
MIT License
1.11k stars 84 forks source link

Poor man remote control #5

Closed jodosha closed 7 years ago

jodosha commented 10 years ago

Enable a web interface to control the presentation.

If the WEB env var is set to true it starts a web server on port 3000, where it is possible to control the presentation (previous/next/quit), for instance with a smartphone.

Implementation notes: It forks a subprocess to fire up the web server and uses IPC (via IO.pipe) to communicate commands. WEBrick is setup with a custom logger that only prints the query string of the requested resource and uses the writer pipe as output. The simple web page contains a set of links that are directly mapping tkn commands (/?p, /?n, /?q), so that a click on the right arrow, communicates n to the parent process and the next slide is rendered.

jodosha commented 7 years ago

Closing this PR as it's pending since a few years now. Thank you 😄

fxn commented 7 years ago

Oh yes, sorry for not replying Luca, was not sure whether I wanted this functionality, didn't say anything, and time has passed :(.

jodosha commented 7 years ago

@fxn No worries Xavier 😄 .