Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: pacoorozco <[email protected]>
  • Loading branch information
pacoorozco committed Oct 23, 2023
1 parent e97bfa0 commit 4462341
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
12 changes: 12 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ drwx------ uploaded_files

> **ATTENTION**: If you don't follow the process above, all the information regarding the previous version will not be kept.
### Jobs definition
The `CreateAlbums` configuration option **has been deprecated** in favor of `Album`.

The `Album` configuration option set the album's name where the objects will be uploaded.

If the `Album` option is not set, the objects will not be associated with an album in Google Photos.

These are the valid values: `name:`, and `auto:`.

- `name:` Followed by the album name in Google Photos (album names are not unique, so the first to match will be selected). ex. `Album: name:fooBar`
- `auto:` Followed either `folderPath` or `folderName` will use an autogenerated album name based on the object's folder path or object's folder name. ex. `Album: auto:folderPath`

## Upgrading To 3.x from 2.x

### Configuration settings
Expand Down
19 changes: 11 additions & 8 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Example configuration file:
[
{
SourceFolder: YOUR_FOLDER_PATH
CreateAlbums: Off
Album: "auto:folderName"
DeleteAfterUpload: false
IncludePatterns: [ "**/*.jpg", "**/*.png" ]
ExcludePatterns: [ "**/ScreenShot*" ]
Expand Down Expand Up @@ -81,22 +81,25 @@ List of folders to upload and upload options for each folder.
The folder to upload from. Must be an absolute path. Can expand the home folder tilde shorthand `~`.
> The application will follow any symlink it finds, it does not terminate if there are any non-terminating loops in the file structure.
### CreateAlbums
### Album
It controls how uploaded files will be organized into albums in Google Photos.

There are three options:
* `Off` will not create any album.
* `folderName` will use the name of the folder (within `SourceFolder`), where the item is uploaded from, to set the album name.
* `folderPath` will use the full path of the folder (relative to `SourceFolder`), where the item is uploaded from, to set the album name.
There are several options:
* `name:` followed by an album's name, will upload objects to an album with the specified name. *ex. `Album: name:fooBar`*
* `auto:folderName` will use the name of the folder (within `SourceFolder`), where the item is uploaded from, to set the album name.
* `auto:folderPath` will use the full path of the folder (relative to `SourceFolder`), where the item is uploaded from, to set the album name.

```
# Given SouceFolder: /foo
# and file: /foo/bar/xyz/file.jpg
CreateAlbums: folderName
Album: name:myAlbum
# album name would be: myAlbum
Album: auto:folderName
# album name would be: xyz
CreateAlbums: folderPath
Album: auto:folderPath
# album name would be: bar_xyz
```

Expand Down
2 changes: 1 addition & 1 deletion internal/config/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type FolderUploadJob struct {
// Album is the album where objects will be uploaded.
// If the Album option is not set, the objects will not be associated with an album in Google Photos.
//
// These are the valid values: "name:", "id:" and "auto:".
// These are the valid values: "name:" and "auto:".
// "name:" : Followed by the album name in Google Photos (album names are not unique, so the first to match
// will be selected)
// "auto:" : Followed either "folderPath" or "folderName" will use an autogenerated album name based on the
Expand Down

0 comments on commit 4462341

Please sign in to comment.