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
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
Bill Ferguson
245a7b59c4
Incorporated supertobi's comment about spacing.
2019-02-20 11:48:37 -05:00
Bill Ferguson
8b714edb67
Changed check_min_api_version() to print error messages and throw an error if the minimum api is not satisfied. Updated the scripts to reflect the changed check_min_api_version().
2019-02-20 00:22:05 -05:00
Dominik Markiewicz
5555ee278e
file lib: mkdir - handle existing directory case on Windows
2019-02-19 11:35:02 +01:00
Bill Ferguson
451c7fb956
Added check_min_api_function to dtutils.lua to check the minimum version of the lua API required for a script to run. This is intended to replace the API check done with darktable.configuration.check_version(), which requires changing each time the API version changes. check_min_api_version should work for all API version changes unless backward compatibility is broken. All the scripts using darktable.configuration.check_version() were changed to use check_min_api_version().
2019-02-18 19:46:11 -05:00
theres
3675f4d7cd
video ffmpeg - post review fixes
...
- rename OS_PATH_SEPARATOR -> PS and use in all needed places
- change function name from `open_file` to `launch_default_app`
- move `mkdir`, `rm` and `launch_default_app` helper functions to libs
- add executable_path_widget to export module if needed, not to the
preferences
- add show_status
- remove support_format
- change function name `format` to `format_string`, add comments
- replace apostrophes by quote marks
2019-01-27 22:43:47 +01:00
Bill Ferguson
8b5a43e435
Added require statement for official/yield.lua so that darktable.control.execute() would have all of it's requirements met without the user having to remember to add it somewhere else
2018-07-12 13:23:33 -04: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
4b32c34ebd
Removed 'open -W -a' for mac commands from check_if_bin_exists since it only appears to be needed for GUIs. Added 'open -W -a' for macs using GIMP in gimp.lua
2018-07-06 23:04:44 -04:00
Bill Ferguson
7acf2b9cac
Fixed bug where log_level() always returned log.success instead of the correct log level
2018-05-15 01:22:09 -04:00
Bill Ferguson
f961e6aa6b
Replaced dt_print_log = dt.print_error with dt.print_log now that the function exists
2018-05-14 20:30:09 -04:00
Bill Ferguson
5266aa7547
Used a less aggressive quoting strategy that works with check_if_bin_exists, check_if_file_exists, and io.popen().
2018-03-16 12:16:45 -04:00
Bill Ferguson
1c587d3726
Changed wine test to check for .exe"$ or .EXE"$ because of quoting string paths
2018-03-10 13:45:04 -05:00
Bill Ferguson
b4ea97ce37
Fixed accidently wiped out check for macos
2018-03-10 13:38:17 -05:00
Bill Ferguson
83c1a5789a
Changed wine check to operating system isn't windows
2018-03-10 13:07:19 -05:00
Bill Ferguson
841026661a
Removed debugging statement
2018-03-10 12:56:18 -05:00
Bill Ferguson
692441e1d5
Added wine awareness for unix, linux, and macos. Added open -a -W to the macos path so that the path returned by the finder will work correctly.
2018-03-10 12:52:22 -05:00
supertobi
de18432a7d
Merge pull request #112 from wpferguson/os_path_fix
...
Windows and macOS external executable compatibility
2018-03-05 14:13:29 +01:00
Bill Ferguson
c073ecf0dd
Added check_os to lib/dtutils.lua so that scripts can check compatibility with the current operating system
2018-03-03 20:22:47 -05:00
Bill Ferguson
2ea4db8e38
Added windows and macOS external executable compatibility. Added functions set_executable_path_preference(), get_executable_path_preference(), and executable_path_widget() to lib/dtutils/file.lua to get, set and retrieve the location of executables on windows and macOS systems. Modified check_if_bin_exists to use the path preferences so executables can be found on windows and macOS systems as well as linux. Modified contrib/gimp.lua to use the new functions, thus making it usable on windows and macOS too.
2018-03-02 14:07:29 -05:00
Andy Chien
467365dcbb
platform dependent implementation of check_if_bin_exists and check_if_file_exists
2018-02-23 18:14:24 -08:00
Andy Chien
5d57347730
fixed a couple dtutils_file functions for windows platform
2018-02-22 16:01:54 -08:00
supertobi
19b7d29483
added {5,0,0} to the check_version
2017-09-26 15:21:20 +02:00
supertobi
15a492cfa3
added {5,0,0} to the check_version
2017-09-26 10:27:39 +02:00
Bill Ferguson
93e30a8542
Verified API 4.0.0 compatibility and made the necessary changes
2016-11-07 22:53:52 -05:00
Bill Ferguson
dab02823ff
Fixed log bug in dprint function
2016-10-24 19:23:04 -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
Bill Ferguson
a254ac87f7
Created libraries from commonly used functions. Moved official/debug-helpers.lua into lib/dtutils/debug.lua. Created a logging library to provide various levels of logging. Documented all libraries and functions. Created tools to extract documentation in text, man page, and pdf formats.
2016-10-15 01:47:43 -04:00