aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/.gitignore1
-rw-r--r--scripts/readme.md24
-rw-r--r--scripts/win_build.cmd5
-rw-r--r--scripts/win_compile_example.cmd10
-rw-r--r--scripts/win_generate_yaml_files.cmd21
-rw-r--r--scripts/win_help.cmd5
-rw-r--r--scripts/win_start_vueui.cmd44
7 files changed, 110 insertions, 0 deletions
diff --git a/scripts/.gitignore b/scripts/.gitignore
new file mode 100644
index 0000000..2cb7368
--- /dev/null
+++ b/scripts/.gitignore
@@ -0,0 +1 @@
local_*
diff --git a/scripts/readme.md b/scripts/readme.md
new file mode 100644
index 0000000..9bb97ec
--- /dev/null
+++ b/scripts/readme.md
@@ -0,0 +1,24 @@
1# ldgallery scripts
2
3Some utilities.
4Prefix the filename of your custom script with "local_", they are git-ignored.
5
6## Build
7
8### win_build.cmd
9
10Build the compiler. See {../compiler/readme.md}
11
12### win_help.cmd
13
14Shows the compiler's command line help.
15
16### win_compile_example.cmd
17
18Compile the example gallery, for demonstration purposes. See {../example/readme.md}
19
20### win_generate_yaml_files.cmd
21
22Generates template YAML files for your gallery.
23Copy this CMD to your pictures folder.
24
diff --git a/scripts/win_build.cmd b/scripts/win_build.cmd
new file mode 100644
index 0000000..ed96211
--- /dev/null
+++ b/scripts/win_build.cmd
@@ -0,0 +1,5 @@
1@echo off
2cd ..\compiler\
3stack setup
4stack build
5pause \ No newline at end of file
diff --git a/scripts/win_compile_example.cmd b/scripts/win_compile_example.cmd
new file mode 100644
index 0000000..e89b302
--- /dev/null
+++ b/scripts/win_compile_example.cmd
@@ -0,0 +1,10 @@
1@echo off
2SET rebuild=--rebuild
3CHOICE /M "Rebuild all ('--rebuild' argument)?"
4IF ERRORLEVEL 2 SET rebuild=
5echo.
6
7@echo on
8cd ..\compiler\
9stack exec ldgallery-compiler-exe -- %rebuild% --clean-output -i=../example/ -o=../example/out/
10@pause
diff --git a/scripts/win_generate_yaml_files.cmd b/scripts/win_generate_yaml_files.cmd
new file mode 100644
index 0000000..edb7f91
--- /dev/null
+++ b/scripts/win_generate_yaml_files.cmd
@@ -0,0 +1,21 @@
1@echo off
2
3REM Copy this file to your picture directory to quickly generate the YAML templates
4REM ===============================================================================
5
6for %%f in (*.jpg,*.png,*.gif) do (
7 if exist "%%f.yaml" goto CONTINUE
8 @echo %%f
9 (
10 echo title: %%f
11 echo.
12 echo datetime:
13 echo.
14 echo description:
15 echo.
16 echo tags:
17 echo - not_tagged
18 ) >> "%%f.yaml"
19 :CONTINUE
20 rem
21)
diff --git a/scripts/win_help.cmd b/scripts/win_help.cmd
new file mode 100644
index 0000000..117205a
--- /dev/null
+++ b/scripts/win_help.cmd
@@ -0,0 +1,5 @@
1@echo off
2cd ..\compiler\
3stack exec ldgallery-compiler-exe -- --help
4@echo.
5@pause
diff --git a/scripts/win_start_vueui.cmd b/scripts/win_start_vueui.cmd
new file mode 100644
index 0000000..b79a7b7
--- /dev/null
+++ b/scripts/win_start_vueui.cmd
@@ -0,0 +1,44 @@
1@echo off
2set NODE_VERSION=12.14.0
3set VUECLI_VERSION=4.2.2
4cd ..\viewer\
5
6chcp 65001
7echo.
8echo === nvm install ===
9nvm install %NODE_VERSION%
10nvm list | find /i "%NODE_VERSION% (Currently"
11if errorlevel 1 (
12 echo.
13 echo === nvm use %NODE_VERSION% ===
14 nvm use %NODE_VERSION%
15
16 echo.
17 echo === npm install @vue/cli@%VUECLI_VERSION% ===
18 ping localhost -n 3 >NUL
19 cmd /c npm install -g @vue/cli@%VUECLI_VERSION%
20)
21echo.
22npm view -g @vue/cli version | find /i "%VUECLI_VERSION%"
23if errorlevel 1 (
24 echo ======================================================================
25 echo Warning: vue/cli doesn't match the requested version: %VUECLI_VERSION%
26 echo.
27 echo CTRL+C to quit and update, or press a key to ignore this warning...
28 echo ======================================================================
29 echo.
30 pause
31)
32echo.
33echo === npm install ===
34cmd /c npm install
35echo.
36echo === npm prune ===
37cmd /c npm prune
38echo.
39echo === npm dedupe ===
40cmd /c npm dedupe
41echo.
42echo === vue ui ===
43title Vue UI - server
44vue ui