0.5.3 • Published 7 years ago
resource-downloader v0.5.3
web-resource-downlaoder
install
npm -g i resource-downloader
rdcli #or resource-downloader
feature
- command line interface
- local config, multiple remote configs
- download multiple image resource -> zip
- wide(width > height) images -> split half / half
- swap split file order(split: left -> right, splitRight right -> left)
- async operation(via stream);
config
rdconfig.json
sample
{ "sites": [{ "name": "Top Box Office (US)", "url": "http://www.imdb.com/chart/boxoffice", "stages": [{ "type": "list", "selector": "#boxoffice .titleColumn a", "attrs": { "value": "href" }, "message": "select movie", "operation": { "type": "next" } }, { "type": "download", "selector": ".poster img", "attrs": { "value": "src" }, "prefixes": { "doing": "[receiving] ", "done": "[received] ${0}" }, "operation": { "type": "prev" } }] }], "remoteConfigs": [] }
typescript definition
interface Config {
sites: Sites;
remoteConfigs: string[];
}
remoteConfigs is url indicates rdconfig.json
format text
loading order
- ./rdconfig.json
- ~/.config/rdconfig.json
etc
license
Apache 2.0