user@shadowpbx: ~/academics/american_government$ cat README.md

American Government

CLEP Lecture Audio Player & Playlist Compiler

A premium, mobile-responsive, dark-themed HTML5 audio player designed for studying CLEP lecture courses on the go. It supports lock-screen media controls, custom loop counts, speed adjustments, and auto-resumes playback precisely where you left off.

This repository houses the player interface and a helper playlist compiler designed to cleanly split audio storage (hosted externally on Cloudflare R2 / S3) from the player code (hosted on GitHub Pages).


🌟 Key Features


πŸ“‚ File Architecture


πŸš€ Setup & Usage Guide

1. Upload Your Audio Files to Cloudflare R2

  1. Log into your Cloudflare account and create an R2 Bucket.
  2. Upload your .mp3 files to the bucket.
  3. Enable public access (either via a custom domain like https://audio.example.com/ or Cloudflare's free pub-<hash>.r2.dev bucket URL).

2. Configure Course Metadata

Edit the about.txt file in your root folder:

Title: American Government
Sub Title: CLEP Examination Prep Audio

3. Generate the Playlists

The Python playlist compiler detects your audio files and creates catalog files for the player.

4. Deploy the Player on GitHub Pages

  1. Push index.html, about.txt, generate_playlist.py, playlist.js, and playlist.json to your GitHub repository.
  2. In your repository settings under Pages, enable GitHub Pages to build from your main branch.
  3. Your audio player will immediately go live!

πŸ›  Local & Offline Development

This project is built to support offline learning: * Open index.html directly in your browser (file:/// protocol). * Even if the browser's security sandbox blocks dynamic JSON fetching locally, the player automatically falls back to reading track mappings and R2 base URLs from the script-loaded playlist.js.


Designed for seamless studying on the go.