Author : Zhe-Hui Lin
Github : https://github.com/uegajde/eawdc
script | description | advice for normal user |
---|---|---|
eawdc.py | main script to do the download | use this to perform download, not recommend to modify |
settings.py | save settings about time-interval of data to download, and so on | modify settings here |
urlgenerator.py | responsible for generate url for each resource | add/update resource here |
urlgenhelper.py | a url generation helper module | not recommend to modify |
mtd.py | a multi-thread downloader module with simple progress showing function | not recommend to modify |
- prepare the env
- check do you have a python 3, if not install one
- this package only relies on python's basic packages/modules and does not require any third-party package
- perform download
- python eawdc.py (for Linux/MacOS) or python.exe eawdc.py (for Windows)
- you can find data in the folder named 'download' (default)
- modify settings
- understand the basic python syntax
- understand what the option going to affect
- edit settings.py
- add/update resource
- get a correct url and understand what it should be for a different timing
- edit urlgenerator.py based on the rules you observed in step 1
- add corresponding timeConfigure in the settings
-
destinationDir: (str) the directory/folder to save downloaded files
-
doDownload: (bool) perform download or not, set to False when you just want to obtain the urls
-
show_toDownload: show the url list going to request. it is useful for debug
-
blankTime: blank time for the data productor preparing the latest one and avoid meaningless request trial
-
urlgenhelper.timeConfigure: register the wanted resource, setup the download behavior and configs related to timelabel generating
- if you do not require some resource, just comment them
- the resouce should has corresponding rules in urlgenhelper.py
- urlgenhelper.timeConfigure intro:
arg description name name of resource unit unit of time interval period decide the time coverage timeInterval time interval of data to download again should download file again even if there already exist a file with same name timeAlignUnit the time unit used for time-align timeAlignShift the base time shift in time-align timeAlignMultiplier the multiplier (i.e., interval) in time-align