Mercurial > hg > forks > geeqie
annotate web/help/GuideReferenceLua.html @ 2835:bb44bd76f857
Simplify OSD settings in Preferences
Move Overlay Screen Display settings in Preferences from the Windows tab
to its own tab.
Allow preformatted tags to be set by button click or drag-and-drop.
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Tue, 02 Oct 2018 13:01:06 +0100 |
parents | 54ae25ba376b |
children |
rev | line source |
---|---|
2579 | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
2 <html> | |
3 <head> | |
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
5 <title>Lua Extensions</title> | |
6 <link rel="previous" href="GuideReferenceMetadata.html" title="Metadata Processing"> | |
7 <link rel="next" href="GuideReferenceConfig.html" title="Configuration Files and Locations"> | |
8 <link rel="top" href="GuideIndex.html" title="The Geeqie User Manual"> | |
9 <style type="text/css"> | |
10 | |
11 html { height: 100%; } | |
12 body { | |
13 margin: 0px; padding: 12px; | |
14 background-color: #f9f9f6; | |
15 min-height: 100%; | |
16 direction: ltr; | |
17 } | |
18 div, p, pre, blockquote { margin: 0; padding: 0; } | |
19 p img { vertical-align: middle; } | |
20 sub { font-size: 0.83em; } | |
21 sub sub { font-size: 1em; } | |
22 sup { font-size: 0.83em; } | |
23 sup sup { font-size: 1em; } | |
24 table { border-collapse: collapse; } | |
25 table.table-pgwide { width: 100%; } | |
26 td { vertical-align: top; } | |
27 td { padding: 0.2em 0.83em 0.2em 0.83em; } | |
28 th { padding: 0 0.83em 0 0.83em; } | |
29 tr.tr-shade { | |
30 background-color: #f9f9f6; | |
31 } | |
32 td.td-colsep { border-right: solid 1px; } | |
33 td.td-rowsep { border-bottom: solid 1px; } | |
34 thead { border-top: solid 2px; border-bottom: solid 2px; } | |
35 tfoot { border-top: solid 2px; border-bottom: solid 2px; } | |
36 div.body { | |
37 padding: 1em; | |
38 max-width: 60em; | |
39 background-color: #ffffff; | |
40 border: solid 1px #e0e0df; | |
41 } | |
42 div.body-sidebar { | |
43 margin-right: 13em; | |
44 } | |
45 div.division div.division { margin-top: 1.72em; } | |
46 div.division div.division div.division { margin-top: 1.44em; } | |
47 div.header { | |
48 margin: 0; | |
49 color: #3f3f3f; | |
50 border-bottom: solid 1px #e0e0df; | |
51 } | |
52 h1, h2, h3, h4, h5, h6, h7 { | |
53 margin: 0; padding: 0; | |
54 color: #3f3f3f; | |
55 } | |
56 h1.title { font-size: 1.72em; } | |
57 h2.title { font-size: 1.44em; } | |
58 h3.title { font-size: 1.2em; } | |
59 h4.title, h5.title, h6.title, h7.title { font-size: 1em; } | |
60 .block { margin-top: 1em; } | |
61 .block .block-first { margin-top: 0; } | |
62 .block-indent { | |
63 margin-left left: 1.72em; | |
64 margin-: 1em; | |
65 } | |
66 .block-indent .block-indent { margin-left: 0em; margin-right: 0em; } | |
67 td .block-indent { margin-left: 0em; margin-right: 0em; } | |
68 dd .block-indent { margin-left: 0em; margin-right: 0em; } | |
69 .block-verbatim { white-space: pre; } | |
70 div.title { | |
71 margin-bottom: 0.2em; | |
72 font-weight: bold; | |
73 color: #3f3f3f; | |
74 } | |
75 div.title-formal { padding-left: 0.2em; padding-right: 0.2em; } | |
76 div.title-formal .label { font-weight: normal; } | |
77 a { | |
78 color: #1f609f; | |
79 text-decoration: none; | |
80 } | |
81 a:hover { text-decoration: underline; } | |
82 a:visited { color: #9f1f6f; } | |
83 ul, ol, dl { margin: 0; padding: 0; } | |
84 li { | |
85 margin-top: 1em; | |
86 margin-left: 2.4em; | |
87 padding: 0; | |
88 } | |
89 li.li-first { margin-top: 0; } | |
90 dt { margin: 1em 0 0 0; } | |
91 dt.dt-first { margin: 0; } | |
92 dd { | |
93 margin-left: 1.72em; | |
94 margin-top: 0.5em; | |
95 } | |
96 dl.dl-compact dt { margin-top: 0; } | |
97 dl.dl-compact dd { margin-top: 0; margin-bottom: 0; } | |
98 | |
99 | |
100 ul.linktrail { | |
101 display: block; | |
102 margin: 0.2em 0 0 0; | |
103 text-align: right; | |
104 } | |
105 li.linktrail { display: inline; margin: 0; padding: 0; } | |
106 | |
107 li.linktrail::before { | |
108 content: ' / '; | |
109 color: #3f3f3f; | |
110 } | |
111 | |
112 li.linktrail-first::before, li.linktrail-only::before { content: ''; } | |
113 | |
114 | |
115 div.navbar { | |
116 padding: 0.5em 1em 0.5em 1em; | |
117 max-width: 60em; | |
118 background-color: #ffffff; | |
119 border: solid 1px #e0e0df; | |
120 } | |
121 div.navbar-top { margin-bottom: 1em; } | |
122 div.navbar-bottom { margin-top: 1em; clear: both; } | |
123 div.navbar img { border: 0; vertical-align: -0.4em; } | |
124 table.navbar { width: 100%; margin: 0; border: none; } | |
125 table.navbar td { padding: 0; border: none; } | |
126 td.navbar-next { | |
127 text-align: right; | |
128 } | |
129 a.navbar-prev::before { | |
130 | |
131 content: '◀ '; | |
132 color: #3f3f3f; | |
133 } | |
134 a.navbar-next::after { | |
135 | |
136 content: ' ▶'; | |
137 color: #3f3f3f; | |
138 } | |
139 | |
140 | |
141 div.sidebar { | |
142 float: right; | |
143 padding: 0; margin: 0; width: 12em; | |
144 } | |
145 div.sidenav { | |
146 padding: 0.5em 1em 0 1em; | |
147 background-color: #ffffff; | |
148 border: solid 1px #e0e0df; | |
149 } | |
150 div.sidenav div.autotoc { | |
151 background-color: #ffffff; | |
152 border: none; padding: 0; margin: 0; | |
153 } | |
154 div.sidenav div.autotoc div.autotoc { margin-top: 0.5em; } | |
155 div.sidenav div.autotoc li { margin-bottom: 0.5em; } | |
156 div.sidenav div.autotoc div.autotoc div.autotoc { | |
157 margin-left: 1em; | |
158 margin-top: 0; | |
159 } | |
160 div.sidenav div.autotoc div.autotoc div.autotoc li { margin-bottom: 0; } | |
161 | |
162 | |
163 div.autotoc { | |
164 | |
165 display: table; | |
166 margin-top: 1em; | |
167 margin-left: 1.72em; | |
168 padding: 0.5em 1em 0.5em 1em; | |
169 background-color: #f0f9ff; | |
170 border: solid 1px #c0c9ff; | |
171 } | |
172 div.autotoc ul { margin: 0; padding: 0; } | |
173 div.autotoc li { list-style-type: none; margin: 0; } | |
174 div.autotoc div.autotoc-title { margin-bottom: 0.5em; } | |
175 div.autotoc div.autotoc { border: none; padding: 0; margin-top: 0; margin-bottom: 0.5em; } | |
176 div.autotoc div.autotoc div.autotoc { margin-bottom: 0; } | |
177 | |
178 | |
179 span.bibliolabel { | |
180 color: #3f3f3f; | |
181 } | |
182 | |
183 | |
184 div.admonition { | |
185 padding: 0.5em 6px 0.5em 6px; | |
186 border: solid 1px #e0e0df; | |
187 background-color: #fffff0; | |
188 } | |
189 div.caution-inner, div.important-inner, div.note-inner, div.tip-inner, div.warning-inner { | |
190 padding-left: 60px; | |
191 background-position: left top; | |
192 background-repeat: no-repeat; | |
193 min-height: 48px; | |
194 } | |
195 div.caution-inner { background-image: url("admon-caution.png"); } | |
196 div.important-inner { background-image: url("admon-important.png"); } | |
197 div.note-inner { background-image: url("admon-note.png"); } | |
198 div.note-bug div.note-inner { background-image: url("admon-bug.png"); } | |
199 div.tip-inner { background-image: url("admon-tip.png"); } | |
200 div.warning-inner { background-image: url("admon-warning.png"); } | |
201 div.blockquote { | |
202 | |
203 background-image: url('watermark-blockquote-201C.png'); | |
204 background-repeat: no-repeat; | |
205 background-position: top left; | |
206 padding: 0.5em; | |
207 padding-left: 4em; | |
208 } | |
209 div.attribution { | |
210 margin-top: 0.5em; | |
211 color: #3f3f3f; | |
212 } | |
213 div.attribution::before { | |
214 | |
215 content: '― '; | |
216 } | |
217 div.epigraph { | |
218 text-align: right; | |
219 margin-left: 20%; | |
220 margin-right: 0; | |
221 color: #3f3f3f; | |
222 } | |
223 div.figure, div.informalfigure { | |
224 | |
225 display: table; | |
226 padding: 0.5em; | |
227 background-color: #f9f9f6; | |
228 border: solid 1px #e0e0df; | |
229 } | |
230 div.figure-inner, div.informalfigure-inner { | |
231 padding: 0.5em; | |
232 background-color: #ffffff; | |
233 border: solid 1px #e0e0df; | |
234 } | |
235 div.caption { margin-top: 0.5em; } | |
236 div.programlisting { | |
237 padding: 0.5em; | |
238 | |
239 background-color: #f9f9f6; | |
240 border: solid 1px #e0e0df; | |
241 } | |
242 div.screen { | |
243 padding: 0.5em; | |
244 | |
245 background-color: #f9f9f6; | |
246 border: solid 1px #e0e0df; | |
247 } | |
248 div.screen .prompt { | |
249 color: #3f3f3f; | |
250 } | |
251 div.screen .userinput { | |
252 font-weight: bold; | |
253 color: #3f3f3f; | |
254 } | |
255 div.programlisting .userinput { | |
256 font-weight: bold; | |
257 color: #3f3f3f; | |
258 } | |
259 pre.linenumbering { | |
260 color: #3f3f3f; | |
261 margin: 0; | |
262 padding-right: 1em; | |
263 float: left; | |
264 text-align: right; | |
265 } | |
266 | |
267 | |
268 | |
269 dl.index dt { margin-top: 0; } | |
270 dl.index dd { margin-top: 0; margin-bottom: 0; } | |
271 dl.indexdiv dt { margin-top: 0; } | |
272 dl.indexdiv dd { margin-top: 0; margin-bottom: 0; } | |
273 dl.setindex dt { margin-top: 0; } | |
274 dl.setindex dd { margin-top: 0; margin-bottom: 0; } | |
275 div.list div.title-formal span.title { | |
276 border-bottom: solid 1px #e0e0df; | |
277 } | |
278 div.simplelist { | |
279 margin-left: 1.72em; | |
280 } | |
281 div.simplelist table { margin-left: 0; border: none; } | |
282 div.simplelist td { | |
283 padding: 0.5em; | |
284 border-left: solid 1px #e0e0df; | |
285 } | |
286 div.simplelist td.td-first { | |
287 padding-left: 0; | |
288 border-left: 0; | |
289 } | |
290 div.synopsis { | |
291 padding: 0.5em; | |
292 | |
293 background-color: #f9f9f6; | |
294 border-top: solid 2px #c0c9ff; | |
295 border-bottom: solid 2px #c0c9ff; | |
296 } | |
297 div.synopsis div.synopsis { | |
298 padding: 0; | |
299 border: none; | |
300 } | |
301 div.synopsis div.block { margin-top: 0.2em; } | |
302 div.synopsis div.block-first { margin-top: 0; } | |
303 div.cmdsynopsis { font-family: monospace; } | |
304 | |
305 span.accel { text-decoration: underline; } | |
306 span.acronym { font-family: sans-serif; } | |
307 span.application { font-style: italic; } | |
308 span.classname, span.exceptionname, span.interfacename { font-family: monospace; } | |
309 span.code { | |
310 font-family: monospace; | |
311 border: solid 1px #e0e0df; | |
312 padding-left: 0.2em; | |
313 padding-right: 0.2em; | |
314 } | |
315 pre span.code { border: none; padding: 0; } | |
316 span.command { | |
317 font-family: monospace; | |
318 border: solid 1px #e0e0df; | |
319 padding-left: 0.2em; | |
320 padding-right: 0.2em; | |
321 } | |
322 pre span.command { border: none; padding: 0; } | |
323 span.computeroutput { font-family: monospace; } | |
324 | |
325 span.constant { font-family: monospace; } | |
326 span.database { font-family: monospace; } | |
327 span.email { font-family: monospace; } | |
328 span.emphasis { font-style: italic; } | |
329 span.emphasis-bold { font-style: normal; font-weight: bold; } | |
330 span.envar { font-family: monospace; } | |
331 | |
332 span.filename { font-family: monospace; } | |
333 span.firstterm { font-style: italic; } | |
334 span.foreignphrase { font-style: italic; } | |
335 span.function { font-family: monospace; } | |
336 | |
337 dt.glossterm span.glossterm { font-style: normal; } | |
338 | |
339 | |
340 span.glossterm { font-style: italic; } | |
341 | |
342 span.guibutton, span.guilabel, span.guimenu, span.guimenuitem, span.guisubmenu, span.interface { | |
343 font-weight: bold; | |
344 color: #3f3f3f; | |
345 } | |
346 span.keycap { | |
347 font-weight: bold; | |
348 color: #3f3f3f; | |
349 } | |
350 span.lineannotation { font-style: italic; } | |
351 span.literal { font-family: monospace; } | |
352 span.markup { font-family: monospace; } | |
353 span.medialabel { font-style: italic; } | |
354 span.methodname { font-family: monospace; } | |
355 span.ooclass, span.ooexception, span.oointerface { font-family: monospace; } | |
356 span.option { font-family: monospace; } | |
357 span.parameter { font-family: monospace; } | |
358 span.paramdef span.parameter { font-style: italic; } | |
359 span.prompt { font-family: monospace; } | |
360 span.property { font-family: monospace; } | |
361 span.replaceable { font-style: italic; } | |
362 span.returnvalue { font-family: monospace; } | |
363 span.sgmltag { font-family: monospace; } | |
364 span.structfield, span.structname { font-family: monospace; } | |
365 span.symbol { font-family: monospace; } | |
366 span.systemitem { font-family: monospace; } | |
367 span.token { font-family: monospace; } | |
368 span.type { font-family: monospace; } | |
369 span.uri { font-family: monospace; } | |
370 span.userinput { font-family: monospace; } | |
371 span.varname { font-family: monospace; } | |
372 span.wordasword { font-style: italic; } | |
373 | |
374 | |
375 | |
376 div.footnotes { font-style: italic; font-size: 0.8em; } | |
377 div.footnote { margin-top: 1.44em; } | |
378 span.footnote-number { display: inline; padding-right: 0.83em; } | |
379 span.footnote-number + p { display: inline; } | |
380 a.footnote { text-decoration: none; font-size: 0.8em; } | |
381 a.footnote-ref { text-decoration: none; } | |
382 | |
383 span.co { | |
384 margin-left: 0.2em; margin-right: 0.2em; | |
385 padding-left: 0.4em; padding-right: 0.4em; | |
386 border: solid 1px #000000; | |
387 -moz-border-radius: 8px; | |
388 background-color: #000000; | |
389 color: #FFFFFF; | |
390 font-size: 8px; | |
391 } | |
392 span.co:hover { | |
393 border-color: #333333; | |
394 background-color: #333333; | |
395 color: #FFFFFF; | |
396 } | |
397 span.co a { text-decoration: none; } | |
398 span.co a:hover { text-decoration: none; } | |
399 | |
400 dt.question { margin-left: 0em; } | |
401 dt.question div.label { float: left; } | |
402 dd + dt.question { margin-top: 1em; } | |
403 dd.answer { | |
404 margin-top: 1em; | |
405 margin-left: 2em; | |
406 margin-right: 1em; | |
407 } | |
408 dd.answer div.label { float: left; } | |
409 </style> | |
410 </head> | |
411 <body> | |
412 <div class="navbar navbar-top"><table class="navbar"><tr> | |
413 <td class="navbar-prev"><a class="navbar-prev" href="GuideReferenceMetadata.html" title="Metadata Processing">Metadata Processing</a></td> | |
414 <td class="navbar-next"><a class="navbar-next" href="GuideReferenceConfig.html" title="Configuration Files and Locations">Configuration Files and Locations</a></td> | |
415 </tr></table></div> | |
416 <div class="sidebar"><div class="sidenav"><div class="autotoc"><ul> | |
417 <li><a href="GuideIndex-info.html" title="About This Document">About This Document</a></li> | |
418 <li> | |
419 <a class="xref" href="GuideIndex.html" title="The Geeqie User Manual">The Geeqie User Manual</a><div class="autotoc"><ul> | |
420 <li><a class="xref" href="GuideIntroduction.html" title="Introduction">Introduction</a></li> | |
421 <li><a class="xref" href="GuideMainWindow.html" title="Main Window">Main Window</a></li> | |
422 <li><a class="xref" href="GuideSidebars.html" title="Sidebars">Sidebars</a></li> | |
423 <li><a class="xref" href="GuideOtherWindows.html" title="Stand-alone Windows">Stand-alone Windows</a></li> | |
424 <li><a class="xref" href="GuideImageSearch.html" title="Search and Select">Search and Select</a></li> | |
2658
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
425 <li><a class="xref" href="GuideImageManagementPlugins.html" title="Plugins">Plugins</a></li> |
2579 | 426 <li><a class="xref" href="GuideImageManagement.html" title="File Management">File Management</a></li> |
427 <li><a class="xref" href="GuideColorManagement.html" title="Color Management">Color Management</a></li> | |
428 <li><a class="xref" href="GuideImagePresentation.html" title="Image Presentation">Image Presentation</a></li> | |
429 <li><a class="xref" href="GuidePrinting.html" title="Printing">Printing</a></li> | |
430 <li><a class="xref" href="GuideOptionsMain.html" title="Preferences">Preferences</a></li> | |
431 <li><a class="xref" href="GuideOptionsAdditional.html" title="Additional Preferences">Additional Preferences</a></li> | |
432 <li> | |
433 <a class="xref" href="GuideReference.html" title="Reference">Reference</a><div class="autotoc"><ul> | |
434 <li><a class="xref" href="GuideReferenceCommandLine.html" title="Command Line Options">Command Line Options</a></li> | |
435 <li><a class="xref" href="GuideReferenceKeyboardShortcuts.html" title="Keyboard and Mouse Shortcuts">Keyboard and Mouse Shortcuts</a></li> | |
436 <li><a class="xref" href="GuideReferenceThumbnails.html" title="Thumbnails">Thumbnails</a></li> | |
437 <li><a class="xref" href="GuideReferenceMetadata.html" title="Metadata Processing">Metadata Processing</a></li> | |
438 <li>Lua Extensions</li> | |
439 <li><a class="xref" href="GuideReferenceConfig.html" title="Configuration Files and Locations">Configuration Files and Locations</a></li> | |
440 <li><a class="xref" href="GuideReferenceLIRC.html" title="Infra-red controller">Infra-red controller</a></li> | |
441 <li><a class="xref" href="GuideReferenceXmpExif.html" title="XMP, Exif and IPTC">XMP, Exif and IPTC</a></li> | |
442 <li><a class="xref" href="GuideReferenceSupportedFormats.html" title="Supported File Formats">Supported File Formats</a></li> | |
2658
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
443 <li><a class="xref" href="GuideReferencePixbufLoaders.html" title="Additional pixbuf loaders">Additional pixbuf loaders</a></li> |
2746
8bab8ac8ade0
Local time - UTC offset and daylight saving correction
Colin Clark <colin.clark@cclark.uk>
parents:
2658
diff
changeset
|
444 <li><a class="xref" href="GuideReferenceUTC.html" title="UTC and Daylight Saving Time (DST)">UTC and Daylight Saving Time (DST)</a></li> |
2579 | 445 <li><a class="xref" href="GuideReferenceDecodeLatLong.html" title="Decoding Latitude and Longitude">Decoding Latitude and Longitude</a></li> |
446 <li><a class="xref" href="GuideReferenceStandards.html" title="Standards">Standards</a></li> | |
2814
54ae25ba376b
Ref #624: Filter files by shell or regular expression pattern
Colin Clark <colin.clark@cclark.uk>
parents:
2746
diff
changeset
|
447 <li><a class="xref" href="GuideReferencePCRE.html" title="Perl Compatible Regular Expressions">Perl Compatible Regular Expressions</a></li> |
2579 | 448 </ul></div> |
449 </li> | |
450 <li><a class="xref" href="GuideFaq.html" title="Frequently Asked Questions">Frequently Asked Questions</a></li> | |
451 <li><a class="xref" href="GuideLicence.html" title="Licence">Licence</a></li> | |
452 <li><a class="xref" href="GuideCredits.html" title="Credits">Credits</a></li> | |
453 <li><a class="xref" href="GuideGnuFdl.html" title="GNU Free Documentation License">GNU Free Documentation License</a></li> | |
454 </ul></div> | |
455 </li> | |
456 </ul></div></div></div> | |
457 <div class="body body-sidebar"><div class="division section"> | |
458 <a name="GuideReferenceLua"></a><div class="header"><h1 class="section title"><span class="title">Lua Extensions</span></h1></div> | |
459 <ul class="linktrail"> | |
460 <li class="linktrail linktrail-first"><a class="linktrail" href="GuideIndex.html" title="The Geeqie User Manual">The Geeqie User Manual</a></li> | |
461 <li class="linktrail linktrail-last"><a class="linktrail" href="GuideReference.html" title="Reference">Reference</a></li> | |
462 </ul> | |
463 <p class="para block block-first"> | |
464 Lua scripts allow the functionality of Geeqie to be extended. Lua scripts may only be used in conjunction with the | |
2835
bb44bd76f857
Simplify OSD settings in Preferences
Colin Clark <colin.clark@cclark.uk>
parents:
2814
diff
changeset
|
465 <a class="link" href="GuideOptionsOSD.html#OverlayScreenDisplay" title="Overlay Screen Display">Overlay Screen Display</a> |
2658
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
466 and the |
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
467 <div dir="ltr" class=" block programlisting block-indent"><pre class="programlisting">geeqie --remote --lua:</pre></div> |
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
468 command line option. |
2579 | 469 </p> |
470 <p class="para block"></p> | |
471 <p class="para block">Some knowledge of the Lua programming language is required.</p> | |
472 <div class="autotoc"><ul> | |
473 <li> | |
474 <span class="label">13.5.1. </span><a class="xref" href="GuideReferenceLua.html#Requirements" title="Requirements">Requirements</a> | |
475 </li> | |
476 <li> | |
477 <span class="label">13.5.2. </span><a class="xref" href="GuideReferenceLua.html#HowToUseLua" title="How to use Lua">How to use Lua</a> | |
478 </li> | |
479 <li> | |
480 <span class="label">13.5.3. </span><a class="xref" href="GuideReferenceLua.html#GeeqieBuiltIn%20Functions" title="Geeqie Lua built-in functions">Geeqie Lua built-in functions</a> | |
481 </li> | |
482 <li> | |
483 <span class="label">13.5.4. </span><a class="xref" href="GuideReferenceLua.html#Examples" title="Examples">Examples</a> | |
484 </li> | |
485 <li> | |
486 <span class="label">13.5.5. </span><a class="xref" href="GuideReferenceLua.html#Warning" title="Warning">Warning</a> | |
487 </li> | |
488 </ul></div> | |
489 <div class="division section"> | |
490 <a name="Requirements"></a><div class="header"><h2 class="section title"><span class="title"><span class="label">13.5.1. </span>Requirements</span></h2></div> | |
491 <p class="para block block-first">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.</p> | |
492 <p class="para block">If you are using a pre-compiled distribution, availability depends on the package maintainer.</p> | |
493 </div> | |
494 <div class="division section"> | |
495 <a name="HowToUseLua"></a><div class="header"><h2 class="section title"><span class="title"><span class="label">13.5.2. </span>How to use Lua</span></h2></div> | |
496 <p class="para block block-first"> | |
497 Lua scripts must be stored in a single folder as defined in | |
498 <a class="link" href="GuideReferenceConfig.html" title="Configuration Files and Locations">Configuration Files and Locations</a> | |
499 . | |
500 </p> | |
501 <p class="para block"> | |
502 A link to a Lua script must be inserted into the overlay template. Refer to the | |
2835
bb44bd76f857
Simplify OSD settings in Preferences
Colin Clark <colin.clark@cclark.uk>
parents:
2814
diff
changeset
|
503 <a class="link" href="GuideOptionsOSD.html#OverlayScreenDisplay" title="Overlay Screen Display">Overlay Screen Display</a> |
2579 | 504 section of Window Options. |
505 </p> | |
506 <p class="para block">The full extent of the Lua language is available.</p> | |
507 </div> | |
508 <div class="division section"> | |
509 <a name="GeeqieBuiltIn%20Functions"></a><div class="header"><h2 class="section title"><span class="title"><span class="label">13.5.3. </span>Geeqie Lua built-in functions</span></h2></div> | |
510 <p class="para block block-first">The following functions are built in to Geeqie:</p> | |
511 <p class="para block"> | |
512 <div class="table block block-indent"><table style="border: solid 1px;"><tbody> | |
513 <tr> | |
514 <td class="td-colsep"> | |
515 <span class="emphasis emphasis-bold">Function</span> | |
516 </td> | |
517 <td> | |
518 <span class="emphasis emphasis-bold">Returns</span> | |
519 </td> | |
520 </tr> | |
521 <tr class="tr-shade"> | |
522 <td class="td-colsep">Image:get_path()</td> | |
523 <td>The full path of the file, including filename and extension</td> | |
524 </tr> | |
525 <tr> | |
526 <td class="td-colsep">Image:get_name()</td> | |
527 <td>The full filename including extension</td> | |
528 </tr> | |
529 <tr class="tr-shade"> | |
530 <td class="td-colsep">Image:get_extension</td> | |
531 <td>The file extension including preceeding dot</td> | |
532 </tr> | |
533 <tr> | |
534 <td class="td-colsep">Image:get_date()</td> | |
535 <td>The file date in Unix timestamp format.</td> | |
536 </tr> | |
537 <tr class="tr-shade"> | |
538 <td class="td-colsep">Image:get_size()</td> | |
539 <td>The file size in bytes</td> | |
540 </tr> | |
541 <tr> | |
2658
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
542 <td class="td-colsep">Image:get_marks()</td> |
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
543 <td>An integer representing the marks set for the file</td> |
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
544 </tr> |
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
545 <tr class="tr-shade"> |
2579 | 546 <td class="td-colsep">Image:get_exif()</td> |
547 <td>A data structure containing the entire exif data</td> | |
548 </tr> | |
2658
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
549 <tr> |
2579 | 550 <td class="td-colsep"><exif_str>:get_datum("<exif_tag>")</td> |
551 <td>A single exif tag extracted from a structure output by the above command</td> | |
552 </tr> | |
553 </tbody></table></div> | |
554 </p> | |
555 <p class="para block">The keyword "Image" refers to the file currently being displayed by Geeqie.</p> | |
556 </div> | |
557 <div class="division section"> | |
558 <a name="Examples"></a><div class="header"><h2 class="section title"><span class="title"><span class="label">13.5.4. </span>Examples</span></h2></div> | |
559 <p class="para block block-first"> | |
560 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: | |
561 <div dir="ltr" class=" block programlisting block-indent block-first"><pre class="programlisting"> path=Image:get_path() | |
562 commentfile=io.popen("exiv2 -p c \"" .. path .. "\"" ) | |
563 comment = commentfile:read("*a") | |
564 commentfile:close() | |
565 return (comment) | |
566 </pre></div> | |
567 </p> | |
568 <p class="para block">Note that it is necessary to have escape characters surrounding path and filenames.</p> | |
569 <p class="para block"> | |
570 The following example demonstrates how to extract exif data from a file: | |
571 <div dir="ltr" class=" block programlisting block-indent block-first"><pre class="programlisting"> --Retrieve the DateTimeDigitized exif tag | |
572 exif_structure = Image:get_exif(); | |
573 DateTimeDigitized = exif_structure:get_datum("Exif.Photo.DateTimeDigitized"); | |
574 return (os.date(DateTimeDigitized)) | |
575 </pre></div> | |
576 </p> | |
577 </div> | |
578 <div class="division section"> | |
579 <a name="Warning"></a><div class="header"><h2 class="section title"><span class="title"><span class="label">13.5.5. </span>Warning</span></h2></div> | |
2658
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
580 <div class="admonition block warning block-first block-indent"><div class="warning-inner"> |
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
581 <p class="para block block-first">Lua is a powerful programming language. Errors in script files, besides having undesirable side-effects, may cause Geeqie to crash.</p> |
b3f34f91ac4d
Update web help file and other docs
Colin Clark <colin.clark@cclark.uk>
parents:
2579
diff
changeset
|
582 </div></div> |
2579 | 583 </div> |
584 </div></div> | |
585 <div class="navbar navbar-bottom"><table class="navbar"><tr> | |
586 <td class="navbar-prev"><a class="navbar-prev" href="GuideReferenceMetadata.html" title="Metadata Processing">Metadata Processing</a></td> | |
587 <td class="navbar-next"><a class="navbar-next" href="GuideReferenceConfig.html" title="Configuration Files and Locations">Configuration Files and Locations</a></td> | |
588 </tr></table></div> | |
589 </body> | |
590 </html> |