Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
import_jobs.h
Go to the documentation of this file.
1/*
2 This file is part of the Ansel project.
3 Copyright (C) 2025 Aurélien PIERRE.
4
5 Ansel is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 Ansel is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with Ansel. If not, see <http://www.gnu.org/licenses/>.
17*/
18#pragma once
19
20#include "common/image.h"
21#include "control/control.h"
22#include "common/variables.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28
29typedef struct dt_control_import_t
30{
31 GList *imgs;
32 GDateTime *datetime;
33 gboolean copy;
34
35 // String expanded as $(JOBCODE) in patterns
36 char *jobcode;
37
38 // Base folder of all import subfolders. Input.
40
41 // Pattern to build import subfolders for imports with copy,
42 // child of base_folder. Input
44
45 // Pattern to build file names for imports with copy. Input
47
48 // Computed base_folder/target_subfolder from expanding patterns and variables.
49 // Output.
51
52 // Number of elements to import
53 const int elements;
54
55 // List of pathes of files that couldn't be imported due to filesystem errors or overrides.
56 GList *discarded;
57
59
60
61// free the internal strings of a dt_control_import_t structure. Doesn't free the structure itself.
63
64
74gchar *dt_build_filename_from_pattern(const char *const filename, const int index, dt_image_t *img, dt_control_import_t *data);
75
76
83
84
85#ifdef __cplusplus
86}
87#endif
gchar * dt_build_filename_from_pattern(const char *const filename, const int index, dt_image_t *img, dt_control_import_t *data)
Build a full path for a given image file, given a pattern.
Definition import_jobs.c:73
void dt_control_import(dt_control_import_t data)
Process a list of images to import with or without copying the files on an arbitrary hard-drive.
Definition import_jobs.c:591
void dt_control_import_data_free(dt_control_import_t *data)
Definition import_jobs.c:445
Definition import_jobs.h:30
GList * imgs
Definition import_jobs.h:31
GDateTime * datetime
Definition import_jobs.h:32
const int elements
Definition import_jobs.h:53
char * target_file_pattern
Definition import_jobs.h:46
gboolean copy
Definition import_jobs.h:33
char * target_subfolder_pattern
Definition import_jobs.h:43
GList * discarded
Definition import_jobs.h:56
char * target_dir
Definition import_jobs.h:50
char * jobcode
Definition import_jobs.h:36
char * base_folder
Definition import_jobs.h:39
Definition common/image.h:247