A Flask webserver implementation to host and control presentations built with beampress.js. It leverages the usage of Flask-SocketIO and socket.io-client to add real-time control over the slides.
If you want to use only the "static" version go to beampress.js
-
Clone this repo using your preferred method:
# SSH $ git clone [email protected]:jcurbelo/beampressk.git # HTTPS $ git clone https://github.com/jcurbelo/beampressk.git # GitHub CLI $ gh repo clone jcurbelo/beampressk
-
Install dependencies with pipenv:
# cd to application's root and then $ pipenv install
-
Define environment variables with
.env
file:# python-dotenv searches for a .env file located at root SECRET_KEY=YOUR_SECRET_KEY BASIC_AUTH_USERNAME=YOUR_ADMIN_USER BASIC_AUTH_PASSWORD=YOUR_ADMIN_PASSWORD
-
Run Flask server using Flask CLI:
$ pipenv run flask run # or activate virtual env $ pipenv shell # and then run it with your local installation (beampressk) $ flask run # example output Loading .env environment variables… * Serving Flask app "beampressk" (lazy loading) * Environment: development * Debug mode: on * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) * Restarting with stat * Debugger is active! * Debugger PIN: 311-574-148
-
Navigate to the "admin" view:
/
and authenticate using the admin credentials defined on step 3ADMIN_USER
andADMIN_PASSWORD
.All "admin" (protected) views use Basic Access Authentication with Flask-BasicAuth. The purpose of beampressk is to be accessed via a "local" network, we don't recommend this approach for a production-like environment.
-
Navigate to any "presentation" view (e.g
/presentation/example-warsaw
) and play with the admin controls.
-
Put your
index.html
file inbeampressk/templates/your-presentation
, whereyour-presentation
is any name of your preference. -
Navigate to
/presentation/your-presentation
URL. -
All presentations must follow beampress.js requirements in order to work.
-
You can use Jinja syntax along with Template Inheritance to better organize your presentations. Have a look at the example_warsaw demo presentation, it uses a base template called
warsaw_base.html
. Feel free to create your own base template.{% extends "warsaw_base.html" %} {% block content %} <section class="frame">Hello World!</section> {% endblock %}