https://github.com/yuzhoumo/edbox
Ed course archiver and viewer
https://github.com/yuzhoumo/edbox
alpinejs edstem jinja2 python web-archiving
Last synced: 3 months ago
JSON representation
Ed course archiver and viewer
- Host: GitHub
- URL: https://github.com/yuzhoumo/edbox
- Owner: yuzhoumo
- License: gpl-3.0
- Created: 2024-04-11T11:04:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-27T06:28:57.000Z (over 1 year ago)
- Last Synced: 2025-06-16T18:44:53.213Z (7 months ago)
- Topics: alpinejs, edstem, jinja2, python, web-archiving
- Language: Python
- Homepage:
- Size: 1.23 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://choosealicense.com/licenses/gpl-3.0/)
EdBox is an archiver for Ed courses. Save posts and file attachments from
Ed and generate static sites for local viewing!
Built with Python and Alpine.js + Tailwind.

## Features
- Archives course info and posts to json files
- Downloads file attachments and user profile photos
- Generates an offline, searchable webpage for each archived course
- Webpages display Ed's formatting options and math notations (LaTeX)
- Anonymous usernames are correctly generated (matches what's shown on Ed)
- Color-coded post categories and user profiles
## Installation
```sh
python3 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
```
Python version 3.12 recommended
## Usage
- Generate an Ed API token [here](https://edstem.org/us/settings/api-tokens).
- Save `ED_API_TOKEN=YOUR_API_TOKEN_HERE` to a `.env` file (see `.env.template`).
- Run `python3 edbox.py` and choose Ed courses to archive.
If EdBox fails due to network errors or is otherwise interrupted while
archiving, restart the program and it will pick up where it left off.
## Development
There is no need to manually build or install dev dependencies for the webpage
unless you are making changes to it.
1. Install development dependencies:
```sh
cd web
pnpm install
```
2. Add assets downloaded by edbox.py to `web/build/assets`.
3. Build the site using `pnpm run build`. This generates the `index.html` file
and rebuilds the `web/static/tailwind.css` file.
4. Open `web/build/index.html` to view your changes.
## Acknowledgements
- [smartspot2's Ed API](https://github.com/smartspot2/edapi)