vector to work with

This commit is contained in:
dexta.de
2026-07-27 22:21:18 +02:00
parent 0f8c45963c
commit ffe0c7d689
4 changed files with 11 additions and 6 deletions
+2 -2
View File
@@ -11,10 +11,10 @@ RUN groupadd --gid 1000 flammenderberg && \
WORKDIR /weltraum
RUN mkdir stories && mkdir export
COPY ./cyoa-engine ./
ADD ./templates templates
ADD ./templates/template.html ./
RUN chown -R hexenmeister:flammenderberg /weltraum
EXPOSE 3344
CMD ["/weltraum/cyoa-engine", "dir ./stories/", "out ./export/", "temp ./templates/", "serve true", "port 3344"]
CMD ["/weltraum/cyoa-engine", "dir ./stories/", "serve", "port 3344"]
+4
View File
@@ -14,3 +14,7 @@ go build -o cyoa-engine main.go
# baue das docker image
docker build -t asciidoctor-echo -f Dockerfile.echobox .
# run with test volumes
docker run --rm -v "$(pwd)/stories:/weltraum/stories" -v "$(pwd)/export:/weltraum/export" -p "6699:3344" asciidoctor-echo ./cyoa-engine -dir ./stories/ -serve -port 3344
+1
View File
@@ -238,6 +238,7 @@ func getTemplateFuncMap() template.FuncMap {
}
func generateHTMLFile(g *StoryGraph, outPath string, tmplPath string) error {
fmt.Println("tmp path "+tmplPath)
tmpl, err := template.New(filepath.Base(tmplPath)).Funcs(getTemplateFuncMap()).ParseFiles(tmplPath)
if err != nil { return fmt.Errorf("Template-Fehler: %v", err) }
f, err := os.Create(outPath)
+1 -1
View File
@@ -122,7 +122,7 @@
try {
const rawData = document.getElementById('story-data').textContent.trim();
if (!rawData.startsWith('{{')) {
if (!rawData.startsWith("\{\{")) {
storyData = JSON.parse(rawData);
} else {
console.warn("[WARNUNG] Go-Engine nicht verbunden. Lade Offline-Preview.");