Krzysztof Kotowicz
87ca8bde27
Fixed $(VERSION.IF_MULTI)
...
Variable substitution actually errored out when duplicates were present.
2024-12-02 23:45:12 +01:00
Krzysztof Kotowicz
d27df0c0ed
Fixed $ROLL.NAME substitution
...
Accd to 57d3ad4bd3/src/common/variables.c (L660) it should be a basename of the file path.
2024-12-02 23:45:12 +01:00
Krzysztof Kotowicz
9bceb79a15
Fixed $(FILE.NAME) variable substitution
...
According to comments and https://docs.darktable.org/usermanual/4.6/en/special-topics/variables/ it should be a basename.
2024-12-02 23:45:12 +01:00
Bill Ferguson
b5c93e55d1
lib/dtutils - added a gen_uuid() function to generate a UUID string
...
for use as a unique identifier.
2024-12-02 23:45:12 +01:00
Electro707
b1e6bb8daa
Added sanitization around path for mkdir and rmdir
2024-11-02 21:29:53 -04:00
wpferguson
3941c7ab52
Merge pull request #530 from wpferguson/fix_should_be_sanitized
...
fix string lib _should_be_sanitized
2024-10-29 13:16:35 -04:00
wpferguson
b7c8759af3
Merge pull request #523 from koto/sanitize_filename
...
Properly sanitize filenames in dtutils.file file_copy and file_move.
Thanks
2024-10-29 13:16:09 -04:00
Bill Ferguson
e7dbd6e369
lib/dtutils/string - fixed constant names to correctly define the
...
patterns as the unsafe filename characters.
2024-10-28 20:41:02 -04:00
Bill Ferguson
1b5cb1ae6e
lib/dtutils/string - corrected constrant names in assignment
2024-10-28 20:18:22 -04:00
Bill Ferguson
300bb9d443
lib/dtutils/string - fixed _should_be_sanitized with new patterns
...
to detect non safe filename characters
2024-10-19 22:04:56 -04:00
Bill Ferguson
44da339202
alias gettext to darktable.gettext.gettext then change the call to gettext
...
to only pass the message to be translated
2024-10-17 22:17:38 -04:00
Bill Ferguson
99eb595f4c
lib/dtutils/string added end to if to ensure that ret_val has a value
2024-10-16 21:00:27 -04:00
Bill Ferguson
a835ab89bc
lib/dtutils/string - added new variable. Removed invalid variables.
...
Fixed build_substitute list call. Fixed invalid
category return.
2024-10-16 00:42:08 -04:00
Bill Ferguson
da7674ca51
lib/dtutils/string - updated tooltip to use same translatable strings
...
as gui/gtkentry.c for consistency and eas of
translation
2024-10-14 12:54:13 -04:00
Krzysztof Kotowicz
d754e37cf4
Properly sanitize filenames in dtutils.file file_copy and file_move.
2024-09-23 10:42:31 +02:00
Bill Ferguson
167620fadf
lib/dtutils/string - Added get_substitution_tooltip() function to return
...
the substitution pattern tooltip so it only has to be
translated in one place.
Spelled substitution properly to that calls to
build_substitution_list succeed.
2024-09-10 16:34:36 -04:00
Bill Ferguson
a079860cd8
lib/dtutils/file - os.tmpname now works correctly on windows, removed
...
check and fix
2024-08-13 17:46:28 -04:00
Bill Ferguson
535ba78a06
lib/dtutils/system - remove _quote_windows_command
2024-07-21 22:43:59 -04:00
Bill Ferguson
3e37c06b84
lib/dtutils/string - Added check to determine if string needs to be
...
sanitized. Check looks for unprintable characters
and spaces.
2024-07-13 14:44:01 -04:00
Bill Ferguson
9f423eeef3
lib/dtutils/file - reverted io_popen and os_execute wrappers as
...
lib/dtutils/system they don't work in this situation (no control
over the input strings)
2024-07-13 12:46:34 -04:00
Bill Ferguson
36023d8d4f
lib/dtutils/system - fixed typo in quote_windows_command call
2024-07-08 11:43:42 -04:00
Bill Ferguson
c95f8a23b2
lib/dtutils/log - fix screen print check
2024-06-18 00:30:34 -04:00
Bill Ferguson
ff20098175
lib/dtuils/system - removed ds.sanitize wrapped around non windows command.
2024-06-14 12:33:35 -04:00
Bill Ferguson
9f2dbef4f0
lib/dtutils/system added local helper function quote_windows_command() to
...
wrap a windows command in quotes. Added a sanitize step
to windows_external_command() plus quote_windows_command()
to deal with all the windows username possibilities
2024-06-05 12:15:01 -04:00
Bill Ferguson
67538a4de2
lib/dtutils/system code cleanup
2024-06-05 00:01:17 -04:00
Bill Ferguson
96471ae7e7
lib/dtutils - fixed documentation error
2024-06-05 00:00:43 -04:00
Bill Ferguson
fe48d7498c
lib/dtutils/file - replaced os.execute and io.popen with wrapper functions
...
to sanitize windows calls
2024-06-04 23:41:07 -04:00
Bill Ferguson
2f330ea9cc
lib/dtutils/system - added wrapper functions io_popen and os_execute
...
to wrap io.popen and os.execute system calls
respectively. These wrapper functions provide
the necessary quoting on windows to get handle
strings with spaces and special characters.
2024-06-04 23:16:19 -04:00
wpferguson
c36618f5fb
Merge pull request #466 from wpferguson/more_string_doc_updates
...
lib/dtutils/string - more embedded doc updates
2024-05-20 23:45:07 -04:00
Bill Ferguson
fecbb39347
lib/dtutils/string - more embedded doc updates
2024-05-20 23:43:47 -04:00
wpferguson
cbe2c5329a
Merge pull request #412 from wpferguson/add_substitution_to_string_lib
...
Add substitution to string lib
2024-05-20 22:18:01 -04:00
Bill Ferguson
dcbe575e9c
lib/dtutils/string - updated embedded documentation
2024-05-20 22:13:29 -04:00
Bill Ferguson
417c165d16
lib/dtutils/string - updated documentation
2024-05-20 18:18:46 -04:00
Bill Ferguson
232baab86b
lib/dtutils/string - removed debugging statements
2024-05-20 10:07:13 -04:00
Bill Ferguson
3ed4219e6c
lib/dtutils/string - added [] to sanitize_lua().
...
added 4.8 syntax to CATEGORY
added 4.8 SEQUENCE changes (syntax, start, width)
2024-05-20 00:56:01 -04:00
Bill Ferguson
97e33672ea
lib/dtutils/string - fixed default formatting of sequence
2024-05-19 23:04:01 -04:00
Bill Ferguson
7b2018412a
lib/dtutils/string - Cleaned up code to make it more readable.
...
Fixed VERSION_IF_MULTI. Added safety check
in category to make sure we don't try and
read a tag field that doesn't exist.
2024-05-18 22:01:10 -04:00
Bill Ferguson
3e2afffed8
lib/dtutils/string - Added categories to substitution functionality.
...
This makes it feature complete. Some substitutions
aren't implemented since the current use case for
this is creating export directories. The results
from the not implemented substitutions wouldn't
work well in path/file names (such as comma
separated lists or newlines).
2024-05-18 21:59:11 -04:00
wpferguson
7ecd5ca55d
Merge pull request #421 from wpferguson/script_manager_updates
...
Script manager updates
2023-07-15 20:00:24 -04:00
Bill Ferguson
1792410efe
lib/dtutils.lua - corrected test
2023-07-15 19:52:39 -04:00
Bill Ferguson
24b552d619
lib/dtutils.lua - fix typo from testing
2023-07-12 13:18:01 -04:00
Bill Ferguson
b4626f2787
lib/dtutils.lua - changed log message to error on fail to load. Added
...
printing of the returned error.
2023-07-04 15:57:12 -04:00
Bill Ferguson
9e0374d597
lib/dtutils.lua - fix typos
2023-05-06 14:56:58 -04:00
Bill Ferguson
e47672b495
lib/dtutils.lua - added delay in check_min_api_version to sllow display of the error
...
message before script_manager displays an error message.
2023-05-06 14:36:22 -04:00
Bill Ferguson
1905be8577
lib/dtutils.lua - added check_max_api_version to handle the case where part of
...
the API is removed as in the case of the darktable.gui.libs.fixter functions.
2023-05-06 14:31:15 -04:00
Bill Ferguson
ad10542b30
lib/dtutils/string - Added variable substitution functions that
...
are equivalent to the darktable variable
substitution functions.
2023-03-26 14:55:40 -04:00
Bill Ferguson
5331a38f10
lib/dtutils/string - added % and + to sanitize_lua() to prevent
...
pattern matching problems
2023-03-25 17:05:11 -04:00
Bill Ferguson
c9943a2065
lib/dtutils/string - Added logging capability with the ability to
...
set library logging level from a user script
2023-03-25 17:02:48 -04:00
Bill Ferguson
80147a9ebc
lib/dtugiles.file - Moved filename/path/extension string functions to string library. Left
...
the existing function calls in place for backward compatibility. They
now call the new functions in the string library
lib/dtutils.string - Moved the filename/path/extension string functions to the string library
to prevent a circular library depnedency. The file library includes the
string library. If the string library needed to manipulate filename
related strings then the string library would need to include the
file library which would lead to a stack overflow.
2023-03-24 13:40:34 -04:00
wpferguson
0122b3f717
Merge pull request #374 from wpferguson/which_deprecation_369
...
Fix dtutils/file.lua deprecation warning
2021-12-28 20:50:21 -05:00