extract meanings of holidays and merge them into CSV

This commit is contained in:
2025-02-26 01:05:56 +09:00
parent d2435335d4
commit 2c90b359dd
6 changed files with 102 additions and 3 deletions

3
update
View File

@@ -72,9 +72,10 @@ if ! diff -q $RAW_CSV_FILE $TMP_CSV_FILE >/dev/null 2>&1; then
mv $TMP_CSV_FILE $RAW_CSV_FILE
nkf -w $RAW_CSV_FILE >$ALL_CSV_FILE
current_year=$(date +'%Y')
tail -n +2 $ALL_CSV_FILE | awk -v cy="$current_year" -F'/' '{ if ($1 >= cy) print }' >$CSV_FILE
tail -n +2 $ALL_CSV_FILE | awk -v cy="$current_year" -F'/' '{ if ($1 >= cy) print }' | tr -d '\r' >$CSV_FILE
log "Changed"
send_mail
./merge
else
log "No Change"
rm $TMP_CSV_FILE