mirror of
https://github.com/Theodor-Springmann-Stiftung/lenz-web.git
synced 2025-10-29 01:05:32 +00:00
BUGFIX: read XML data
This commit is contained in:
33
lenz.go
33
lenz.go
@@ -1,5 +1,36 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/Theodor-Springmann-Stiftung/lenz-web/config"
|
||||
gitprovider "github.com/Theodor-Springmann-Stiftung/lenz-web/git"
|
||||
xmlparsing "github.com/Theodor-Springmann-Stiftung/lenz-web/xml"
|
||||
"github.com/Theodor-Springmann-Stiftung/lenz-web/xmlmodels"
|
||||
)
|
||||
|
||||
func main() {
|
||||
println("Hello, World!")
|
||||
cfg, err := config.Get()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if cfg.Debug {
|
||||
slog.SetLogLoggerLevel(slog.LevelDebug)
|
||||
}
|
||||
|
||||
dir := filepath.Join(cfg.BaseDIR, cfg.GITPath)
|
||||
|
||||
gp, err := gitprovider.NewGitProvider(cfg.GitURL, dir, cfg.GitBranch)
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
lib := xmlmodels.NewLibrary()
|
||||
lib.Parse(xmlparsing.Commit, dir, gp.Commit)
|
||||
|
||||
fmt.Println("Library: ", lib)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user