30 lines
		
	
	
		
			987 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			987 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package main
 | 
						|
 | 
						|
import (
 | 
						|
	"os"
 | 
						|
 | 
						|
	steamimmich "git.kapelle.org/niklas/steam-immich/internal"
 | 
						|
	"github.com/alexflint/go-arg"
 | 
						|
)
 | 
						|
 | 
						|
type args struct {
 | 
						|
	BaseURL     string `arg:"--base-url,required" placeholder:"BASE_URL" help:"Base URL of the Immich instance e.g.: https://demo.immich.app"`
 | 
						|
	APIKey      string `arg:"--api-key,required" placeholder:"API_KEY" help:"API Key. Needs asset.upload, asset.update, albumAsset.create"`
 | 
						|
	UserdataDir string `arg:"--steam-userdata-dir" placeholder:"USERDATA_DIR" help:"Steam userdata directory. If not set, search automaticly."`
 | 
						|
	DeviceID    string `arg:"--device-id" default:"steam-immich" help:"Device ID of the uploads"`
 | 
						|
	Album       string `arg:"--album" help:"UUID of a album to upload to"`
 | 
						|
}
 | 
						|
 | 
						|
func main() {
 | 
						|
	var args args
 | 
						|
	arg.MustParse(&args)
 | 
						|
 | 
						|
	steamimmich.Run(steamimmich.Config{
 | 
						|
		APIKey:      args.APIKey,
 | 
						|
		BaseURL:     args.BaseURL,
 | 
						|
		UserdataDir: os.ExpandEnv(args.UserdataDir),
 | 
						|
		DeiveID:     args.DeviceID,
 | 
						|
		Album:       args.Album,
 | 
						|
	})
 | 
						|
}
 |