-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpseudo.cmd
69 lines (51 loc) · 1.41 KB
/
pseudo.cmd
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
62
63
64
65
66
67
68
@echo OFF
echo.
@REM set PYHOME=python-3.9.10-embed-amd64/
if NOT defined %PSEUDOENVIROMENT% ( set python3="%~sp0\python-3.9.10-embed-amd64\python.exe" && set "PSEUDOENVIROMENT=y")
if "%1" == "--help" ( goto commands-help goto terminate)
if "%1" == "highlight" ( goto highlight goto terminate)
if "%1" == "view-date" ( goto date-view goto terminate )
if "%1" == "reload" ( goto reload goto terminate )
if "%1" == "view-time" ( goto time-view goto terminate)
if "%1" == "--version" ( goto version goto terminate)
if "%1" == "--translate" ( goto translate goto terminate)
if "%2" == "--test" goto testcase
if "%2" == "--edit" ( notepad "%~1" goto terminate)
if "%1" == "" ( goto help ) else ( goto normal )
:: this function goes to the documentation dir and returns to the previous dir after printing from a file
:help
TYPE "%~sp0\Documentation\file"
goto terminate
:highlight
set workingDIR="%CD%"
CD "%~sp0\\clink"
clink inject --quiet
goto terminate
:normal
%python3% "%~sp0\compile.py" "%~1"
goto terminate
:testcase
%python3% "%~sp0\algo.py" "%~3" "%~1"
goto terminate
:time-view
echo %TIME%
goto terminate
:date-view
echo %DATE%
goto terminate
:commands-help
TYPE "%~sp0\Documentation\commands"
goto terminate
:version
TYPE "%~sp0\CHANGELOG.md"
goto terminate
:translate
%python3% "%~sp0\compile.py" "%~2" "cpp"
goto terminate
:reload
CHDIR %PSEUDOHOME%
echo loaded
PseudoApp
goto terminate
:terminate
echo.