Skip to main content

Synchronize Cli

List of Starsky Projects

Synchronize Cli Options

Starsky Sync Indexer:

With this command line tool it possible to manual sync the filesystem with the database, update one file in the database. The goal of this wrapper is to get command line access to the photo index database.

Before you start

When you start this application at first please update the appsettings.json

{
"App": {
"ThumbnailTempFolder": "Y:\\data\\photodirectory\\temp",
"StorageFolder": "Y:\\data\\photodirectory\\storage",
"DatabaseType": "mysql",
"DatabaseConnection": "Server=mysqlserver.nl;database=dbname;uid=username;pwd=password;",
"ExifToolPath": "C:\\exiftool.exe",
"Structure": "/yyyy/MM/yyyy_MM_dd*/yyyyMMdd_HHmmss_{filenamebase}.ext",
"ReadOnlyFolders": ["/2015","/2018"],
"AddMemoryCache": "true"
}
}

TIP: When using a boolean in the json add quotes. Booleans without quotes are ignored. So use "true" instead of true

TIP: For windows use double escape backslashes to avoid crashes

Appsettings Notes

  1. The Structure-setting is used by the StarskyImporterCli and the /import endpoint. This always uses slash as directory marker.
  2. The settings: ExifToolPath, ThumbnailTempFolder and StorageFolder uses the system path. When using Windows please escape the backslash, otherwise the application will crash.
  3. The AddMemoryCache setting is ignored in the console/cli applications

To the help dialog:

./starskysynccli --help

The Sync --Help window:

Starksy Sync Cli ~ Help:
--help or -h == help (this window)
--path or -p == parameter: (string) ; 'full path', only child items of the database folder are supported,search and replace first part of the filename, '/', use '-p' for current directory
--subpath or -s == parameter: (string) ; relative path in the database
--subpathrelative or -g == Overwrite subpath to use relative days to select a folder, use for example '1' to select yesterday. (structure is required)
-p, -s, -g == you need to select one of those tags
--index or -i == parameter: (bool) ; enable indexing, default true
--verbose or -v == verbose, more detailed info
--databasetype or -d == Overwrite EnvironmentVariable for DatabaseType
--basepath or -b == Overwrite EnvironmentVariable for StorageFolder
--connection or -c == Overwrite EnvironmentVariable for DatabaseConnection
--thumbnailtempfolder or -f == Overwrite EnvironmentVariable for ThumbnailTempFolder
--exiftoolpath or -e == Overwrite EnvironmentVariable for ExifToolPath
--verbose or -v == verbose, more detailed info
use -v -help to show settings: