Skip to content

Commit

Permalink
Merge branch 'development' - update documentation to API 9.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wpferguson committed Jun 24, 2024
2 parents b2c4de2 + 40ad88f commit 4dda0a4
Show file tree
Hide file tree
Showing 26 changed files with 608 additions and 127 deletions.
13 changes: 13 additions & 0 deletions content/lua.api.manual/darktable/darktable.database.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ Creates a duplicate of an image and returns it.
* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - the image to duplicate
* **return** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The new image object.

# darktable.database.duplicate_image_with_history

```
function(
image : types.dt_lua_image_t
) : types.dt_lua_image_t
```

Creates a duplicate of an image with all processing and returns it.

* **image** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - the image to duplicate
* **return** - _[types.dt_lua_image_t](../../types/dt_lua_image_t)_ - The new image object.

# darktable.database.import

```
Expand Down
21 changes: 16 additions & 5 deletions content/lua.api.manual/types/dt_collection_properties_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,27 @@ Values:
* DT_COLLECTION_PROP_EXPORT_TIMESTAMP
* DT_COLLECTION_PROP_PRINT_TIMESTAMP
* DT_COLLECTION_PROP_HISTORY
* DT_COLLECTION_PROP_RATING
* DT_COLLECTION_PROP_COLORLABEL
* DT_COLLECTION_PROP_TITLE
* DT_COLLECTION_PROP_DESCRIPTION
* DT_COLLECTION_PROP_CREATOR
* DT_COLLECTION_PROP_PUBLISHER
* DT_COLLECTION_PROP_RIGHTS
* DT_COLLECTION_PROP_WHITEBALANCE
* DT_COLLECTION_PROP_FLASH
* DT_COLLECTION_PROP_EXPOSURE_PROGRAM
* DT_COLLECTION_PROP_METERING_MODE
* DT_COLLECTION_PROP_GROUP_ID
* DT_COLLECTION_PROP_LENS
* DT_COLLECTION_PROP_FOCAL_LENGTH
* DT_COLLECTION_PROP_ISO
* DT_COLLECTION_PROP_APERTURE
* DT_COLLECTION_PROP_ASPECT_RATIO
* DT_COLLECTION_PROP_EXPOSURE
* DT_COLLECTION_PROP_FILENAME
* DT_COLLECTION_PROP_GEOTAGGING
* DT_COLLECTION_PROP_LOCAL_COPY
* DT_COLLECTION_PROP_MODULE
* DT_COLLECTION_PROP_ORDER
* DT_COLLECTION_PROP_TITLE
* DT_COLLECTION_PROP_DESCRIPTION
* DT_COLLECTION_PROP_CREATOR
* DT_COLLECTION_PROP_PUBLISHER
* DT_COLLECTION_PROP_RIGHTS

3 changes: 3 additions & 0 deletions content/lua.api.manual/types/dt_lua_image_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ see [darktable.styles.apply](../../darktable/darktable.styles#darktablestylesapp
# dt_lua_image_t.duplicate
see [darktable.database.duplicate](../../darktable/darktable.database#darktabledatabaseduplicate)

# dt_lua_image_t.duplicate_image_with_history
see [darktable.database.duplicate_with_history](../../darktable/darktable.database#darktabledatabaseduplicate_image_with_history)

# dt_lua_image_t.move
see [darktable.database.move_image](../../darktable/darktable.database#darktabledatabasemove_image)

Expand Down
6 changes: 6 additions & 0 deletions content/lua.api.manual/types/dt_lua_lib_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ The translated title of the UI element

The version of the internal data of this lib

# dt_lua_lib_t.active_preset

`string`

The name of the active preset of this lib

# dt_lua_lib_t.visible

`boolean`
Expand Down
31 changes: 31 additions & 0 deletions content/lua.api.manual/types/lua_box.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,34 @@ The orientation of the box.
Attributes:

* [write](../attributes#write)

# lua_box.expand

`gboolean`

Cells expand to fill the width of the box. Defaults to TRUE.

Attributes:

* [write](../attributes#write)

# lua_box.fill

`gboolean`

Widget fills the cell. Defaults to TRUE.

Attributes:

* [write](../attributes#write)

# lua_box.padding

`guint`

Extra padding in pixels to add to the start of the widget. Defaults to 0.

Attributes:

* [write](../attributes#write)

30 changes: 30 additions & 0 deletions content/lua.api.manual/types/lua_button.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ Attributes:

* [write](../attributes#write)

# lua_button.halign

[types.dt_lua_align_t](../types/dt_lua_align_t)

The horizontal alignment of the button label

Attributes:

* [write](../attributes#write)

# lua_button.ellipsize

[types.dt_lua_ellipsize_mode_t](../types/dt_lua_ellipsize_mode_t)
Expand All @@ -41,6 +51,26 @@ Attributes:

* [write](../attributes#write)

# lua_button.image

`image`

The image displayed on the button instead of a label

Attributes:

* [write](../attributes#write)

# lua_button.image_align

[types.dt_lua_align_t](../types/dt_lua_align_t)

The horizontal alignment of the button image

Attributes:

* [write](../attributes#write)

# lua_button.clicked_callback
```
function(
Expand Down
3 changes: 2 additions & 1 deletion content/lua.api.manual/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ author: "people"

# Current API

The Lua API version used in darktable 4.6.0 is 9.2.0.
The Lua API version used in darktable 4.8.0 is 9.3.0.

Previous API versions were

- darktable-4.6.x - Lua API 9.2.0
- darktable 4.4.x - Lua API 9.1.0
- darktable 4.2.x - Lua API 9.0.0
- darktable 3.8.x - Lua API 8.0.0
Expand Down
16 changes: 4 additions & 12 deletions content/lua.scripts.api.manual/dtutils.debug/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,13 @@ dtutils.debug provides an interface to the darktable debugging routines.

## FUNCTIONS

### [dprint](dprint.md)
* [dprint](dprint.md) - pass a variable to darktable.debug.dump and print the results to stdout

pass a variable to darktable.debug.dump and print the results to stdout
* [new_tracepoint](new_tracepoint.md) - create a function returning a tracepoint

### [new_tracepoint](new_tracepoint.md)
* [terse_dump](terse_dump.md) - set darktable.debug.known to shorten all image dumps to a single line

create a function returning a tracepoint

### [terse_dump](terse_dump.md)

set darktable.debug.known to shorten all image dumps to a single line

### [tracepoint](tracepoint.md)

print out a tracepoint and dump the arguments
* [tracepoint](tracepoint.md) - print out a tracepoint and dump the arguments

## LICENSE

Expand Down
72 changes: 18 additions & 54 deletions content/lua.scripts.api.manual/dtutils.file/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,77 +29,41 @@ constructing darktable lua scripts

## FUNCTIONS

### [check_if_bin_exists](check_if_bin_exists.md)
* [check_if_bin_exists](check_if_bin_exists.md) - check if an executable exists

check if an executable exists
* [check_if_file_exists](check_if_file_exists.md) - check if a file or path exist

### [check_if_file_exists](check_if_file_exists.md)
* [chop_filetype](chop_filetype.md) - remove a filetype from a filename

check if a file or path exist
* [create_unique_filename](create_unique_filename.md) - create a unique filename from the supplied argment

### [chop_filetype](chop_filetype.md)
* [executable_path_widget](executable_path_widget.md) - create a widget to get executable path preferences

remove a filetype from a filename
* [file_copy](file_copy.md) - copy a file to another name/location

### [create_unique_filename](create_unique_filename.md)
* [file_move](file_move.md) - move a file from one directory to another

create a unique filename from the supplied argment
* [filename_increment](filename_increment.md) - add a two digit increment to a filename

### [executable_path_widget](executable_path_widget.md)
* [get_basename](get_basename.md) - get the filename without the path or extension

create a widget to get executable path preferences
* [get_executable_path_preference](get_executable_path_preference.md) - return the path to an executable from a preference

### [file_copy](file_copy.md)
* [get_filename](get_filename.md) - get the filename and extension from a file path

copy a file to another name/location
* [get_filetype](get_filetype.md) - get the filetype from a filename

### [file_move](file_move.md)
* [get_path](get_path.md) - get the path from a file path

move a file from one directory to another
* [mkdir](mkdir.md) - create the directory(ies) if they do not already exists

### [filename_increment](filename_increment.md)
* [rmdir](rmdir.md) - recursively remove a directory

add a two digit increment to a filename
* [sanitize_filename](sanitize_filename.md) - make a filename safe to pass as an argument

### [get_basename](get_basename.md)
* [set_executable_path_preference](set_executable_path_preference.md) - set a preference for the path to an executable

get the filename without the path or extension

### [get_executable_path_preference](get_executable_path_preference.md)

return the path to an executable from a preference

### [get_filename](get_filename.md)

get the filename and extension from a file path

### [get_filetype](get_filetype.md)

get the filetype from a filename

### [get_path](get_path.md)

get the path from a file path

### [mkdir](mkdir.md)

create the directory(ies) if they do not already exists

### [rmdir](rmdir.md)

recursively remove a directory

### [sanitize_filename](sanitize_filename.md)

make a filename safe to pass as an argument

### [set_executable_path_preference](set_executable_path_preference.md)

set a preference for the path to an executable

### [split_filepath](split_filepath.md)

split a filepath into parts
* [split_filepath](split_filepath.md) - split a filepath into parts

## LICENSE

Expand Down
20 changes: 6 additions & 14 deletions content/lua.scripts.api.manual/dtutils.log/details.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,13 @@ scattered through out your code and only turn them on as necessary.

## FUNCTIONS

### [caller](caller.md)
* [caller](caller.md) - get the name and line number of the calling routine

get the name and line number of the calling routine
* [engine](engine.md) - get and set the output engine

### [engine](engine.md)
* [log_level](log_level.md) - get or set the log level

get and set the output engine

### [log_level](log_level.md)

get or set the log level

### [msg](msg.md)

print a log message
* [msg](msg.md) - print a log message

## EXAMPLE
```
Expand All @@ -54,11 +46,11 @@ log.log_level(log.warn)
```
print out warning, error and success messages as code is running
```
log.log_level(debug)
log.log_level(log.debug)
```
print out debugging messages too because this isnt working
```
log.log_level(info)
log.log_level(log.info)
```
I want to make sure this is working ok
```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: build_substitute_list
id: build_substitute_list
weight: 90
draft: false
author: "people"
---

## NAME

build_substitute_list

## SYNOPSIS

build a list of variable substitutions

## USAGE
```
local ds = require "lib/dtutils.string"
local result = ds.build_substitute_list(image, sequence, variable_string, [username], [pic_folder], [home], [desktop])
```
* **image** - _[dt_lua_image_t](../../lua.api.manual/types/dt_lua_image_t.md)_ - the image being processed
* **sequence** - _integer_ - the sequence number of the image being processed (exported)
* **variable_string** - _string_ - the substitution variable string
* **\[username\]** - _string_ - optional - user name. Will be determined if not supplied
* **\[pic_folder\]** - _string_ - optional - pictures folder name. Will be determined if not supplied
* **\[home\]** - _string_ - optional - home directory. Will be determined if not supplied
* **\[desktop\]** - _string_ - optional - desktop directory. Will be determined if not supplied

## DESCRIPTION

**build_substitute_list** populates variables with values from the arguments
and determined from the system and darktable.

## RETURN VALUE



## LIMITIATIONS

If the value for a variable can not be determined, or is not supported,
then an empty string is used for the value

## SEE ALSO

[darktable variables](https://docs.darktable.org/usermanual/4.6/en/special-topics/variables/)
Loading

0 comments on commit 4dda0a4

Please sign in to comment.