Skip to main content

livecode-streamer

Tool for educators running "live coding" sessions to make their source files and terminal sessions viewable as read-only webpages, so that students can refer back to off-screen commands as reference.

This project was originally developed within the context of holding Carpentries workshops to teach UNIX shells, git, Python, and R, though it should be generalizable to other programming environments and teaching contexts.

For a captioned video overview of the tool, see our lightning talk from CarpentryCon 2022.

Usage

Run the livecode-streamer command in a background terminal window during your lesson:

livecode-streamer [options] WATCH_DIR REMOTE_URI

WATCH_DIR is a local directory containing the source files you are working on, and REMOTE_URI is a remote webserver to reflect those documents to. Whenever you save your source files, the script will upload HTML versions of them to the remote server. Students can view these files in their browser, and refresh the page as needed to recieve new content.

To stream a shell session, you must use a terminal emulator that supports automatic logging to HTML. This repository contains plugins to do so with Terminator (Linux/MacOS) and Hyper (Windows/MacOS/Linux) (see the subdirectories in this repo's external-plugins/ folder). On starting a new terminal session, just use one of these plugins to log your session to the WATCH_DIR.

Hosting and remote URIs

The most ideal way to host the output of this tool is on a personal web hosting account that allows access over SSH. Most universities provide this service to their faculty and staff, a la UW's shared web hosting. The instructions for setting this account up, unfortunately, vary from institution to institution. Once you have access, though, the value to put in REMOTE_URI would be the remote destination you would normally put in the second half of an scp command (eg: username@servername:remote_path).

If suitable institutionally provided web hosting isn't available, there are a few other options:

  • Amazon AWS or Microsoft Azure object storage: this script can directly upload contents to an AWS S3 bucket or Azure Blob Storage contianer, both of which can be configured to serve static webpages. The downside of these services is that they are not free
  • GitHub Pages: You can create a repo on GitHub and have this script automatically push updates to it. This repo can then be served as a website through GitHub's "Pages" feature. This option is free, though GitHub has a soft limit of 10 page updates per hour.

In all cases, access credentials are securely stored in your operating system's keychain.

Installataion and dependencies

Install with pip install livecode-streamer[jupyter], which includes all dependencies needed for basic syntax highlighting, rendering jupyter notebooks, and uploading via scp/rsync.

To install with dependencies for all plugins: pip install livecode-streamer[jupyter,git,azure,aws,localhost]

Core requirements:

For Jupyter notebooks:

For shell sessions, one of the following terminal emulators:

For generic webspace hosting:

  • rsync (optional)
  • ssh/scp

For hosting on Github Pages:

For hosting on Azure blob storage:

For hosting on AWS S3 buckets:

For hosting locally over an ngrok tunnel:

Contributing

Contributions of bugs, new plugins, or feature suggestions are all welcome. For more information, see CONTRIBUTING.md.

Metadata

Release files for livecode-streamer 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livecode-streamer 0.1.5
File Size Uploaded Provenance
livecode_streamer-0.1.5.tar.gz 12.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for livecode-streamer 0.1.5
File Interpreter ABI Platform
livecode_streamer-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 27.1 kB

Release files / livecode_streamer-0.1.5.tar.gz

Download URL livecode_streamer-0.1.5.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
32c4ffb4a3d77e6eff8c6296ea56e56d3a8ef71eaf7a2f846525951a5184e30b
BLAKE2b-256 checksum
How to use checksums
e8482f9e11dedc4f7577c543fad68f0ba86a13b38ce0b63e6129af6c61d9e688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.9.13 Windows/10

Release files / livecode_streamer-0.1.5-py3-none-any.whl

Download URL livecode_streamer-0.1.5-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3a4dfd45f1319327756b9b57f2e9dad3e9d501e9294e34a805c00404e957f38
BLAKE2b-256 checksum
How to use checksums
a66451884ecd57c69119680e4b2dadd9cd5748240be46066ee4ef347586b90c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.9.13 Windows/10

Security for livecode-streamer 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page