A simple image & web-page slideshow for the WikiMUC
Telescreen is a simple slideshow python script. It can display images and webpages from multiple sources including:
- Files (.png, .jpg, .jpeg, .gif, .html, .htm) in the local directory
- URLs inside a text file in the local directory
- URLs in a Wikipedia page
By default the images found in the URL lists will be locally cached.
Telescreen uses Selenium to control a local web browser. It also depends on the requests python package to load the wikipedia pages, and wget package to download the images and cache them locally. You can simply install the tested versions of these packages using the Python's package installer (pip) as:
$ sudo apt-get install python3 pip3
$ pip3 install -r requirements.txt
In addition, the Telescreen (through the Selenium) requires a browser and its compatible webdriver to work. A tested version of the webdriver for the Firefox (geckodriver) has been included in the “./geckodriver/”. You have to extract the compressed binary for your OS and add it to your system path.
To build the geckodriver from the source for a different OS, please refer to the geckodriver build manual. You can download the latest version of the geckodriver from here!
To use the Telescreen with a different browser please follow the instructions on the Selenium guide page. (You will also have to change the “SLIDESHOW.browser” parameter in the “telescreen.py” file)
You can edit the configs.py and change the default parameters of Telescreen. This includes the default:
- Directory of the slides, and slides cache
- Address of the Wikipedia page containing the URLs and the list of the users allowed to modify it
- Cache lifetime
- Slides refresh time
You can add slides by either putting images/webpages in the working directory, creating a .txt file with each URL in a newline, or adding the URLs to a Wikipedia page by the whitelisted user accounts. (the URLs are allowed to start with “*”)
- Run the Telescreen with the default value for the parameters as defined in the configs.py
$ python3 telescreen.py
- Show the available command line switches
$ python3 telescreen.py --help
- Run the Telescreen with slide files in ./test/ directory and show each slide for 20 seconds
$ python3 telescreen.py -dir ./test/ -w 20
By default, the Telescreen logs all the messages to “telescreen.log” file. You can use this file for monitoring the events or for its troubleshooting. The logging behavior of the Telescreen can be tweaked in the configs.py file.
- source: Telescreen source is available under the GNU GPL v3+ (attributions: Meisam@wikimedia, MichaelSchoenitzer@wikimedia)
- test slides: The copyright of each image in the ./test directory belongs to its original author. Please refer to the ./test/README file for more information.
- geckodriver: The geckodriver is made available under the Mozilla Public License.