Project

General

Profile

Bug #10554

User manual, lua chapter

Added by Michel Leblond almost 4 years ago. Updated almost 4 years ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
Usermanual
Start date:
06/27/2015
Due date:
% Done:

100%

Affected Version:
git development version
System:
Debian
bitness:
64-bit
hardware architecture:
amd64/x86

Description

I think there is a typo in the following script in the user manual. INSTALATION must be INSTALLATION.

--[[ SCP STORAGE a simple storage to export images via scp AUTHOR Jérémy Rosen () INSTALATION * copy this file in $CONFIGDIR/lua/ where CONFIGDIR is your darktable configuration directory * add the following line in the file $CONFIGDIR/luarc require \"scp-storage\" USAGE * select \"Export via SCP\" in the storage selection menu * set the target directory * export your images LICENSE GPLv2 ]] darktable = require \"darktable\" local scp_path = dt.new_widget(\"entry\"){ tooltip =\"Complete path to copy to. Can include user and hostname\", text = \"\", reset_callback = function(self) self.text = \"\" end } darktable.register_storage(\"scp_export\",\"Export via scp\", function( storage, image, format, filename, number, total, high_quality, extra_data) if coroutine.yield(\"RUN_COMMAND\",\"scp \"..filename..\" \".. scp_path.text ) then darktable.print_error(\"scp failed for \"..tostring(image)) end end, nil, --finalize nil, --supported nil, --initialize darktable.new_widget(\"box\") { orientation =\"horizontal\", darktable.new_widget(\"label\"){label = \"target SCP PATH \"}, scp_path, })

The last part of the following message must be "It creates a container widget with two sub-widgets, a label and a text entry field." It is'nt ?

There is a nice syntactic trick to make UI element code easier to read and write. You can call these objects as functions with a table of key values as an argument. This allows the following example to work. It creats a container widget with two sub-widgets. A label and a text entry field.

History

#1 Updated by Jérémy Rosen almost 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Fixed

thx, fixed

Also available in: Atom PDF