Closed jodosha closed 7 years ago
Closing this PR as it's pending since a few years now. Thank you 😄
Oh yes, sorry for not replying Luca, was not sure whether I wanted this functionality, didn't say anything, and time has passed :(.
@fxn No worries Xavier 😄 .
Enable a web interface to control the presentation.
If the
WEB
env var is set totrue
it starts a web server on port3000
, 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, communicatesn
to the parent process and the next slide is rendered.