geeqie --remote --lua:
Some knowledge of the Lua programming language is required.
Use of Lua within Geeqie requires Lua to be installed. If you are compiling from sources, Lua functionality will be available if the development files dependencies are met.
If you are using a pre-compiled distribution, availability depends on the package maintainer.
Geeqie Lua built-in functions
The following functions are built in to Geeqie:
|Image:get_path()||The full path of the file, including filename and extension|
|Image:get_name()||The full filename including extension|
|Image:get_extension||The file extension including preceding dot|
|Image:get_date()||The file date in Unix timestamp format.|
|Image:get_size()||The file size in bytes|
|Image:get_marks()||An integer representing the marks set for the file|
|Image:get_exif()||A data structure containing the entire exif data|
|<exif_str>:get_datum("<exif_tag>")||A single exif tag extracted from a structure output by the above command|
The keyword "Image" refers to the file currently being displayed by Geeqie.
The following example, which outputs the jpeg comment of a file, demonstrates the use of a built-in function and how to call a system command from a Lua script:
path=Image:get_path() commentfile=io.popen("exiv2 -p c \"" .. path .. "\"" ) comment = commentfile:read("*a") commentfile:close() return (comment)
Note that it is necessary to have escape characters surrounding path and filenames.
The following example demonstrates how to extract exif data from a file:
--Retrieve the DateTimeDigitized exif tag exif_structure = Image:get_exif(); DateTimeDigitized = exif_structure:get_datum("Exif.Photo.DateTimeDigitized"); return (os.date(DateTimeDigitized))
Lua is a powerful programming language. Errors in script files, besides having undesirable side-effects, may cause Geeqie to crash.