Compare commits
No commits in common. "master" and "2f950e219173074fdaeb066bb12823c8989a1b3e" have entirely different histories.
master
...
2f950e2191
@ -60,7 +60,7 @@ const lastUpdate = new Date(lastGlobalDeathsUpdate > lastUSDeathsUpdate ?
|
|||||||
);
|
);
|
||||||
|
|
||||||
const zeroPad = value => value < 10 ? `0${value}` : value.toString();
|
const zeroPad = value => value < 10 ? `0${value}` : value.toString();
|
||||||
const toSafeName = x => x.replace(/[^A-Za-z0-9]/g, '-').toLowerCase();
|
const toSafeName = x => x.replace(/[^A-Za-z]/g, '-').toLowerCase();
|
||||||
|
|
||||||
const processRecords = async () => {
|
const processRecords = async () => {
|
||||||
const globalStart = Date.now();
|
const globalStart = Date.now();
|
||||||
@ -153,7 +153,6 @@ const processRecords = async () => {
|
|||||||
'Czech Republic': 'Czechia',
|
'Czech Republic': 'Czechia',
|
||||||
'Vatican City': 'Holy See',
|
'Vatican City': 'Holy See',
|
||||||
'South Korea': 'Korea, South',
|
'South Korea': 'Korea, South',
|
||||||
'North Korea': 'Korea, North',
|
|
||||||
'Taiwan': 'Taiwan*',
|
'Taiwan': 'Taiwan*',
|
||||||
'East Timor': 'Timor-Leste',
|
'East Timor': 'Timor-Leste',
|
||||||
'Palestine': 'West Bank and Gaza',
|
'Palestine': 'West Bank and Gaza',
|
||||||
@ -173,14 +172,9 @@ const processRecords = async () => {
|
|||||||
return map;
|
return map;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
// setting olympics population based on data from
|
|
||||||
// https://www.nbcsports.com/northwest/tokyo-olympics/tokyo-olympics-numbers-participating-country-stats-and-facts
|
|
||||||
countryPopulationMap['Summer Olympics 2020'] = statePopulationMap['Summer Olympics 2020'] = 11091;
|
|
||||||
countryPopulationMap['Diamond Princess'] = statePopulationMap['Diamond Princess'] = 3711;
|
countryPopulationMap['Diamond Princess'] = statePopulationMap['Diamond Princess'] = 3711;
|
||||||
countryPopulationMap['MS Zaandam'] = 1829;
|
countryPopulationMap['MS Zaandam'] = 1829;
|
||||||
countryPopulationMap['Kosovo'] = 1810463;
|
countryPopulationMap['Kosovo'] = 1810463;
|
||||||
countryPopulationMap['Antarctica'] = 3250; // https://worldpopulationreview.com/continents/antarctica-population
|
|
||||||
countryPopulationMap['Winter Olympics 2022'] = 2900;
|
|
||||||
statePopulationMap['Grand Princess'] = 3533;
|
statePopulationMap['Grand Princess'] = 3533;
|
||||||
if (statePopulationMap['Puerto Rico Commonwealth']) {
|
if (statePopulationMap['Puerto Rico Commonwealth']) {
|
||||||
statePopulationMap['Puerto Rico'] = statePopulationMap['Puerto Rico Commonwealth'];
|
statePopulationMap['Puerto Rico'] = statePopulationMap['Puerto Rico Commonwealth'];
|
||||||
|
10
update.sh
10
update.sh
@ -6,12 +6,10 @@ dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
|
|
||||||
cd "${dir}"
|
cd "${dir}"
|
||||||
|
|
||||||
node=/home/tmont/.nvm/versions/node/v12.16.2/bin/node
|
|
||||||
PATH="$PATH:$(dirname "${node}")"
|
|
||||||
|
|
||||||
if ! which node > /dev/null; then
|
if ! which node > /dev/null; then
|
||||||
echo "node not available"
|
#. /home/tmont/.nvm/nvm.sh
|
||||||
exit 1
|
nvm use
|
||||||
|
yarn install --production --non-interactive --pure-lockfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "./COVID-19" ]]; then
|
if [[ ! -d "./COVID-19" ]]; then
|
||||||
@ -24,6 +22,6 @@ rm -rf ./public/
|
|||||||
|
|
||||||
./generate.js
|
./generate.js
|
||||||
|
|
||||||
rsync -vaz ./public/ covid19:/var/www/sites/covid19.tmont.com/live/
|
rsync -vaz -e "ssh -i /home/tmont/.ssh/nuc-main" ./public/ tmont@tmont.com:/var/www/sites/covid19.tmont.com/live/
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user