Giter Club home page Giter Club logo

canvas_grab's Introduction

canvas-grab

Build and Release

Grab all files on Canvas LMS to local directory.

中文说明

Getting Started

If you have Python installed, download latest release here, and follow the steps in "Build and Run from Source"

Otherwise, you may download prebuilt binary here. Here's a canvas_grab(.exe) file.

The program will ask you for an API key when running for the first time. You may obtain API key in Canvas settings. If you want further customization, you may edit config.toml. Refer to Configuration section.

You may interrupt the downloading process at any time. The program will automatically resume from where it stopped.

To re-download all files, remove checkpoint file .checkpoint and downloaded files folder files/.

To upgrade, just replace canvas_grab with a more recent version. If you want to use new features, you should edit config.toml to manually enable it, as we persist program behavior when upgrade.

If you have any questions, feel free to file an issue here.

Configuration

You may configure canvas_grab in config.toml. You can edit config.toml with your favourite text editor. Refer to config.example.toml or config.example.zh-hans.toml for documentation.

Features

  • All Canvas-based sites are supported Just specify Canvas endpoint in config.
  • Auto checkpoint A file will only be downloaded once. And the program will update the file if there's any update on Canvas.
  • File size and type filter You can specify maximum allowed file size. You may also filter files by their extensions.
  • Auto retrying If your network connection is not stable, the program will automatically retry downloading. You may interrupt at any time.
  • Smart sorting All files will be saved to their corresponding folder on Canvas. Furthermore, you may set course root folder name with placeholders like {CANVAS_ID}-{NAME}.
  • Organize by Module or by File You can set file organization mode in config.
  • Video URL resolution Currently we support resolve video URL from v.sjtu.edu.cn. Install ffmpeg and enable this functionality. Note that this is an EXPERIMENTAL functionality. Use at your own risk.

Build and Run from Source

First of all, please install Python 3.7+.

For macOS or Linux users:

pip3 install -r requirements.txt
./main.py

For Windows users:

pip install -r requirements.windows.txt
python main.py

Common Issues

  • Acquire API token Access Token can be obtained at "Account - Settings - New Access Token".
  • SJTU users 请在此页面内通过“创建新访问许可证”按钮生成访问令牌。
  • An error occurred You'll see "An error occurred when processing this course" if there's no file in a course.
  • File not available This file might have been included in an unpublished unit. canvas_grab cannot bypass restrictions.
  • No module named 'canvasapi' You haven't installed the dependencies. Follow steps in "build and run from source" or download prebuilt binaries.
  • Error when checking update It's normal if you don't have a stable connection to GitHub. You may regularly check updates by visiting this repo.
  • Unsupported Link canvas_grab only supports resolving URL from v.sjtu.edu.cn. vshare.sjtu.edu.cn is not supported.
  • Reserved escape sequence used please use "/" as the path seperator instead of "\".
  • Download FFMPEG Download ffmpeg executable here.
  • Invalid prebuilt binary on macOS You should allow this application to run in "Preferences - Privacy"
  • Skip a course causing error edit config.toml, add ID into IGNORED_COURSE.
  • Duplicated files detected There're two files of same name in same folder. You should download it from Canvas yourself.
  • Ignored course If you see the warning "Ignored Course", then canvas_grab has no access to a course. This is because (1) Course not available (2) Course from previous semesters are hidden. This will only show in version <= 1.7.4.

Screenshot

image

@skyzh, @danyang685, @BugenZhao, @ElectronicElephant, @LuminousXLB

License

MIT

Which means that we do not shoulder any responsibilities for, included but not limited to:

  1. API key leaking
  2. Users upload copyright material from website to the Internet

canvas_grab's People

Contributors

skyzh avatar danyang685 avatar electronicelephant avatar luminousxlb avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.