![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/debug.h"
#include "common/darktable.h"
#include "bauhaus/bauhaus.h"
#include "common/variables.h"
#include "common/colorlabels.h"
#include "common/file_location.h"
#include "common/image.h"
#include "common/image_cache.h"
#include "common/metadata.h"
#include "common/opencl.h"
#include "common/utility.h"
#include "common/tags.h"
#include "common/datetime.h"
#include "control/conf.h"
#include "common/exif.h"
#include <stdio.h>
#include <string.h>
#include <time.h>
Data Structures | |
struct | dt_variables_data_t |
Typedefs | |
typedef struct dt_variables_data_t | dt_variables_data_t |
typedef enum _image_case | _image_case |
Enumerations | |
enum | _image_case { NONE , FILENAME , IMGID } |
Functions | |
static char * | _expand_source (dt_variables_params_t *params, char **source, char extra_stop) |
gboolean | dt_get_user_pictures_dir (const gchar *homedir, gchar *picdir, size_t picdir_size) |
Gets the path to the current OS pictures directory. | |
static void | _init_expansion (dt_variables_params_t *params, gboolean iterate) |
static void | _cleanup_expansion (dt_variables_params_t *params) |
static gboolean | _has_prefix (char **str, const char *prefix) |
static char * | _variables_get_longitude (dt_variables_params_t *params) |
static char * | _variables_get_latitude (dt_variables_params_t *params) |
static char * | _get_base_value (dt_variables_params_t *params, char **variable) |
static char * | _variable_get_value (dt_variables_params_t *params, char **variable) |
static void | _grow_buffer (char **result, char **result_iter, size_t *result_length, size_t extra_space) |
char * | dt_variables_expand (dt_variables_params_t *params, gchar *source, gboolean iterate) |
void | dt_variables_params_init (dt_variables_params_t **params) |
void | dt_variables_params_destroy (dt_variables_params_t *params) |
void | dt_variables_set_datetime (dt_variables_params_t *params, GDateTime *datetime) |
void | dt_variables_set_max_width_height (dt_variables_params_t *params, int max_width, int max_height) |
void | dt_variables_reset_sequence (dt_variables_params_t *params) |
void | dt_variables_set_tags_flags (dt_variables_params_t *params, uint32_t flags) |
typedef enum _image_case _image_case |
typedef struct dt_variables_data_t dt_variables_data_t |
enum _image_case |
|
static |
Referenced by dt_variables_expand().
|
static |
References _grow_buffer(), and _variable_get_value().
Referenced by _variable_get_value(), and dt_variables_expand().
|
static |
References _has_prefix(), _variables_get_latitude(), _variables_get_longitude(), darktable_t::bauhaus, dt_bauhaus_t::colorlabels, darktable, darktable_package_version, darktable_t::db, dot(), dt_colorlabels_to_string(), dt_database_get(), DT_DATETIME_EXIF_LENGTH, dt_datetime_gdatetime_to_exif(), DT_DATETIME_LENGTH, DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_image_cache_get(), dt_image_cache_read_release(), dt_image_get_text_path(), DT_IMAGE_HAS_TXT, dt_image_print_exif(), dt_metadata_get(), dt_opencl_is_enabled(), dt_tag_get_list_export(), dt_tag_get_subtags(), dt_util_dstrcat(), dt_util_format_exposure(), dt_util_glist_to_str(), dt_util_str_replace(), FALSE, darktable_t::image_cache, PACKAGE_NAME, and TRUE.
Referenced by _variable_get_value().
|
static |
Referenced by _expand_source().
|
inlinestatic |
Referenced by _get_base_value().
|
static |
References dt_image_t::camera_alias, dt_image_t::camera_maker, darktable, dt_conf_get_bool(), dt_datetime_img_to_gdatetime(), dt_get_user_pictures_dir(), dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_REJECTED, dt_loc_get_home_dir(), dt_util_get_file_datetime(), dt_image_geoloc_t::elevation, dt_image_t::exif_aperture, dt_image_t::exif_exposure, dt_image_t::exif_exposure_bias, dt_image_t::exif_focal_length, dt_image_t::exif_focus_distance, dt_image_t::exif_iso, dt_image_t::exif_lens, FALSE, FILENAME, dt_image_t::flags, dt_image_t::geoloc, dt_image_t::height, darktable_t::image_cache, IMGID, dt_image_geoloc_t::latitude, dt_image_geoloc_t::longitude, NONE, dt_image_t::p_height, dt_image_t::p_width, PATH_MAX, TRUE, UNKNOWN_IMAGE, darktable_t::utc_tz, dt_image_t::version, and dt_image_t::width.
Referenced by dt_variables_expand().
|
static |
References _expand_source(), _get_base_value(), dt_util_str_replace(), MAX, and MIN.
Referenced by _expand_source().
|
static |
References dt_conf_get_bool(), and dt_util_latitude_str().
Referenced by _get_base_value().
|
static |
References dt_conf_get_bool(), and dt_util_longitude_str().
Referenced by _get_base_value().
gboolean dt_get_user_pictures_dir | ( | const gchar * | homedir, |
gchar * | picdir, | ||
size_t | picdir_size | ||
) |
Gets the path to the current OS pictures directory.
homedir | the user's home directory |
picdir | the gchar* to set to the path of the pictures directory |
picdir_size | the size of picdir |
gboolean
Returns TRUE if success. References PATH_MAX.
Referenced by _dt_check_basedir(), and _init_expansion().
char * dt_variables_expand | ( | dt_variables_params_t * | params, |
gchar * | source, | ||
gboolean | iterate | ||
) |
expands variables in string. the result should be freed with g_free().
References _cleanup_expansion(), _expand_source(), and _init_expansion().
Referenced by _dt_check_basedir(), _watermark_get_svgdoc(), dt_build_filename_from_pattern(), dt_exif_xmp_attach_export(), dt_view_image_info_update(), run_test(), and store().
void dt_variables_params_destroy | ( | dt_variables_params_t * | params | ) |
destroys an initialized dt_variables_params_t, pointer is garbage after this call.
Referenced by _dt_check_basedir(), _watermark_get_svgdoc(), dt_build_filename_from_pattern(), dt_exif_xmp_attach_export(), dt_view_image_info_update(), free_params(), and run_test().
void dt_variables_params_init | ( | dt_variables_params_t ** | params | ) |
allocate and initializes a dt_variables_params_t.
Referenced by _dt_check_basedir(), _watermark_get_svgdoc(), dt_build_filename_from_pattern(), dt_exif_xmp_attach_export(), dt_view_image_info_update(), get_params(), and run_test().
void dt_variables_reset_sequence | ( | dt_variables_params_t * | params | ) |
reset sequence number
void dt_variables_set_datetime | ( | dt_variables_params_t * | params, |
GDateTime * | datetime | ||
) |
reset the date arbitrarily, decrementing reference count of the previous date
Referenced by dt_build_filename_from_pattern().
void dt_variables_set_max_width_height | ( | dt_variables_params_t * | params, |
int | max_width, | ||
int | max_height | ||
) |
set max image width and height defined for an export session in a dt_variables_params_t.
Referenced by store().
void dt_variables_set_tags_flags | ( | dt_variables_params_t * | params, |
uint32_t | flags | ||
) |
set flags for tags to be exported
References flags.
Referenced by _watermark_get_svgdoc(), and dt_exif_xmp_attach_export().