2c3eb4f08bcbf9e9532300b93ae4e97b72a14ac7
   1# ppt-control
   2
   3An interface for controlling PowerPoint slideshows over the network using WebSocket. With the included HTTP frontend, this package can essentially replicate PowerPoint's presenter view on any computer on the local network, with very low processing latency for commands.
   4
   5This was originally designed for controlling a PowerPoint slideshow from an instance of OBS (Open Broadcaster Software) running on the same computer (removing the need for an extra monitor to show presenter view).
   6
   7This package includes three main components:
   8
   91. The daemon, which runs in the background, independently of PowerPoint, and listens for WebSocket commands and hosts an HTTP server for the frontend
  102. The HTTP frontend, written in JavaScript, which displays status information and sends commands to the daemon through WebSocket (this can be docked in one of OBS's "custom browser docks")
  113. The OBS script, which allows a mapping of keyboard shortcuts to commands within OBS in order to control the slideshow from anywhere in OBS (keyboard shortcuts are implemented in the HTTP interface but only work when this is focused in OBS)
  12
  13Due to the implementation's use of `pywin32` for COM communication, this daemon only works on Windows (but the HTTP and WebSocket interfaces can be accessed from any device).
  14
  15## Installation
  16
  17`pip install ppt-control`
  18
  19will install all three components. You can then start the daemon by running 
  20
  21`py -m ppt_control`
  22
  23from a command prompt (note the underscore). There are a few steps to set the package up fully:
  24
  25### Starting the daemon at bootup
  26
  27To start the daemon automatically at login, run 
  28
  29`pip show ppt-control`
  30
  31and get the location of the package. Create a shortcut to `ppt_control.py` in Explorer and put it in `%AppData%\Microsoft\Windows\Start Menu\Programs\Startup`.
  32
  33### Using the HTTP interface in OBS
  34
  35To view the HTTP interface from within OBS, you can add a "custom browser dock" (View -> Docks -> Custom Browser Docks). The location should be the hostname and port number of the daemon (`http://localhost` by default). You can refresh the custom browser dock with Ctrl+R.
  36
  37### Global keyboard shortcuts in OBS
  38
  39Keyboard shortcuts in OBS browser docks only work when the browser dock is focused by clicking in it (there is actually no indication of focus in the interface, but if you click away from the browser dock the shortcuts will not work). To resolve this, there is another Python script called `ppt_control_obs.py` which can be added as a custom script in OBS. This script will listen for specific keys (configured in OBS's Hotkeys settings) and send commands to the daemon directly over WebSocket (no HTTP involved). To add the custom script, go to Tools -> Scripts, then click the + and choose the script. This will be located in the package directory which can be found with
  40
  41`pip show ppt-control`
  42
  43as above. It is a good idea to turn off the keyboard shortcuts in the HTTP interface after loading the OBS hotkey script, otherwise commands will be sent to the daemon twice when the browser dock is focused.
  44
  45## Configuration
  46
  47Various settings can be changed in `%AppData%\ppt-control\ppt-control.ini`. This file is populated with the defaults for all possible settings at installation. A settings GUI accessible from the system tray icon is also available (work in progress).