diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2021-11-07 15:52:44 +0100 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2021-12-18 02:38:50 +0100 |
| commit | 0702d13263bf501c1db074ce1544e60b95161210 (patch) | |
| tree | ebca76946cead0ffcc742a64c15dd6f5e79958fa /playground | |
| parent | 56a75fcb8f5a9e4c05ccec8eb4a3345a115da441 (diff) | |
major rewritev0.3.0
Diffstat (limited to 'playground')
| -rw-r--r-- | playground/.gitignore (renamed from playground/calculate/.gitignore) | 0 | ||||
| -rwxr-xr-x | playground/build.sh | 6 | ||||
| -rwxr-xr-x | playground/calculate.sh | 8 | ||||
| -rwxr-xr-x | playground/calculate/run.sh | 10 | ||||
| -rw-r--r-- | playground/env.sh | 7 | ||||
| -rwxr-xr-x | playground/generate_output.sh | 9 | ||||
| -rw-r--r-- | playground/params.yaml (renamed from playground/calculate/params.yaml) | 0 | ||||
| -rwxr-xr-x | playground/server.sh | 6 | ||||
| -rwxr-xr-x | playground/server/run.sh | 7 |
9 files changed, 36 insertions, 17 deletions
diff --git a/playground/calculate/.gitignore b/playground/.gitignore index 70dafff..70dafff 100644 --- a/playground/calculate/.gitignore +++ b/playground/.gitignore diff --git a/playground/build.sh b/playground/build.sh new file mode 100755 index 0000000..e927d5f --- /dev/null +++ b/playground/build.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +. $(dirname -- "$0")/env.sh + +cd $ROOT_PATH +exec $PYTHON -m doit diff --git a/playground/calculate.sh b/playground/calculate.sh new file mode 100755 index 0000000..2db0ada --- /dev/null +++ b/playground/calculate.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +. $(dirname -- "$0")/env.sh + +exec $PYTHON -m opcut calculate \ + --params $RUN_PATH/params.yaml \ + --result $RUN_PATH/result.yaml \ + "$@" diff --git a/playground/calculate/run.sh b/playground/calculate/run.sh deleted file mode 100755 index b1670e3..0000000 --- a/playground/calculate/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -PYTHONPATH=../../src_py python -m opcut \ - --json-schemas-path ../../schemas_json \ - --ui-path ../../build/js \ - calculate \ - --params params.yaml \ - --result result.yaml \ - --output output.pdf \ - $* diff --git a/playground/env.sh b/playground/env.sh new file mode 100644 index 0000000..b39dc8b --- /dev/null +++ b/playground/env.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +PYTHON=${PYTHON:-python} +RUN_PATH=$(cd $(dirname -- "$0") && pwd) +ROOT_PATH=$RUN_PATH/.. + +export PYTHONPATH=$ROOT_PATH/src_py diff --git a/playground/generate_output.sh b/playground/generate_output.sh new file mode 100755 index 0000000..1eaae94 --- /dev/null +++ b/playground/generate_output.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +. $(dirname -- "$0")/env.sh + +exec $PYTHON -m opcut generate_output \ + --output-type pdf \ + --result $RUN_PATH/result.yaml \ + --output $RUN_PATH/output.pdf \ + "$@" diff --git a/playground/calculate/params.yaml b/playground/params.yaml index 605acec..605acec 100644 --- a/playground/calculate/params.yaml +++ b/playground/params.yaml diff --git a/playground/server.sh b/playground/server.sh new file mode 100755 index 0000000..388bc25 --- /dev/null +++ b/playground/server.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +. $(dirname -- "$0")/env.sh + +exec $PYTHON -m opcut server \ + "$@" diff --git a/playground/server/run.sh b/playground/server/run.sh deleted file mode 100755 index 887442e..0000000 --- a/playground/server/run.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -PYTHONPATH=../../src_py python -m opcut \ - --json-schemas-path ../../schemas_json \ - --ui-path ../../build/js \ - server \ - $* |
