A config file based python script to download the latest release assets from github.
Just clone the repository or download the .py file.
python3 ghdl.py -c config.jsonYou can adjust the logging level with the -l parameter.
python3 ghdl.py -c config.json -l infoUse the -h parameter to see detailed usage.
ghdl uses json as the configuration format, and there is an example configuration file named config.json in the repository.
The explanation of each field in the configuration is as follows:
overwrite: Whether to overwrite the file if it already exists. Default:trueclear_matches: Whether to delete files in the download directory that match the filters before downloading. Default:falsedir: Download directory. Default:"", which means the current working directorytoken: Global GitHub token. Default:"", which means that the token will not be usedconcurrency: Number of concurrency. Setting it to0instead of1to disable concurrency. Default:5repos: List of repository configurations. This field is required, but can be emptyowner: Owner of the repository. This field is requiredrepo: Repository name. This field is requiredtokeninrepos: Repository specified token. If it is empty then global token will be used. Default:""filters: List of filters. Only matched files will be downloaded. Each filter is a regular expression that requires a full match of the filename,""means nothing matches. An empty list means all matches. Default:[]