diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1258c19..74b0996 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,9 +8,7 @@ on: jobs: build: name: Build - runs-on: ubuntu-latest - strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] diff --git a/.gitignore b/.gitignore index ea9c4ca..081452a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ downloadedCourseFiles .venv courses -courses_test \ No newline at end of file +courses_test +AGDownloader diff --git a/README.md b/README.md index c653c58..76e98fe 100644 --- a/README.md +++ b/README.md @@ -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, `` is the token available in the preferences panel, and `` specifies the location where you want to save the downloaded files. The `` 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 -t -d -c +git clone git@github.com:Astrak00/AGDownloader.git +go build ``` -Where `` is the token you can get from the preferences panel and `` is the directory where you want to download the files. -`` 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. diff --git a/assets/instructions-token.gif b/assets/instructions-token.gif new file mode 100644 index 0000000..92d9978 Binary files /dev/null and b/assets/instructions-token.gif differ