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
fecbb39347
lib/dtutils/string - more embedded doc updates
2024-05-20 23:43:47 -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
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
Bill Ferguson
1c9042c496
Added a sanitize_lua function to the string library for sanitizing
...
strings of lua "magic" characters before using the string in a string
function that involves matching.
script_manager needs the path to the lua directory sanitized of lua
"magic" characters to prevent failure to extract the category and script
names.
2020-06-09 20:22:02 -04:00
August Schwerdfeger
51eda4e755
Made Windows- and POSIX-specific sanitization functions local; moved the 'sanitize' functions after the 'is_not_sanitized' functions that they call.
2020-01-21 22:17:12 -06:00
August Schwerdfeger
847c39749d
Corrected escaping of command-line arguments in the 'sanitize' and 'is_not_sanitized' functions.
2020-01-21 00:29:18 -06:00
Bill Ferguson
5b977733b3
Rewrote sanitize and is_not_sanitized to handle strings with embedded operatings system quotes. Fixes #216 .
2020-01-19 23:11:41 -05:00
Bill Ferguson
e427294ec1
fix library problems found during unit testing
2019-12-16 22:42:32 -05:00
wpferguson
b7857c8462
Revert "Library fixes"
2019-12-16 22:30:50 -05:00
Bill Ferguson
1c295a88ac
Fixed bugs found during unit testing with testing framework
2019-12-11 22:55:44 -05:00
Bill Ferguson
1a22bfbcef
Added system library to handle running external commands on different operating systems in a transparent manner. Added file and path quoting that is cross platform compatible. Changed gimp.lua to use the new utilities.
2018-07-11 11:32:48 -04:00
Bill Ferguson
564fd20f23
Moved lib/libLog.lua to lib/dtutils/log.lua. Rewrote most of it to make it more configurable and easier to use. Updated doc format to a fixed list of fields. Did away with the comment blocks and just relying on the libdoc comments. Update doc tools to use new formats. Moved dtutils/extensions.lua to dtutils/string.lua. Pulled dtutils/processor.lua back for now since there is no context for it. Removed unneeded functions and cleaned up others.
2016-10-20 01:19:54 -04:00