feat: add timestamped public course exports

This commit is contained in:
Meghdad committed 2026-08-13 22:05:29 +03:30
1 parent 32b6fb1b3b
commit 0a0ce2a624
9 files changed
+352 -5

No files matched your search

+29
View File
@@ -42,6 +42,7 @@ ravin transcribe COURSE_ID
ravin summarize COURSE_ID
ravin questions
ravin recording
ravin export
ravin serve --open
```
@@ -121,6 +122,32 @@ Empty LMS resource activities that expose no actual file are not counted as down
The downloader updates the course manifest after every completed file. A final offline scan reconciles all totals, so an interrupted run still retains useful progress.
## Course exports
Create a timestamped ZIP from every local course:
```bash
ravin export
```
By default, the archive is written to a path such as `public/exports/2026-08-13_14-35-22.zip`. Each run therefore produces a versioned file that can be downloaded directly from `/exports/2026-08-13_14-35-22.zip` when `public/` is your web server's document root. Generated exports are ignored by Git.
Videos are excluded by default, including archived video versions. The ZIP still contains the course catalog and manifests, documents, compressed attachments, audio, transcripts, summaries, exam questions and attachments, recording metadata, and other non-video course files. Partial downloads and transient lock files are omitted.
Include current and archived videos when you need a complete backup:
```bash
ravin export --include-videos
```
Choose a different destination with `--output`:
```bash
ravin export --output ~/Backups/ravin-courses.zip
```
The archive always contains a top-level `courses/` directory, so it can be extracted into a compatible `public/` web root. Exports are built beside the destination and installed atomically; an interrupted run does not leave a broken ZIP. The destination must be outside `public/courses/`; use `--output` when you do not want an export exposed by the library server.
## Exam questions and answers
Start the interactive import wizard:
@@ -342,6 +369,7 @@ ravin transcribe [COURSE_ID ...] [--model MODEL] [--device DEVICE] [--language L
ravin summarize [COURSE_ID ...] [--model MODEL] [--retries N] [--timeout SECONDS]
ravin questions [COURSE_ID] [ACTIVITY_ID] [QUESTIONS.md] [--file ATTACHMENT ...]
ravin recording [COURSE_ID] [ACTIVITY_ID] [VIDEO]
ravin export [--output ARCHIVE.zip] [--include-videos] [--public PATH]
ravin serve [--host ADDRESS] [--port PORT] [--open] [--public PATH]
```
@@ -364,6 +392,7 @@ src/ravin/
├── summarize.py # resilient Codex CLI study-guide batches
├── questions.py # local exam-question and attachment imports
├── recordings.py # local live-class recording imports
├── exporter.py # atomic course ZIP exports
├── local_files.py # atomic local copies and archived versions
├── wizard.py # shared interactive import helpers
├── migration.py # previous-layout migration