Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustGetAppConfigPath ¶
func MustGetAppConfigPath() string
Returns the path to the app config file. Panics on failure.
func MustReadAppCredentials ¶
Reads the app credentials (ClientID and ClientSecret) from stdin
func MustWriteAppConfig ¶
func MustWriteAppConfig(c *AppConfiguration)
Write the app configuration file. Panics on failure.
Types ¶
type AppConfiguration ¶
type AppConfiguration struct { ClientID string `json:"clientId"` ClientSecret string `json:"clientSecret"` AuthToken *oauth2.Token `json:"authToken"` UserInfo photosutil.UserInfo `json:"userInfo"` }
Application configuration file structure
func ReadAppConfig ¶
func ReadAppConfig() *AppConfiguration
Reads the app configuration file. If the file is not found, returns an empty config
type Settings ¶
type Settings struct { // Directory name -> photos folder substitution CSV string; should // be formatted as old1,new1,old2,new2, ... where new1 replaces old1 etc NameSubstitutionTokens string // Whether to capitalize words in directory name when forming // folder names Capitalize bool // Whether to skip parsing folder year from the folder name; in this case, // file date will be used as the EXIF date. NoParseYear bool // Whether to skip (assume Yes) all confirmations) SkipConfirmation bool // Whether doing a 'dry run', ie not actually sending anything. DryRun bool // Whether to recurse into subdirectories Recurse bool // Maximum concurrency (number of simultaneous uploads) MaxConcurrency int // List of albums // TODO this may need to change Albums []*photos.Album }
func MustGetSettings ¶
func MustGetSettings() *Settings
Click to show internal directories.
Click to hide internal directories.