Files
CanvasArchiver/README.md
Joren 2776d057cd fix: revert ExternalUrl auth to DownloadVideo, remove dead debug code
DownloadVideo already handles the Panopto Login.aspx canvas auth form
correctly through its multi-step form submission logic. The real fix for
ExternalUrl Panopto folder links was the URL normalization (List.aspx?folderID=
→ List.aspx#folderID="...") already in DownloadVideo.

Remove DownloadExternalPanoptoURL (dead code) and all debug prints.
Update README with -vo flag documentation.
2026-05-16 22:53:11 +02:00

2.3 KiB

Canvas Archiver

A command-line tool to archive Canvas LMS course content, including files, modules, and Panopto video recordings.

Prerequisites

  • Go 1.21 or higher
  • yt-dlp installed and in PATH

Installation

git clone git.directme.in/Joren/CanvasArchiver
cd CanvasArchiver
go build -o canvasarchiver ./cmd/canvasarchiver

Usage

  1. Run the archiver:

    ./canvasarchiver
    

    Or for files-only mode (all files flat, no videos):

    ./canvasarchiver -fo
    

    Or for videos-only mode (all Panopto videos flat, no files):

    ./canvasarchiver -vo
    
  2. On first run, you'll be prompted to authenticate:

    • Visit the provided OAuth URL
    • Authorize the application
    • Copy the authorization code back to the terminal
  3. Enter your Course ID when prompted (or use -me to download all enrolled courses)

  4. The tool will download:

    • Regular course files (to Course Files/)
    • Module content (to Modules/)
    • Panopto recordings (to Recordings/)

    In -vo mode, only videos are downloaded — all into the course root directory (no subdirectories).

Flags

Flag Description
-fo Files only — download all files flat into one directory; skips videos and module structure
-vo Videos only — scan recordings and all module video items, download everything flat into one directory; skips regular files
-me Download all enrolled courses
-n Prefix modules with order numbers [1], [2], etc.

Configuration

The following constants can be modified in internal/config/config.go:

  • BaseURL: Canvas instance URL
  • ClientID: OAuth client ID
  • ClientSecret: OAuth client secret
  • PanoptoID: Panopto external tool ID

Authentication

Credentials are stored in credentials.json after the first successful login. The refresh token is automatically used for subsequent runs.

Notes

  • Files are organized to match Canvas structure
  • SubHeaders in modules create nested folder structures
  • Videos are downloaded with their original titles
  • Existing files are skipped to avoid re-downloading

License

This project is for educational purposes. Ensure you have permission to download course content.