From e4169182e0be064c58926542fcff81df707eff28 Mon Sep 17 00:00:00 2001 From: Matt Way Date: Sun, 28 Jul 2024 19:07:46 +1000 Subject: [PATCH] Fix formatting in readme --- Readme.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 7290d14..4606465 100644 --- a/Readme.md +++ b/Readme.md @@ -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 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 -''' +``` ## 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. \ No newline at end of file +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. \ No newline at end of file