Fix formatting in readme

This commit is contained in:
2024-07-28 19:07:46 +10:00
parent dac4c6d672
commit e4169182e0

View File

@@ -8,12 +8,16 @@ Contains the name of each council, a "short" name, and the names of each ward in
The "short" named is created by taking the electorate name and removing the words "Rural", "City", "Shire", or "Council". The "short" named is created by taking the electorate name and removing the words "Rural", "City", "Shire", or "Council".
The file can be generated using the jq tool and the VEC data: 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 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 ## 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. 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.