Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCLIArgs ¶ added in v1.10.1
func ParseCLIArgs() types.ProgramArgs
ParseCLIArgs parses the command-line arguments and returns a ProgramArgs struct. It defines and processes the following flags:
-l: Language of the course names, either "ES" (Español) or "EN" (English). Default is "ES".
--token: Aula Global user security token 'aulaglobalmovil'.
--dir: Directory where the files will be saved.
-p: Number of cores to be used while downloading. Default is 0.
--fast: If set, MaxGoroutines will be set to the number of files for fastest downloading.
--courses: A list of course IDs or names to be downloaded, enclosed in quotes and separated by spaces. "all" downloads all courses. It validates the token and adjusts the number of cores if the fast flag is set.
Returns a ProgramArgs struct containing the parsed values.
func PromptMissingArgs ¶ added in v1.10.1
func PromptMissingArgs(arguments types.ProgramArgs) types.ProgramArgs
Ask the user in an interactive way for the missing arguments. The user will be prompted for the directory path and the number of cores to use. Returns a ProgramArgs struct with the obtained values.
Types ¶
This section is empty.