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
Bill Ferguson
79678fd82f
[lib/dtutils/file.lua] replaced deprecated "which" call with recommended
...
"command -v" call to check the existence of a
program
2021-12-28 20:45:50 -05:00
Bill Ferguson
aebd26d03a
[lib/dtutils.lua] - Added deprecated function to use when deprecating
...
scripts
[contrib/rename-tags.lua] - Added deprecation warning
2021-12-27 19:36:15 -05:00
chrisaga
63763bedc8
Minor errors in dtutils_log.libdoc.Example : error levels are log.xxxx
2021-09-02 11:23:36 +02:00
Bill Ferguson
9d59479049
Revert changes to accomadate API changes greater than 6.1
2021-06-11 19:47:43 -04:00
wpferguson
b1498aa664
inline if didn't work. Added intermediate register_event function in transition library
2021-02-10 00:18:48 -05:00
wpferguson
c17e832572
[dtutils] fixed api version check
2021-01-21 21:34:43 -05:00
wpferguson
778ad2ce20
[dtutils] added database.get_image() to find_image_by_id() for users with lua API 6.2.0 or greater
2021-01-21 21:20:17 -05:00
August Schwerdfeger
8e0bf9e991
Corrected names in documentation of 'find_image_by_id'.
2021-01-19 01:34:36 -06:00
August Schwerdfeger
daee82aa6a
Added a new utility function to look up an image in the database by ID.
2021-01-19 01:05:50 -06:00
wpferguson
258def1cf8
Merge pull request #304 from wpferguson/logging_cleanup
...
Reduce the amount of trace information in log messages.
2020-12-24 09:55:24 -05:00
wpferguson
e51278f76e
Merge branch 'master' into fix_check_if_bin_exists_and_executable_paths
2020-12-24 09:54:29 -05:00
wpferguson
9af60063d8
[dtutils.log] changed the amount of trace information based on log level.
...
script, caller, line number, msg were printed for all log
levels, but changed to return less info except in log.debug
log.error, and log.critical messages. All messages print
the script name except for log.screen.
2020-12-23 22:52:46 -05:00
wpferguson
96ba075e86
Removed debugging statement
2020-12-22 22:00:41 -05:00
Bill Ferguson
e86a3a3236
[file.lua] removed debugging statement
2020-12-18 11:08:12 -05:00
Bill Ferguson
b41b2a1566
[file.lua] Added create_tmp_file() back in.
2020-11-30 21:51:55 -05:00
Bill Ferguson
b893383353
[file.lua] Added comments for local functions. Added more API
...
documentation for check_if_bin_exists. Added save
executable path preference to _search_for_nix_bin()
so that we can save a little time on subsequent runs
once an executable is found.
2020-11-30 21:06:57 -05:00