I'd like to write a script to export every photo in my database to a JPG file in a hierarchical folder structure for backup purposes.
I've looked through the Lua scripting documentation, including the utils, and some of the examples, but I can't find reference to a method/function analogous to the export pane in the darktable GUI.
The only other way I can think of doing this is to use a bash script to call the darktable-cli executable on each file, but this seems like it might not be very efficient? I could also call this as an external command from a lua script, which seems somewhat perverse, but I guess would give me access to the other information in the table, and allow me to integrate it into the GUI.
Am I missing something obvious (or otherwise)?
Background info in case it's relevant:
I'm running darktable 2.6.2 on Ubuntu 20.04.
I'm fairly familiar with scripting, but not lua specifically.