Separate file for pledge data.

This commit is contained in:
Kim Taylor
2024-09-14 14:40:52 +10:00
parent b0985b6d60
commit 1ab14ba8c9
2 changed files with 33 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
#!/bin/bash
# If this runs as a cron job - might want to limit the number of revisions wordpress stores:
# If this runs as a cron job - might want to limit the number of revisions
# wordpress stores:
# wp-config.php:
# define( 'WP_POST_REVISIONS', 3 );
@@ -12,14 +13,14 @@
DATA_PATH="../spl-data"
candidates_files=()
pledges_files=()
for folder in "$DATA_PATH"/*; do
if test -f "$folder"/candidates.csv; then
candidates_files+=("$folder"/candidates.csv)
if test -f "$folder"/pledges.csv; then
pledges_files+=("$folder"/pledges.csv)
fi
done
pledge_sed=$(php pledge-update/main.php --candidates-files "${candidates_files[*]}")
pledge_sed=$(php pledge-update/main.php --pledges-files "${pledges_files[*]}")
content=$(sed "$pledge_sed" ../spl-data/movie-homepage)