Rename project from PersonalLibraryManager to bibliomane

This commit is contained in:
2026-03-04 15:58:49 +01:00
parent af44849eda
commit 6780a00e5f
65 changed files with 150 additions and 146 deletions

View File

@@ -6,7 +6,7 @@ import (
"os"
"strings"
"git.artlef.fr/PersonalLibraryManager/internal/jwtauth"
"git.artlef.fr/bibliomane/internal/jwtauth"
"github.com/alecthomas/kong"
kongtoml "github.com/alecthomas/kong-toml"
"github.com/pelletier/go-toml"
@@ -14,14 +14,14 @@ import (
type CLI struct {
NoConfigFile bool `short:"C" default:"false" help:"Disable config file creation."`
ConfigFilePath string `short:"c" default:"plm.toml" type:"path" help:"Config file path."`
ConfigFilePath string `short:"c" default:"bibliomane.toml" type:"path" help:"Config file path."`
DisableStoreJWTKeyInConfig bool `default:"false" help:"Do not store the generated key used for JWT when initializing configuration."`
ConfigFile Config `embed:"" prefix:""`
}
type Config struct {
Port string `toml:"port" short:"p" default:"8080" help:"Port to listen on for the server." comment:"Port to listen on for the server."`
DatabaseFilePath string `toml:"database-file-path" short:"d" default:"plm.db" type:"path" help:"Path to sqlite database file." comment:"Path to sqlite database file."`
DatabaseFilePath string `toml:"database-file-path" short:"d" default:"bibliomane.db" type:"path" help:"Path to sqlite database file." comment:"Path to sqlite database file."`
DemoDataPath string `toml:"demo-data-path" type:"path" help:"Path to the sql file to load for demo data." comment:"Path to the sql file to load for demo data."`
JWTKey string `toml:"jwt-key" help:"Key used to encrypt JWT." comment:"Key used to encrypt the generated JWT. Encoded in base64. If empty a random one will be generated on every restart."`
ImageFolderPath string `toml:"image-folder-path" short:"i" default:"img" type:"path" help:"Folder where uploaded files will be stored." comment:"Folder where uploaded files will be stored."`
@@ -47,7 +47,7 @@ func (u UserListAsStrings) Validate() error {
func defaultConfig() CLI {
c := Config{
Port: "8080",
DatabaseFilePath: "plm.db",
DatabaseFilePath: "bibliomane.db",
DemoDataPath: "",
JWTKey: "",
ImageFolderPath: "img",
@@ -58,7 +58,7 @@ func defaultConfig() CLI {
DemoUsername: "demo",
AddUser: []string{},
}
return CLI{NoConfigFile: false, ConfigFilePath: "plm.toml", DisableStoreJWTKeyInConfig: false, ConfigFile: c}
return CLI{NoConfigFile: false, ConfigFilePath: "bibliomane.toml", DisableStoreJWTKeyInConfig: false, ConfigFile: c}
}
func LoadConfig() Config {