allow collect.py script to script sites like downloads.openwrt.org
[web/firmware-selector-openwrt-org.git] / README.md
index b361967c8ef6bcb2fa36697a5dc44b24932998eb..0cd415196e67ab9eca9efd582d8388a49801d8fb 100644 (file)
--- a/README.md
+++ b/README.md
@@ -24,10 +24,15 @@ The `overview.json` files are based on JSON files created by OpenWrt
 (master): `Global build settings  ---> [*] Create JSON info files per build
 image`.
 
-A [Python script](misc/collect.py) is included to merge the JSON files:
-`./collect.py bin/ --download-url
-'https://downloads.openwrt.org/releases/{version}/targets/{target}' >
-overview.json`.
+A [Python script](misc/collect.py) is included to merge the JSON files into a single overview.json:
+```
+./collect.py merge bin/ --download-url 'https://downloads.openwrt.org/releases/{version}/targets/{target}' > overview.json
+```
+
+If you want to scrape the OpenWrt download website and update the config.js automatically:
+```
+./collect.py scrape https://downloads.openwrt.org /var/www/firmware_selector
+```
 
 For the OpenWrt 18.06 and 19.07 releases, you need to patch OpenWrt to output JSON files for collect.py (commit [openwrt/openwrt@881ed09](https://github.com/openwrt/openwrt/commit/881ed09ee6e23f6c224184bb7493253c4624fb9f)).