Skip to content

Commit

Permalink
New Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Astrak00 committed Oct 1, 2024
1 parent 4a4ed54 commit c434367
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ on:
jobs:
build:
name: Build

runs-on: ubuntu-latest

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
downloadedCourseFiles
.venv
courses
courses_test
courses_test
AGDownloader
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,47 @@

AGDownloader is a simple and easy-to-use downloader for AulaGlobal (the use of moodle by the University Carlos III of Madrid). It is a command-line tool that allows you to download all the files from all the courses a user has access to.

## Installation

To install AGDownloader, you will need to compile it from source using go. You can do this by running the following command:
## Usage

To use AGDownloader, execute the following command:

```bash
go build
./AGDownloader
```
You can specify some parameters to customize the download process but if you don't the program will ask you for them (except for the parameters that have a default value).

## Usage
```bash
./AGDownloader -h

Usage of ./AGDownloader:
-c int
Introduce the cores to use in the download (default 7)
-d string
Introduce the directory where you want to save the files (default "courses")
-l int
Choose your language: 1: Español, 2:English
-t string
Introduce your Aula Global user security token 'aulaglobalmovil'
```

Here, `<token>` is the token available in the preferences panel, and `<directory>` specifies the location where you want to save the downloaded files. The `<num_cores>` parameter indicates how many cores you wish to allocate for the download. If you do not provide this, the program will utilize all available cores minus one.

To use AGDownloader, you will need to run the following command:
### Obtaining the token

To obtain the token, you must log in to AulaGlobal and go to the preferences panel. There, you will find the token under the "Security keys" section. Copy the token and paste it into the program when prompted.

![Retrieving token](assets/instructions-token.gif)

## Build from source

To build the program from source, you will need to have Go installed on your computer. You can download it from the [official website](https://golang.org/). Once you have installed Go, you can clone the repository and build the program by running the following commands:

```bash
./AGDownloader -l <language=1|2> -t <token> -d <directory> -c <num_cores>
git clone [email protected]:Astrak00/AGDownloader.git
go build
```

Where `<token>` is the token you can get from the preferences panel and `<directory>` is the directory where you want to download the files.
`<num_cores>` is the number of cores you want to use to download the files. If you don't specify this parameter, the program will use all the cores available.


## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Expand Down
Binary file added assets/instructions-token.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c434367

Please sign in to comment.