Update template to support elected candidate data

This commit is contained in:
2024-11-18 00:20:50 +11:00
parent 45a5afc5f9
commit 5791273f56
4 changed files with 52 additions and 3 deletions

View File

@@ -38,7 +38,13 @@ function create_or_update_page() {
candidates_file="$DATA_PATH"/$slug/candidates-generic.csv
fi
content=$(echo "$council_block" | jq -c | php php-template/main.php --council-file "php://stdin" --candidates-file "$candidates_file" --media-file "$DATA_PATH"/$slug/media.json )
if test -f "$DATA_PATH"/$slug/candidates-elected.csv; then
candidates_elected_file="$DATA_PATH"/$slug/candidates-elected.csv
echo "Found candidates-elected.csv"
fi
content=$(echo "$council_block" | jq -c | php php-template/main.php --council-file "php://stdin" --candidates-file "$candidates_file" --media-file "$DATA_PATH"/$slug/media.json --candidates-elected-file "$candidates_elected_file" )
if [ $? -eq 0 ]; then