Compare commits

...

4 Commits

8 changed files with 173 additions and 13 deletions

15
.gitignore vendored
View File

@ -24,20 +24,9 @@
!/scripts/*.sh
!/code
!/code/**/
!/code/python/**/*.py
!/code/golang/**/*.go
!/code/golang/go.mod
!/code/*/assets/VERSION
!/code/*/assets/LOGO
!/code/*/assets/config.yml
!/code/*/README.md
!/code/*/requirements
!/code/python
!/code/golang
!/code/config.yml
## nicht synchronisieren:
/code/golang/go.sum
/code/python/build
/code/python/build/**
!/dist
!/dist/VERSION

32
code/golang/.gitignore vendored Normal file
View File

@ -0,0 +1,32 @@
*
!/.gitignore
################################################################
# MAIN FOLDER
################################################################
!/Makefile
!/README.md
!/requirements
################################################################
# PROJECT FILES
################################################################
!/assets
!/assets/VERSION
!/assets/LOGO
!/assets/config.yml
!/internal
!/pkg
!/**/*.go
!/go.mod
!/go.sum
################################################################
# ARTEFACTS
################################################################
/**/.DS_Store
/**/__archive__*

21
code/golang/Makefile Normal file
View File

@ -0,0 +1,21 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# LOCAL ARGUMENTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PATH_TO_ARTEFACT:=../../dist/ads
PATH_TO_CONFIG:=../config.yml
COLOUR:=false
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# TARGETS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setup:
go mod download
build:
go build -o ${PATH_TO_ARTEFACT} main.go
run: # non-interactive mode mit config-datei
${PATH_TO_ARTEFACT} run --debug --colour COLOUR --config "${PATH_TO_CONFIG}"
run-it: # interactive mode
${PATH_TO_ARTEFACT} run --it --debug --colour COLOUR
# Do everything:
all: setup build run
all-it: setup build run-it

View File

@ -22,6 +22,25 @@ bitte nur auf eigener Gewähr diesen Code benutzen._
Alle u. s. Befehle sollen in einer Bash-Konsole von diesem Ordner aus ausgeführt werden.
## Einrichten mittels **Makefile** ##
Führe jeweils
```bash
make setup
make build
make run
# oder für interaktiven Modus
make run-it
```
aus, um Packages zu installieren
bzw. den Code zu kompilieren
bzw. den Code auszuführen.
Siehe [`Makefile`](./Makefile) für Details zu den Vorgängen.
Wer Makefile benutzt kann die u. s. Anweisungen ignorieren.
## Setup/Kompilieren ##

21
code/golang/go.sum Normal file
View File

@ -0,0 +1,21 @@
github.com/akamensky/argparse v1.3.1 h1:kP6+OyvR0fuBH6UhbE6yh/nskrDEIQgEA1SUXDPjx4g=
github.com/akamensky/argparse v1.3.1/go.mod h1:S5kwC7IuDcEr5VeXtGPRVZ5o/FdhcMlQz4IZQuw64xA=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY=
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As=
github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

38
code/python/.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
*
!/.gitignore
################################################################
# MAIN FOLDER
################################################################
!/Makefile
!/README.md
!/requirements
################################################################
# PROJECT FILES
################################################################
!/assets
!/assets/VERSION
!/assets/LOGO
!/assets/config.yml
!/src
!/src/**/
!/src/**/*.py
!/test
!/test/**/
!/test/**/*.py
## nicht synchronisieren:
!/build
################################################################
# ARTEFACTS
################################################################
/**/__pycache__
/**/.DS_Store
/**/__archive__*

23
code/python/Makefile Normal file
View File

@ -0,0 +1,23 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# LOCAL ARGUMENTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PATH_TO_CONFIG:=../config.yml
COLOUR:=false
ifeq ($(OS),Windows_NT)
PYTHON:="py -3"
else
PYTHON:="python3"
endif
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# TARGETS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setup:
${PYTHON} -m pip install -r requirements;
run: # non-interactive mode mit config-datei
${PYTHON} src/main.py run --debug --colour COLOUR --config "${PATH_TO_CONFIG}"
run-it: # interactive mode
${PYTHON} src/main.py run --it --debug --colour COLOUR
# Do everything:
all: setup run
all-it: setup run-it

View File

@ -21,6 +21,23 @@ bitte nur auf eigener Gewähr diesen Code benutzen._
- Python version 3.x.x (idealerweise zumindest 3.9.5)
## Einrichten mittels **Makefile** ##
Führe jeweils
```bash
make setup
make run
# oder für interaktiven Modus
make run-it
```
aus, um Packages zu installieren
bzw. den Code auszuführen.
Siehe [`Makefile`](./Makefile) für Details zu den Vorgängen.
Wer Makefile benutzt kann die u. s. Anweisungen ignorieren.
## Setup ##
Requirements (Packages) einmalig mittels