Skip to content
じゅん edited this page Dec 3, 2022 · 2 revisions

Welcome to the SQLTable.lrplugin wiki!

Prerequisite

Things to do before doing what is written on this page.

  • Obtain Adobe Lightroom Classic SDK
  • Use any of text editor.(i.e. notepad vscode ...)
  • Little bit of Lua knowledge.

Customizing metadata for export

To customize what metadata for export,Edit 'SQLTable.lua' script.

local metadefs = { dateTime = {type = 'datetime', source = FORMATTED},
caption = {type = 'nvarchar(64)', source = FORMATTED},
folderName = {type = 'nvarchar(64)', source = FORMATTED},
fileName = {type = 'nvarchar(64)', source = FORMATTED},
cameraModel = {type = 'nvarchar(64)', source = FORMATTED},
lens = {type = 'nvarchar(64)', source = FORMATTED},
rating = {type = 'decimal(1)', source = RAW},

matadef array is definition of metadata for export.
i.e. 'dateTime' corresponds for 'dateTime' value in 'photo:getFormattedMetadata()' in Lr SDK document.
i.e. 'rating' corresponds for 'rating' value in 'photo:getRawMetadata()'
'type' is column type to store in SQL database.
'source' is specified where to get metadata from. 'FORMATTED' means from 'photo:getFormattedMetadata()'
'RAW' means from 'photo:getRawMetadata()'

Clone this wiki locally