-
Linux OS or WSL to access
bash
commands likesed
,cat
,echo
, ... -
bash-package
jq
sudo apt install jq
-
Microsoft Excel for Proof of Concept Graphics
-
load requirements of
oatz-charts
anddev-server
project# from ./oatz-charts npm install # and # from ./dev-server npm install
-
start
dev-server
# from ./dev-server npm run run #or from ./oatz-charts npm run dev-server
-
start react in
./oatz-charts
npm run start #or yarn start
Note: see ./dev-server/ReadMe.md
on details of served json files, if dev-server
is not available, will use offline data from ./oatz-charts/src/lib/data.json
powershell .\deploy.ps1
Note: returns Everything up-to-date
in case the build
does not contain any changes
Note: script was created using guideline Gist cobyism/gh-pages-deploy.md
with replacing bash's &&
with ; if ($?) {...}
as pointed out at this stackoverflow response. Also note that -and
is not a valid replacement for &&
and that &&
should be supported by Powershell v7+ according to that stackoverflow response.
Note: Call Powershell scripts from Windows Command Prompt either with powershell .\script.ps1
(see response at stackoverflow) or PowerShell -File .\script.ps1
(see petri.com - How to Write and Run a PowerShell Script File on Windows 11)
initially had to fix gh-pages branch with guideline from stephenlee.info - Force Push a Git Subtree as gh-pages branch was previously maintained with committing manual copies of build directory content, leading to non-mergeable scenario for git subtree push
with
# push build-dir content into new local `gh-pages` branch
git subtree split --prefix oatz-charts/build -b gh-pages
# force push the local gh-pages branch over the remote one
git push -f origin gh-pages:gh-pages
# delete the local gh-pages branch
git branch -D gh-pages
-
get all JSON data from OATS Rocket League API
curl https://www.oatz.net/rocketleague/api/all | jq "." > ./oatz-charts/src/lib/data.json
-
create Excel-importable csv table from
data.json
bash json2csv.sh
creates
data.csv
extracted stats in tabular format:date | username | ...stats
data_ger.csv
for opening with German MS Excel (',' comma)
-
open
data.csv
in Excel and copy data into first Tab ofdata.xslx
(+ extend first column in this tab to the new table size)
run dev server on each npm start
, see stackoverflow
npm --prefix /path/to/project run build