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
25
extern
"C"
{
26
#endif
27
28
29
typedef
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.
39
char
*
base_folder
;
40
41
// Pattern to build import subfolders for imports with copy,
42
// child of base_folder. Input
43
char
*
target_subfolder_pattern
;
44
45
// Pattern to build file names for imports with copy. Input
46
char
*
target_file_pattern
;
47
48
// Computed base_folder/target_subfolder from expanding patterns and variables.
49
// Output.
50
char
*
target_dir
;
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
58
}
dt_control_import_t
;
59
60
61
// free the internal strings of a dt_control_import_t structure. Doesn't free the structure itself.
62
void
dt_control_import_data_free
(
dt_control_import_t
*data);
63
64
74
gchar *
dt_build_filename_from_pattern
(
const
char
*
const
filename,
const
int
index,
dt_image_t
*img,
dt_control_import_t
*data);
75
76
82
void
dt_control_import
(
dt_control_import_t
data);
83
84
85
#ifdef __cplusplus
86
}
87
#endif
control.h
image.h
dt_build_filename_from_pattern
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:74
dt_control_import
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:597
dt_control_import_data_free
void dt_control_import_data_free(dt_control_import_t *data)
Definition
import_jobs.c:450
dt_control_import_t
Definition
import_jobs.h:30
dt_control_import_t::imgs
GList * imgs
Definition
import_jobs.h:31
dt_control_import_t::datetime
GDateTime * datetime
Definition
import_jobs.h:32
dt_control_import_t::elements
const int elements
Definition
import_jobs.h:53
dt_control_import_t::target_file_pattern
char * target_file_pattern
Definition
import_jobs.h:46
dt_control_import_t::copy
gboolean copy
Definition
import_jobs.h:33
dt_control_import_t::target_subfolder_pattern
char * target_subfolder_pattern
Definition
import_jobs.h:43
dt_control_import_t::discarded
GList * discarded
Definition
import_jobs.h:56
dt_control_import_t::target_dir
char * target_dir
Definition
import_jobs.h:50
dt_control_import_t::jobcode
char * jobcode
Definition
import_jobs.h:36
dt_control_import_t::base_folder
char * base_folder
Definition
import_jobs.h:39
dt_image_t
Definition
image.h:281
variables.h
src
control
jobs
import_jobs.h
Generated by
1.9.8