File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020"""
2121
2222import json
23+ import os
2324import re
2425import sys
2526import time
3233# ── Configuration ────────────────────────────────────────────────────────────
3334
3435CANVAS_URL = "https://canvas.nus.edu.sg"
35- CANVAS_TOKEN = "21450~VhMGPzTKzT9wABF3VF76k8YE9LKUwfL93nU2LMc3xcfKPMhTkHJYaG3vZ34mfUke"
3636ANTHROPIC_API_KEY = None # set below or via env
3737
3838PROJECT_DIR = Path (__file__ ).parent
39+ _canvas_token_file = PROJECT_DIR / "canvas_token.txt"
40+ CANVAS_TOKEN = (
41+ _canvas_token_file .read_text ().strip ()
42+ if _canvas_token_file .exists () else
43+ os .environ .get ("CANVAS_TOKEN" , "" )
44+ )
3945SIZE_LIMIT = 1 * 1024 ** 3 # 1 GB
4046
4147# Skip training / non-academic courses by name keywords
Original file line number Diff line number Diff line change 2727
2828# ── Configuration ────────────────────────────────────────────────────────────
2929CANVAS_URL = "https://canvas.nus.edu.sg"
30- CANVAS_TOKEN = "21450~VhMGPzTKzT9wABF3VF76k8YE9LKUwfL93nU2LMc3xcfKPMhTkHJYaG3vZ34mfUke"
3130PANOPTO_HOST = "mediaweb.ap.panopto.com"
3231PROJECT_DIR = Path (__file__ ).parent
32+ _canvas_token_file = PROJECT_DIR / "canvas_token.txt"
33+ CANVAS_TOKEN = (
34+ _canvas_token_file .read_text ().strip ()
35+ if _canvas_token_file .exists () else
36+ os .environ .get ("CANVAS_TOKEN" , "" )
37+ )
3338MANIFEST_FILE = PROJECT_DIR / "manifest.json"
3439
3540# ── Manifest helpers ──────────────────────────────────────────────────────────
You can’t perform that action at this time.
0 commit comments