updated readme and default config
This commit is contained in:
parent
f71fcefc1a
commit
9beadfe1f8
64
README.md
64
README.md
@ -8,15 +8,19 @@ and uploads all images to the albums.
|
|||||||
Currently the following features are supported
|
Currently the following features are supported
|
||||||
|
|
||||||
- Creating directory structure as album hierarchy in Piwigo
|
- Creating directory structure as album hierarchy in Piwigo
|
||||||
- Check if an image needs to be uploaded (only md5sum version currently supported)
|
- Check if an image needs to be uploaded (only md5sum variant currently supported)
|
||||||
- Upload image and assign it to the album based on the directory structure
|
- Upload image and assign it to the album based on the directory structure
|
||||||
|
|
||||||
Planned:
|
|
||||||
|
|
||||||
- Upload updated images that changed locally
|
- Upload updated images that changed locally
|
||||||
- Remove images no longer present (configurable)
|
- Local metadata storage using sqlite to make change detection easier
|
||||||
|
- Rebuild the local metadata database without uploading any pictures. Though, The categories get created!
|
||||||
|
|
||||||
|
There are some features planned but not ready yet:
|
||||||
|
|
||||||
|
- Optimize performance on initial matadata build up.
|
||||||
|
- Upload more than one file at a time
|
||||||
|
- Fully support files within multiple albums
|
||||||
- Specify more than one root path to gather images on the local system
|
- Specify more than one root path to gather images on the local system
|
||||||
- Local metadata storage (sqlite or similar) to make change detection easier
|
- Remove images no longer present (configurable)
|
||||||
|
|
||||||
|
|
||||||
## Build and run the application
|
## Build and run the application
|
||||||
@ -34,14 +38,54 @@ Get all dependencies first.
|
|||||||
go get ./...
|
go get ./...
|
||||||
```
|
```
|
||||||
|
|
||||||
Build your main executable by using the following command. By default it gets the name main.go but can be renamed to your
|
Build the main executable by using the following command. By default it gets the name PiwigoDirectoryUploader.go but
|
||||||
favorite application name.
|
can be renamed to your favorite application name.
|
||||||
|
|
||||||
```
|
```
|
||||||
go build cmd/PiwigoDirectoryUploader/PiwigoDirectoryUploader.go
|
go build cmd/PiwigoDirectoryUploader/PiwigoDirectoryUploader.go
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configure
|
### Configuration
|
||||||
|
|
||||||
|
#### Command line
|
||||||
|
|
||||||
|
You get the following help information to the command line by using:
|
||||||
|
|
||||||
|
```
|
||||||
|
./PiwigoDirectoryUploader -help
|
||||||
|
```
|
||||||
|
|
||||||
|
The following options are supported to run the application from the command line.
|
||||||
|
|
||||||
|
```
|
||||||
|
Usage of ./PiwigoDirectoryUploader:
|
||||||
|
-allowMissingConfig
|
||||||
|
Don't terminate the app if the ini file cannot be read.
|
||||||
|
-allowUnknownFlags
|
||||||
|
Don't terminate the app if ini file contains unknown flags.
|
||||||
|
-config string
|
||||||
|
Path to ini config for using in go flags. May be relative to the current executable path.
|
||||||
|
-configUpdateInterval duration
|
||||||
|
Update interval for re-reading config file set via -config flag. Zero disables config file re-reading.
|
||||||
|
-dumpflags
|
||||||
|
Dumps values for all flags defined in the app into stdout in ini-compatible syntax and terminates the app.
|
||||||
|
-imagesRootPath string
|
||||||
|
This is the images root path that should be mirrored to piwigo.
|
||||||
|
-logLevel string
|
||||||
|
The minimum log level required to write out a log message. (panic,fatal,error,warn,info,debug,trace) (default "info")
|
||||||
|
-noUpload
|
||||||
|
If set to true, the metadata gets prepared but the upload is not called and the application is exited with code 90
|
||||||
|
-piwigoPassword string
|
||||||
|
This is password to the given username.
|
||||||
|
-piwigoUrl string
|
||||||
|
The root url without tailing slash to your piwigo installation.
|
||||||
|
-piwigoUser string
|
||||||
|
The username to use during sync.
|
||||||
|
-sqliteDb string
|
||||||
|
The connection string to the sql lite database file. (default "./localstate.db")
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Configuration file
|
||||||
|
|
||||||
Next you need to prepare at least one configuration file.
|
Next you need to prepare at least one configuration file.
|
||||||
You may create more than one configuration file if you have multiple Piwigo installations.
|
You may create more than one configuration file if you have multiple Piwigo installations.
|
||||||
@ -51,7 +95,7 @@ cp ./configs/defaultConfig.ini ./localConfig.ini
|
|||||||
nano ./localConfig.ini
|
nano ./localConfig.ini
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run
|
### Run the uploader
|
||||||
|
|
||||||
Finally you may run the application using the following example command.
|
Finally you may run the application using the following example command.
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ imagesRootPath = # This is the images root path that should be mirrored to piw
|
|||||||
logLevel = info # The minimum log level required to write out a log message. (panic,fatal,error,warn,info,debug,trace)
|
logLevel = info # The minimum log level required to write out a log message. (panic,fatal,error,warn,info,debug,trace)
|
||||||
noUpload = false # If set to true, the metadata gets prepared but the upload is not called and the application is exited with code 90
|
noUpload = false # If set to true, the metadata gets prepared but the upload is not called and the application is exited with code 90
|
||||||
piwigoPassword = # This is password to the given username.
|
piwigoPassword = # This is password to the given username.
|
||||||
piwigoUploadChunkSizeInKB = 512 # The chunksize used to upload an image to piwigo.
|
|
||||||
piwigoUrl = # The root url without tailing slash to your piwigo installation.
|
piwigoUrl = # The root url without tailing slash to your piwigo installation.
|
||||||
piwigoUser = # The username to use during sync.
|
piwigoUser = # The username to use during sync.
|
||||||
sqliteDb = # The connection string to the sql lite database file.
|
sqliteDb = ./localstate.db # The connection string to the sql lite database file.
|
||||||
|
Loading…
Reference in New Issue
Block a user