Started work on adding mod downloader

Read from mod-list.json in mod dir and download each mod in list.
This requires reading from factorio mod portal api, and extracting download url and calling it with username and api token.

new field in config.yml username and apitoken, is needed to download mod files from mod.factorio.com
This commit is contained in:
2026-04-30 12:06:49 -06:00
parent b2f485269b
commit 2548261d66
7 changed files with 151 additions and 7 deletions

View File

@@ -9,8 +9,6 @@ import (
"gopkg.in/yaml.v3"
)
const fmConfig = "config.yml"
type GoConfig struct {
Server struct { // server specific settings
ServDir string `yaml:"serverFolder"`
@@ -24,6 +22,8 @@ type GoConfig struct {
BackupDir string `yaml:"backupDir"`
UseScreen bool `yaml:"screen"`
ScreenName string `yaml:"screenName"`
UserName string `yaml:"username"`
ApiToken string `yaml:"apitoken"`
} `yaml:"factoryman"`
}