-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
61 lines (61 loc) · 9.05 KB
/
package.json
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"name": "dspro2",
"version": "0.1.0",
"main": "dist/dspro/index.js",
"repository": "[email protected]:exampleteam2/dspro2.git",
"author": "Linus Schlumberger <[email protected]>",
"license": "MIT",
"type": "module",
"scripts": {
"watch": "tsc -w ",
"build": "tsc",
"start": "npm run build && node dist/index.js",
"scrape:prepare": "playwright install",
"scrape:environment": "npm run build && node 'dist/1_data_collection/playwright_setup_environment.js'",
"scrape:direct": "playwright test --config='dspro2/1_data_collection/playwright.config.ts' --project=chromium-stealth",
"scrape": "npm run scrape:environment && npm run scrape:direct",
"scrape:ui": "npm run scrape:environment && playwright test --config='dspro2/1_data_collection/playwright.config.ts' --project=chromium-stealth --ui",
"scrape:deploy": "export CI=true && npm run scrape:environment && playwright test --config='dspro2/1_data_collection/playwright.config.ts' --project=chromium-stealth",
"scrape:cleanup": "chmod +x 'dspro2/1_data_collection/delete_leftover.sh' && './dspro2/1_data_collection/delete_leftover.sh'",
"scrape:cleanup:incomplete": "chmod +x 'dspro2/1_data_collection/delete_non_complete.sh' && './dspro2/1_data_collection/delete_non_complete.sh'",
"scrape:cleanup:all": "rm -rf 'dspro2/1_data_collection/.data/'",
"scrape:count": "find 'dspro2/1_data_collection/.data/' -name 'geoguessr_result_singleplayer*' | wc -l && find 'dspro2/1_data_collection/.data/' -name 'geoguessr_result_multiplayer*' | wc -l",
"scrape:count:images": "find 'dspro2/1_data_collection/.data/' -name 'geoguessr_location_singleplayer*' | wc -l && find 'dspro2/1_data_collection/.data/' -name 'geoguessr_location_multiplayer*' | wc -l",
"demo:queue": "npm run build && node 'dist/7_demo/shadow_game_prompter.js'",
"demo:run": "echo \"server running, run yarn demo:queue to queue a game\" && cross-env PLAYWRIGHT_MODE=demo npm run scrape:environment > nul 2>&1 || cross-env PLAYWRIGHT_MODE=demo npm run scrape:environment > /dev/null 2>&1 && cross-env PW_TEST_HTML_REPORT_OPEN=never PLAYWRIGHT_MODE=demo npm run scrape:direct",
"data:import": "chmod +x 'dspro2/1_data_collection/import.sh' && './dspro2/1_data_collection/import.sh'",
"format": "prettier --write . --print-width 2000 --prose-wrap preserve --single-quote",
"python:prepare": "pip3 install poetry \"black[jupyter]\"",
"python:format": "black . -l 2000",
"pdf:prepare": "run-script-os",
"pdf:prepare:default": "echo 'Unsupported OS. Please install Pandoc and BasicTeX manually.'",
"pdf:prepare:win32": "choco install pandoc && choco install miktex && echo \"Please restart your terminal.\"",
"pdf:prepare:darwin": "brew install pandoc && curl -L https://mirror.ctan.org/systems/mac/mactex/MacTeX.pkg -o MacTeX.pkg && open MacTeX.pkg && echo 'MacTeX installed, please manually delete the installer using rm MacTeX.pkg when done.' && echo 'Please restart your terminal.'",
"pdf:prepare:linux": "if command -v apt-get >/dev/null; then sudo apt-get update && sudo apt-get install -y pandoc texlive-full; elif command -v yum >/dev/null; then sudo yum update && sudo yum install -y pandoc texlive-full; else echo 'No supported package manager found. Please install pandoc and texlive-full manually.'; fi && echo \"Please restart your terminal.\"",
"pdf:export": "run-script-os",
"pdf:replace-newlines:default": "node -e \"const fs = require('fs'); const filePath = './deliverables/ScientificReport/scientific_report_temp.md'; fs.readFile(filePath, 'utf8', (err, data) => { if (err) throw err; const result = data.replace(/\\\\\\n/g, '\\n'); fs.writeFile(filePath, result, 'utf8', (err) => { if (err) throw err; }); });\"",
"pdf:replace-newlines:win32": "node -e \"const fs = require('fs'); const filePath = './deliverables/ScientificReport/scientific_report_temp.md'; fs.readFile(filePath, 'utf8', (err, data) => { if (err) throw err; const result = data.replace(/\\\\n/g, '\\n'); fs.writeFile(filePath, result, 'utf8', (err) => { if (err) throw err; }); });\"",
"pdf:replace-images:default": "yarn replace '!\\[[^|\\]]*\\|(\\d+)\\]\\((?:\\.|deliverables\\/ScientificReport)\\/images\\/([^\\)]+)\\.[^\\).]+\\)' '$$$$\n\\graphicspath{ {./deliverables/ScientificReport/images/} }\n\\includegraphics[width=$1px]{$2}\n$$$$' ./deliverables/ScientificReport/scientific_report_temp.md && yarn replace '(?<=\\n|^)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*(?=\\n|$)' '| $1![$2--0.3]($3)$4 | $5![$6--0.3]($7)$8 | $9![$10--0.3]($11)$12 |' ./deliverables/ScientificReport/scientific_report_temp.md && yarn replace '(?<=\\n|^)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*(?=\\n|$)' '| $1![$2--0.45]($3)$4 | $5![$6--0.45]($7)$8 |' ./deliverables/ScientificReport/scientific_report_temp.md && yarn replace '!\\[[^|\\]]*--(\\d\\.\\d+)\\]\\((?:\\.|deliverables\\/ScientificReport)\\/images\\/([^\\)]+)\\.[^\\).]+\\)' '$$$$\n\\graphicspath{ {./deliverables/ScientificReport/images/} }\n\\includegraphics[width=$1\\textwidth]{$2}\n$$$$' ./deliverables/ScientificReport/scientific_report_temp.md && yarn replace '!\\[[^|\\]]*\\]\\(\\)' '' ./deliverables/ScientificReport/scientific_report_temp.md && yarn replace '!\\[[^|\\]]*\\]\\((?:\\.|deliverables\\/ScientificReport)\\/images\\/([^\\)]+)\\.[^\\).]+\\)' '$$$$\n\\graphicspath{ {./deliverables/ScientificReport/images/} }\n\\includegraphics[width=0.9\\textwidth]{$1}\n$$$$' ./deliverables/ScientificReport/scientific_report_temp.md && yarn pdf:replace-newlines:default",
"pdf:replace-images:win32": "yarn replace \"!\\[[^|\\]]*\\|(\\d+)\\]\\((?:\\.|deliverables\\/ScientificReport)\\/images\\/([^\\)]+)\\.[^\\).]+\\)\" \"$$$$\\n\\graphicspath{ {./deliverables/ScientificReport/images/} }\\n\\includegraphics[width=$1px]{$2}\\n$$$$\" .\\deliverables\\ScientificReport\\scientific_report_temp.md && yarn replace \"(?<=\\n|^)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*(?=\\n|$)\" \"| $1![$2--0.3]($3)$4 | $5![$6--0.3]($7)$8 | $9![$10--0.3]($11)$12 |\" .\\deliverables\\ScientificReport\\scientific_report_temp.md && yarn replace \"(?<=\\n|^)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*([^|\\n]*?)(?:!\\[([^|\\]]*)\\]\\(([^\\)]+\\.[^\\).]+)\\))?([^|\\n]*?)\\s*\\|\\s*(?=\\n|$)\" \"| $2![$2--0.45]($3)$4 | $5![$6--0.45]($7)$8 |\" .\\deliverables\\ScientificReport\\scientific_report_temp.md && yarn replace \"!\\[[^|\\]]*--(\\d\\.\\d+)\\]\\((?:\\.|deliverables\\/ScientificReport)\\/images\\/([^\\)]+)\\.[^\\).]+\\)\" \"$$$$\\n\\graphicspath{ {./deliverables/ScientificReport/images/} }\\n\\includegraphics[width=$1\\textwidth]{$2}\\n$$$$\" .\\deliverables\\ScientificReport\\scientific_report_temp.md && yarn replace \"!\\[[^|\\]]*\\]\\(\\)\" \"\" .\\deliverables\\ScientificReport\\scientific_report_temp.md && yarn replace \"!\\[[^|\\]]*\\]\\((?:\\.|deliverables\\/ScientificReport)\\/images\\/([^\\)]+)\\.[^\\).]+\\)\" \"$$$$\\n\\graphicspath{ {./deliverables/ScientificReport/images/} }\\n\\includegraphics[width=0.9\\textwidth]{$1}\\n$$$$\" .\\deliverables\\ScientificReport\\scientific_report_temp.md && yarn pdf:replace-newlines:win32",
"pdf:export:default": "cp ./deliverables/ScientificReport/scientific_report.md ./deliverables/ScientificReport/scientific_report_temp.md && yarn pdf:replace-images:default && pandoc ./deliverables/ScientificReport/scientific_report_temp.md --template ./deliverables/ScientificReport/.assets/eisvogel.latex --output ./deliverables/ScientificReport/scientific_report.pdf --from markdown --citeproc --csl ./deliverables/ScientificReport/.assets/apa.csl && rm ./deliverables/ScientificReport/scientific_report_temp.md",
"pdf:export:win32": "copy .\\deliverables\\ScientificReport\\scientific_report.md .\\deliverables\\ScientificReport\\scientific_report_temp.md && yarn pdf:replace-images:default && pandoc .\\deliverables\\ScientificReport\\scientific_report_temp.md --template .\\deliverables\\ScientificReport\\.assets\\eisvogel.latex --output .\\deliverables\\ScientificReport\\scientific_report.pdf --from markdown --citeproc --csl .\\deliverables\\ScientificReport\\.assets\\apa.csl && del .\\deliverables\\ScientificReport\\scientific_report_temp.md"
},
"devDependencies": {
"@playwright/test": "^1.41.2",
"@types/node": "^20.11.20",
"@types/prompt-sync": "^4.2.3",
"cross-env": "^7.0.3",
"playwright-extra": "^4.3.6",
"prettier": "^3.3.2",
"puppeteer-extra-plugin-stealth": "^2.11.2",
"replace": "^1.2.2",
"run-script-os": "^1.1.6",
"typescript": "^5.3.3"
},
"dependencies": {
"check-disk-space": "^3.4.0",
"chokidar": "^3.6.0",
"dotenv": "^16.4.5",
"prompt-sync": "^4.2.0"
}
}