Skip to content

Commit aea24db

Browse files
committed
Fixed #13 - new option to allow different metadata to be used for title and description
1 parent 79a30c8 commit aea24db

9 files changed

Lines changed: 633 additions & 244 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# Changelog
2+
## [20260101.20] - 2026-01-01
3+
### Fixed
4+
Fixed #13 - new option to allow different metadata to be used for title and description
5+
6+
### Added
7+
New option in Lightroom Publishing Manager panel - Metadata Settings. Allows tokenised strings to be used for image Title and Description as sent to Piwigo - tokens idenfified by {{token}} will be subtituted for image specific values on export. Supports all metadata documented in photo:getFormattedMetadata and photo:getRawMetadata from the Lightroom Classic SDK. See Wiki for more information.
8+
29
## [20251229.19] - 2025-12-29
310
Fixed #22 - Error 1003 - Keyword already exisits. Required normalisation of keywords - all lower case, remove accents etc - for comparison between LrC and Piwigo keyword names as Piwigo effectively does accent-folding + case-folding and Lrc retains original.
411

512
Fixed #16 (after re-opening) - New option to check local collection / set structure against existing Piwigo album structure - missing Piwigo albums will be created and incorrect links between collections / sets will be updated. Mis-named special collections will be renamed.
613

714
## [20251227.18] - 2025-12-27
8-
### ### Fixed
15+
### Fixed
916
Fixed #16 - When importing a smart collection album a publishing error occurs - Running Import Smart Collection Settings created a collection within the Publish Service but a corresponding Piwigo album wasn't. This fix checks for missing albums during the Publish process and creates them if needed
1017

1118
## [20251227.17] - 2025-12-27

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ A Lightroom Classic plugin which publishes images to a Piwigo host via the Piwig
1414
* Metadata and keywords are exported directly to Piwigo regardless of exif/iptc settings - as part of the publish process along with the photo, or separately via a menu on the Library -> Plug-in Extras menu - which sends the metadata without re-sending the photo.
1515
* the following fields are set :
1616
* author from Lrc Creator,
17-
* name from LrC Title,
18-
* comment from LrC Caption,
19-
* date_creation from LrC Date Time Original,
17+
* date_creation from LrC Date Time Original
18+
* name (title) - default from LrC Title,
19+
* comment (description) - default from LrC Caption,
20+
* tokenised strings may be used instead for image name (title) and comment (description) - tokens idenfified by {{token}} will be substituted for image specific values on export. All metadata documented in photo:getFormattedMetadata (see https://archive.stecman.co.nz/files/docs/lightroom-sdk/API-Reference/modules/LrPhoto.html#photo:getFormattedMetadata) and photo:getRawMetadata (see https://archive.stecman.co.nz/files/docs/lightroom-sdk/API-Reference/modules/LrPhoto.html#photo:getRawMetadata) from the Lightroom Classic SDK are supported - for example: title, caption, headline, altTextAccessibility, extDescrAccessibility, copyName are supported.
2021
* Keywords are handled as follows:
2122
* The Include on Export attribute set on individual keywords is respected.
2223
* Flags for Include Full Keyword Hierarchy and Include Keyword Synonyms can be set in the LrC Publishing Manager (the equivalent flags set in the LrC Keyword Tag editor are not visible to plugins so can't be used)
@@ -39,15 +40,14 @@ A Lightroom Classic plugin which publishes images to a Piwigo host via the Piwig
3940

4041
* Metadata customisation - select which LrC metedata fields are used for Piwigo photo Title and Description fields.
4142
* Per album custom settings - allowing image sizes and other settings to be set at album level, overriding the global Publish Manager settings
42-
* Metadata Check - check metadata on Piwigo matches Lrc (Title, Caption, GPS, Creator)
43+
* Localisation for different languages
4344

4445
## The following functionality is planned:
4546

4647
* Support for the X-PIWIGO-API header instead of Authorization when sending API keys - v16.1 and above
4748
* Import collection/set/image structure from another publish service
4849
* if remoteIds / URLs are present these will be copied. Useful to copy another publish service where a Piwigo host is the target without having to clear the existing Piwigo albums prior to re-publishing.
49-
* Localisation for different languages
50-
50+
* Metadata Check - check metadata on Piwigo matches Lrc (Title, Caption, GPS, Creator)
5151

5252
## The following functionality is not currently planned:
5353
* Download images from Piwigo to local drive

piwigoPublish.lrplugin/Info.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ return {
5959

6060
LrPluginInfoProvider = 'PluginInfo.lua',
6161

62-
VERSION = { major=20251229, minor=19, revision=0 },
62+
VERSION = { major=20260101, minor=20, revision=0 },
6363
}

piwigoPublish.lrplugin/Init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ end
7272

7373
_G.PiwigoBusy = false
7474
_G.iconPath = _PLUGIN:resourceId("icons/icon_med.png")
75-
_G.pluginVersion = "2025129.19"
75+
_G.pluginVersion = "20260101.20"
7676
--_G.LocStrings = utils.loadStrings()
7777

piwigoPublish.lrplugin/PWSendMetadata.lua

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,18 @@ local function SendMetadata()
9797
local metaData = {}
9898

9999
-- allow custom metadata selection here
100-
metaData.Creator = lrPhoto:getFormattedMetadata( "creator" ) or ""
101-
metaData.Title = lrPhoto:getFormattedMetadata("title") or ""
102-
metaData.Caption = lrPhoto:getFormattedMetadata("caption") or ""
100+
if publishSettings.mdTitle and publishSettings.mdTitle ~= "" then
101+
metaData.Title = utils.setCustomMetadata(lrPhoto, publishSettings.mdTitle)
102+
else
103+
metaData.Title = lrPhoto:getFormattedMetadata("title") or ""
104+
end
105+
if publishSettings.mdDescription and publishSettings.mdDescription ~= "" then
106+
metaData.Caption = utils.setCustomMetadata(lrPhoto, publishSettings.mdDescription)
107+
else
108+
metaData.Caption = lrPhoto:getFormattedMetadata("caption") or ""
109+
end
103110

111+
metaData.Creator = lrPhoto:getFormattedMetadata( "creator" ) or ""
104112

105113
metaData.fileName = lrPhoto:getFormattedMetadata("fileName") or ""
106114
local lrTime = lrPhoto:getRawMetadata("dateTimeOriginal")

0 commit comments

Comments
 (0)