user@hexdef:~$ cat README.md

Sociology

CLEP Introductory Sociology Lecture Audio Player & Companion Suite

A premium, mobile-responsive, dark-themed HTML5 audio player designed for studying CLEP Introductory Sociology. It supports custom track looping, speed controls, seek bar touch-scaling, and auto-resumes playback precisely where you left off.


🌟 Key Features


πŸ—οΈ Project Architecture & Data Flow

This application is structured as a decoupled, client-side static web application designed to run locally (via the file system or a lightweight server) or hosted on GitHub Pages. The interaction between elements is outlined below:


graph TD
    A[about.txt: Metadata Config] -->|Title & Subtitle| D[generate_playlist.py]
    B[Lecture Audio Files: *.mp3] -->|Scan & Extract Duration| D
    D -->|Compile & Generate| E[playlist.js / playlist.json]
    E -->|Read Track Index & Meta| F[index.html: Main Audio Player]
    F -->|Links Settings UI to| G[companion.html: Written Companion]
    H[notes.md: Markdown Notes] -->|Load Asynchronously| G

1. Main Audio Player (index.html)

The main application dashboard. It encapsulates the HTML5 audio engine and controls:

2. Written Study Companion (companion.html)

The reading and reference dashboard:

3. Study Notes (notes.md)

The source file for all written study material. Written in clean, portable GitHub-Flavored Markdown. Whenever you modify this file, the changes are automatically loaded and parsed by the companion page on your next visit.

4. Playlist Compiler (generate_playlist.py)

A Python command-line utility that automates playlist compilation:


πŸ“‚ File Directory


πŸš€ 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-.r2.dev bucket URL).

2. Configure Course Metadata

Edit the about.txt file in your root folder:


Title: Introductory Sociology
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.

The generator automatically parses your folder structure (or falls back to scanning your local MP3 filenames if remote directory listing is disabled) and writes out both playlist.json and playlist.js with your embedded R2 URL.

4. Deploy the Player on GitHub Pages

1. Push index.html, about.txt, generate_playlist.py, playlist.js, playlist.json, notes.md, and companion.html 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:

And navigate to http://localhost:8000/companion.html in your browser.


*Designed for seamless studying on the go.*