Canvas Grab 项目使用教程
1. 项目的目录结构及介绍
Canvas Grab 项目的目录结构如下:
canvas_grab/
├── canvas_grab.sh
├── canvas_grab.ps1
├── configure.sh
├── configure.ps1
├── gui.py
├── main.py
├── requirements.txt
├── requirements-dev.txt
├── requirements-windows.txt
├── docs/
├── LICENSE
├── README.md
└── config.toml
各文件和目录的介绍如下:
canvas_grab.sh
和canvas_grab.ps1
:分别是 Linux/macOS 和 Windows 下的启动脚本。configure.sh
和configure.ps1
:分别是 Linux/macOS 和 Windows 下的配置脚本。gui.py
:图形界面脚本。main.py
:主程序脚本。requirements.txt
、requirements-dev.txt
和requirements-windows.txt
:分别是依赖文件、开发依赖文件和 Windows 依赖文件。docs/
:文档目录。LICENSE
:项目许可证。README.md
:项目说明文档。config.toml
:配置文件。
2. 项目的启动文件介绍
项目的启动文件主要有 canvas_grab.sh
和 canvas_grab.ps1
,分别用于 Linux/macOS 和 Windows 系统。
Linux/macOS
在终端中运行以下命令启动项目:
./canvas_grab.sh
Windows
在 PowerShell 中运行以下命令启动项目:
.\canvas_grab.ps1
3. 项目的配置文件介绍
项目的配置文件为 config.toml
,该文件包含了项目的各种配置选项。以下是一个示例配置文件的内容:
[general]
api_key = "your_api_key"
base_url = "https://your_canvas_instance.com"
download_folder = "downloads"
各配置项的介绍如下:
api_key
:Canvas LMS 的 API 密钥。base_url
:Canvas LMS 实例的 URL。download_folder
:下载文件的存储目录。
如果需要重新配置项目,可以运行以下命令:
Linux/macOS
./configure.sh
Windows
.\configure.ps1
以上命令将引导你重新设置配置文件。