{"id":20821887,"url":"https://github.com/aidanaden/canvas-sync","last_synced_at":"2025-05-07T16:25:17.636Z","repository":{"id":195439020,"uuid":"692550961","full_name":"aidanaden/canvas-sync","owner":"aidanaden","description":"CLI to download \u0026 view canvas videos, files and other info","archived":false,"fork":false,"pushed_at":"2024-02-02T12:53:54.000Z","size":10926,"stargazers_count":8,"open_issues_count":13,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T11:51:12.304Z","etag":null,"topics":["canvas","canvas-api","canvas-cli","cli","go","golang","nus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aidanaden.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-09-16T20:37:15.000Z","updated_at":"2024-08-07T07:30:46.000Z","dependencies_parsed_at":"2024-01-28T02:43:29.365Z","dependency_job_id":null,"html_url":"https://github.com/aidanaden/canvas-sync","commit_stats":null,"previous_names":["aidanaden/canvas-sync"],"tags_count":105,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidanaden%2Fcanvas-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidanaden%2Fcanvas-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidanaden%2Fcanvas-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aidanaden%2Fcanvas-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aidanaden","download_url":"https://codeload.github.com/aidanaden/canvas-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252914031,"owners_count":21824299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas","canvas-api","canvas-cli","cli","go","golang","nus"],"created_at":"2024-11-17T22:13:21.368Z","updated_at":"2025-05-07T16:25:17.615Z","avatar_url":"https://github.com/aidanaden.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- omit in toc --\u003e\n# canvas-sync\n\nCLI to download (course files, videos, etc) \u0026 view (deadlines, events, announcements) from [Canvas](https://www.instructure.com/canvas)\n\n\u003c!-- omit in toc --\u003e\n## Contents\n\n- [Install](#install)\n  - [Brew (mac/linux/wsl)](#brew-maclinuxwsl)\n  - [Scoop (windows)](#scoop-windows)\n  - [Autocomplete (mac/linux/wsl)](#autocomplete-maclinuxwsl)\n    - [zsh](#zsh)\n    - [bash](#bash)\n    - [fish (not necessary if you installed fish via homebrew)](#fish-not-necessary-if-you-installed-fish-via-homebrew)\n  - [Updating](#updating)\n    - [Brew](#brew)\n    - [Scoop](#scoop)\n- [Set-up](#set-up)\n- [Config](#config)\n- [Commands](#commands)\n  - [Init](#init)\n  - [Pull](#pull)\n    - [Pull Files](#pull-files)\n    - [Pull Videos](#pull-videos)\n  - [Update](#update)\n    - [Update Files](#update-files)\n    - [Update Videos](#update-videos)\n  - [View](#view)\n    - [View Deadlines (assignments)](#view-deadlines-assignments)\n    - [View Events (Announcements/lectures/tutorials)](#view-events-announcementslecturestutorials)\n    - [View People (from a given course)](#view-people-from-a-given-course)\n- [FAQ](#faq)\n- [LICENSE](#license)\n\n## Install\n\n### Brew (mac/linux/wsl)\n\nBrew is a package manager for macOS (or linux) that helps you install packages easily - more info [here](https://brew.sh/)\n\nTo install Brew:\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\nTo install canvas-sync with Brew:\n\n```bash\nbrew install aidanaden/tools/canvas-sync\n```\n\n### Scoop (windows)\n\nScoop is a package manager for windows that helps you install programs from the command line (Brew but for windows) - more info [here](https://scoop.sh/)\n\nTo install Scoop, launch powershell and run:\n\n```bash\nSet-ExecutionPolicy RemoteSigned -Scope CurrentUser\nirm get.scoop.sh | iex\n```\n\nTo install canvas-sync with Scoop:\n\n```bash\nscoop bucket add scoop-bucket https://github.com/aidanaden/scoop-bucket.git\nscoop install canvas-sync\n```\n\nYou can also download directly from the [releases](https://github.com/aidanaden/canvas-sync/releases) page\n\n### Autocomplete (mac/linux/wsl)\n\n**Warning: skip if you don't know what zsh is**\n\nRun the following code block to add autocompletion for canvas-sync to your shell.\n\n#### zsh\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    Code\n  \u003c/summary\u003e\n\n  ```bash\n  echo \"\\n\\nif type brew \u0026\u003e/dev/null\n  then\n    FPATH=\"$(brew --prefix)/share/zsh/site-functions:${FPATH}\"\n\n    autoload -Uz compinit\n    compinit\n  fi\" \u003e\u003e ~/.zshrc \u0026\u0026 source ~/.zshrc\n\n  ```\n\n\u003c/details\u003e\n\n#### bash\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    Code\n  \u003c/summary\u003e\n\n  ```bash\n  echo \"if type brew \u0026\u003e/dev/null\n  then\n    HOMEBREW_PREFIX=\"$(brew --prefix)\"\n    if [[ -r \"${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh\" ]]\n    then\n      source \"${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh\"\n    else\n      for COMPLETION in \"${HOMEBREW_PREFIX}/etc/bash_completion.d/\"*\n      do\n        [[ -r \"${COMPLETION}\" ]] \u0026\u0026 source \"${COMPLETION}\"\n      done\n    fi\n  fi\" \u003e\u003e ~/.bash_profile \u0026\u0026 source ~/.bash_profile\n  ```\n\n\u003c/details\u003e\n\n#### fish (not necessary if you installed fish via homebrew)\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    Code\n  \u003c/summary\u003e\n\n  ```bash\n  echo \"if test -d (brew --prefix)\"/share/fish/completions\"\n      set -gx fish_complete_path $fish_complete_path (brew --prefix)/share/fish/completions\n  end\n\n  if test -d (brew --prefix)\"/share/fish/vendor_completions.d\"\n      set -gx fish_complete_path $fish_complete_path (brew --prefix)/share/fish/vendor_completions.d\n  end\" \u003e\u003e ~/.config/fish/config.fish \u0026\u0026 source ~/.config/fish/config.fish\n  ```\n\n\u003c/details\u003e\n\n### Updating\n\n#### Brew\n\nIf installed using brew, simply run:\n\n```bash\ncanvas-sync upgrade\n```\n\n#### Scoop\n\nIf installed using scoop, simply run:\n\n```bash\nscoop update; scoop update canvas-sync\n```\n\nYou can also download the latest version directly from the [releases](https://github.com/aidanaden/canvas-sync/releases) page\n\n## Set-up\n\nTo set up canvas-sync, run the `init` command:\n\n```bash\ncanvas-sync init\n```\n\n![init completed](examples/init/complete.png)\n\n1. First, enter the directory to store all downloaded canvas data (files, videos, etc) e.g. `$HOME/Desktop/canvas`, if left blank all downloaded data will be stored in `$HOME/canvas-sync/data`\n\n2. Next, enter your school's canvas website url, if left blank it'll be set to `https://canvas.nus.edu.sg` (i'm from nus after all)\n\n3. You'll be asked for your username and password to log in to canvas **(required for video downloads)**\n\n4. After logging in, your config will be successfully created and all other commands will work, check them out [here](#commands)\n\n## Config\n\nAll configuration is done in the `$HOME/canvas-sync/config.yaml` file.\n\n4 values can be configured:\n\n- data_dir: directory to store downloaded canvas data, defaults to `$HOME/canvas-sync/data`  \n- canvas_url: URL of your target canvas site, defaults to `https://canvas.nus.edu.sg`\n- canvas_username: your canvas site username\n- canvas_password: your canvas site password\n- access_token **(DO NOT EDIT)**: token generated by the `init` command to download from canvas directly, if not filled you'll need to run `canvas-sync init`\n\nTo create a config file, run `canvas-sync init`\n\n## Commands\n\n### Init\n\nCreates a new config file in the default directory `$HOME/canvas-sync`\n\n![init](examples/init/init.gif)\n\n### Pull\n\nDownloads data (files, videos, etc) from canvas, overwrites all existing data\n\n#### Pull Files\n\n![pull files demo](examples/pull_files/run.gif)\n\nView documentation via `pull files -h`\n\n#### Pull Videos\n\n![pull videos demo](examples/pull_videos/run.gif)\n\nView documentation via `pull videos -h`\n\n### Update\n\nUpdates downloaded data (files, videos, etc) from canvas\n\n#### Update Files\n\n![update files demo](examples/update_files/run.gif)\n\nView documentation via `update files -h`\n\n#### Update Videos\n\n![update videos demo](examples/update_videos/run.gif)\n\nView documentation via `update videos -h`\n\n### View\n\nDisplay data from canvas (deadlines, events, announcements, etc)\n\n#### View Deadlines (assignments)\n\nDisplay past/future assignment deadlines\n\n![view deadlines demo](examples/view_deadlines/run.gif)\n\n#### View Events (Announcements/lectures/tutorials)\n\nDisplay past/future lectures/announcements\n\n![view events demo](examples/view_events/run.gif)\n\n#### View People (from a given course)\n\nDisplay people from a given course code\n\n![view people demo](examples/view_people/run.gif)\n\n## FAQ\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    What is this $HOME thing?\n  \u003c/summary\u003e\n  It's the main directory of the current user. For mac/linux it'll be `/Users/\u003cyour user name\u003e`, for windows it'll be `C:\\Users\\\u003cyour username\u003e`\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    It doesn't work for my university\n  \u003c/summary\u003e\n  This tool was built by an NUS student (me), hence i'm not able to test it with canvas sites from any other university. Please create an issue at https://github.com/aidanaden/canvas-sync/issues regarding any problems you face with your school's canvas website. Thank you! :)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    Is my username/password stored anywhere?\n  \u003c/summary\u003e\n  No, we do not store any credentials. When running the `init` command, the tool logs in to your canvas website and creates an access token that allows the tool to access your canvas data on your behalf.\n\u003c/details\u003e\n\nIf there are any other questions, please create an issue [here](https://github.com/aidanaden/canvas-sync/issues), if it's a common enough issue i'll add it to the FAQ section here :)\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidanaden%2Fcanvas-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faidanaden%2Fcanvas-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidanaden%2Fcanvas-sync/lists"}