-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·27 lines (21 loc) · 1.04 KB
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
# # build
#
# Build the site, which is static.
#
# Assumes the following are checked out as siblings of the current repository:
# - <https://github.com/yawnoc/mahjong-scorer>
# - <https://github.com/conway-markdown/conway-markdown>
git clean -Xfd
new_years_date_2023=2023-01-22
new_years_date_2024=2024-02-10
latest_date=$(grep -P '^[0-9]{4}-[0-9]{2}-[0-9]{2}$' ./scores/scores.txt | tail -1)
python3 ../mahjong-scorer/mahjongscore.py ./scores/scores.txt --from $new_years_date_2023 --to $new_years_date_2024
python3 ../mahjong-scorer/mahjongscore.py ./scores/scores.txt --from $new_years_date_2024
python3 ../mahjong-scorer/mahjongscore.py ./scores/scores.txt --from $latest_date
mv "./scores/scores.txt --from ${new_years_date_2023} --to ${new_years_date_2024}.tsv" './scores/2023.tsv'
mv "./scores/scores.txt --from ${new_years_date_2024}.tsv" './scores/2024.tsv'
mv "./scores/scores.txt --from ${latest_date}.tsv" './scores/latest.tsv'
python3 ./res/scoring.py $latest_date
cmd --all # pip3 install conwaymd
python3 ./res/sitemap.py