Add make-council-pages.sh script
This commit is contained in:
@@ -13,3 +13,7 @@ The file can be generated using the jq tool and the VEC data:
|
||||
'''
|
||||
jq '[.[] | {name: .electorateName, electorateId: .electorateId, shortName: .parentElectorateName | match("(.*?)(?:(?: Rural)?(?: City| Shire) Council)").captures[0].string, parentElectorateId: .parentElectorateId, councilName: .parentElectorateName }] | group_by(.parentElectorateId) | map({shortName: .[0].shortName, councilName: .[0].councilName, wardNames: . | map(.name) }) | sort_by(.shortName)' "VEC Data\wards.json" > council_names.json
|
||||
'''
|
||||
|
||||
## make-council-pages.sh
|
||||
|
||||
This is a bash script for creating a page in WordPress for each council. If a page for a council already exists, the page will be updated instead. The source of councils for this script is the "council_names.json" file. The script needs the `jq` and `wp` tools.
|
||||
Reference in New Issue
Block a user