Skip to content

Commit

Permalink
docs: fix quick-start docs (skyzh#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzh authored Feb 20, 2021
1 parent bbf6fc2 commit b60f269
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
Grab all files on Canvas LMS to local directory.

*Less is More.* In canvas_grab v2, we focus on stability and ease of use.
Now you don't have to tweaking dozens of configurations. We have a very
Now you don't have to tweak dozens of configurations. We have a very
simple setup wizard to help you get started!

For legacy version, refer to [legacy](https://github.com/skyzh/canvas_grab/tree/legacy) branch.

## Getting Started

1. Install Python
2. Download https://github.com/skyzh/canvas_grab/archive/master.zip or `git clone https://github.com/skyzh/canvas_grab`
2. Download https://github.com/skyzh/canvas_grab/archive/master.zip or
`git clone https://github.com/skyzh/canvas_grab`
3. Run `./canvas_grab.sh` (Linux, macOS) or `.\canvas_grab.ps1` (Windows) in Terminal.
5. Get your API key at Canvas profile and you're ready to go!

See `Build and Run from Source` for more details.
Please refer to `Build and Run from Source` for more information.
4. Get your API key at Canvas profile and you're ready to go!

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

Expand All @@ -27,16 +27,23 @@ If you have any questions, feel free to file an issue [here](https://github.com/

First of all, please install Python 3.8+, and download source code.

For macOS or Linux users:
We have prepared a simple script to automatically install dependencies and run canvas_grab.

For macOS or Linux users, open a Terminal and run:

```bash
./canvas_grab.sh
```

For Windows users:
```powershell
.\canvas_grab.ps1
```

1. Right-click Windows icon on taskbar, and select "Run Powershell (Administrator)".
2. Run `Set-ExecutionPolicy Restricted` in Powershell.
3. Open `canvas_grab` source file in file browser, Shift + Right-click on blank area, and select `Run Powershell here`.
4. Now you can start canvas_grab with a simple command:
```powershell
.\canvas_grab.ps1
```

## Configure

Expand Down Expand Up @@ -66,7 +73,8 @@ re-configure, run `./canvas_grab.sh configure`.
[@BugenZhao](https://github.com/BugenZhao),
[@ElectronicElephant](https://github.com/ElectronicElephant),
[@LuminousXLB](https://github.com/LuminousXLB),
[@squnit](https://github.com/squnit)
[@squnit](https://github.com/squnit),
[@Kienyew](https://github.com/Kienyew)

## License

Expand Down
10 changes: 5 additions & 5 deletions canvas_grab.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
$ErrorActionPreference = "Stop"

echo "Check Python installation..."
python3 --version
python --version

echo "Check virtual environment..."

if (-Not(Test-Path -Path venv)) {
echo "Create virtual environment..."
python3 -m venv venv
python -m venv venv
echo "Activate virtual environment..."
. ./venv/bin/Activate.ps1
. ./venv/Scripts/Activate.ps1
echo "Install dependencies with SJTUG mirror..."
python -m pip install --upgrade pip -i https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple
python -m pip install -r requirements.txt -i https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple
python -m pip install -r requirements.windows.txt -i https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple
} else {
echo "Activate virtual environment..."
. ./venv/bin/Activate.ps1
. ./venv/Scripts/Activate.ps1
}

python main.py $@
python main.py $args
2 changes: 1 addition & 1 deletion canvas_grab/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from termcolor import colored

GITHUB_RELEASE_URL = "https://api.github.com/repos/skyzh/canvas_grab/releases/latest"
VERSION = "2.0.2-alpha"
VERSION = "2.0.3-alpha"


def check_latest_version():
Expand Down

0 comments on commit b60f269

Please sign in to comment.