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
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
Bill Ferguson
ddcf3ed3f4
[file.lua] fixed line trimming in macos search for bin
2020-11-29 18:41:32 -05:00
Bill Ferguson
da05748393
[file.lua] combined the is_ functions into file_test() which allows
...
testing to see if a path exists, is a dir, is a file, or
is executable. Added case insensitive search to the
windows search for bin.
2020-11-29 18:00:47 -05:00
Bill Ferguson
4ab20d8088
Removed official/yield.lua since it was only required for lua API 3.x and less (darktable 2.0 and before). Removed require from scripts that had included it.
2020-11-21 18:33:26 -05:00
Bill Ferguson
7790c9700b
Separated check_if_bin_exists() into 2 functions, one to check the returned
...
executable_path variable and another to search for the binary if it
wasn't detected. All results are checked to ensure they exist, are
a file, and are executable. This fixes the situation where a directory
gets stored as an executable path. Search functions are operating system
specific. Executable paths are saved for MacOS and Windows to make for
shorter searches in the future.
2020-08-02 18:33:49 -04:00
Bill Ferguson
1d5192a39c
removed duplpicate copies of the is_ functions
2020-07-21 20:40:22 -04:00
Bill Ferguson
04525e1258
Added functions is_file(path), is_dir(path, and is_executable(path) to
...
ensure a path is a file, directory, or executable respectively. Replaced
code in check_if_bin_exists with these functions to reduce the lines of code
and make it more understandable.
2020-07-21 16:39:34 -04:00
Tobias Scheck
87502fb17f
move function to create temp files to dtutils/file.lua
2020-06-15 11:16:14 +02: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
Bill Ferguson
4c536b41bc
checkpoint
2020-06-08 12:45:49 -04:00
U-DESKTOP-HQME86J\marco
635ea3f231
fix #229
2020-03-07 08:57:03 +01: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
supertobi
0fe95e91d5
Merge pull request #185 from darktable-org/file.lua
...
file.lua copy for windows
2019-04-16 11:00:19 +02:00
supertobi
cadd98dc59
dtutils_file.file_copy: use the result
2019-04-16 10:58:32 +02:00
supertobi
d355095e16
file.lua copy for windows
2019-04-15 15:27:53 +02:00
supertobi
a81d992552
On Windows we don't need anything to open a file
...
On Windows we don't need any command to open a file.
And "start" has problems with spaces in the filename, even if we put quoter around them:
https://stackoverflow.com/questions/13691827/opening-file-with-spaces-in-windows-via-command-prompt
2019-04-15 14:27:17 +02:00
Bill Ferguson
11881b3b73
removed sanitize_filename wrapper from path argument
2019-02-27 13:29:29 -05:00
Bill Ferguson
5ff36fe2ec
Added a space after the commands and removed quotes in the command invocation.
2019-02-26 12:03:04 -05:00
Bill Ferguson
de087f743f
Fixed compatibility issues. Added new version check to scripts. Renamed lib/dtutils/file/rm() to lib/dtutils/file/rmdir since removing a file in windows with rmdir /q/s results in an error. Fixed os.tmpname() issued in enfuse. Under windows os.tmpname() doesn't put the file in a temporary directory, so fixed it to use darktable.configuration.tmp_dir. Cleaned up documentation in lib/dtutils/system.lua.
2019-02-24 15:19:37 -05:00
Bill Ferguson
8f6a236eb6
Updated files
2019-02-21 23:49:52 -05:00
wpferguson
d9ce826b9d
Merge pull request #157 from theres/dm_timelapse
...
Timelapse plugin based on ffmpeg
2019-02-21 11:57:03 -05:00