File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ local debug = require "darktable.debug"
34
34
35
35
-- check API version
36
36
du .check_min_api_version (" 7.0.0" , " rename-tags" )
37
+ du .deprecated (" contrib/rename-tags.lua" ," darktable release 4.0" )
37
38
38
39
-- return data structure for script_manager
39
40
Original file line number Diff line number Diff line change @@ -330,4 +330,29 @@ function dtutils.find_image_by_id(imgid)
330
330
end
331
331
end
332
332
333
+ dtutils .libdoc .functions [" deprecated" ] = {
334
+ Name = [[ deprecated]] ,
335
+ Synopsis = [[ print deprecation warning]] ,
336
+ Usage = [[ local du = require "lib/dtutils"
337
+
338
+ du.deprecated(script_name, removal_string)
339
+ script_name - name of the script being deprecated
340
+ removal_strubg - a string explaining when the script will be removed]] ,
341
+ Description = [[ deprecated prints an error message saying the script is deprecated and when it will be removed]] ,
342
+ Return_Value = [[ ]] ,
343
+ Limitations = [[ ]] ,
344
+ Example = [[ local du = require "lib/dtutils"
345
+ du.deprecated("contrib/rename-tags.lua", "darktable release 4.0")]] ,
346
+ See_Also = [[ ]] ,
347
+ Reference = [[ ]] ,
348
+ License = [[ ]] ,
349
+ Copyright = [[ ]] ,
350
+ }
351
+
352
+ function dtutils .deprecated (script_name , removal_string )
353
+ dt .print_toast (" WARNING: " .. script_name .. " is deprecated and will be removed in " .. removal_string )
354
+ dt .print_error (" WARNING: " .. script_name .. " is deprecated and will be removed in " .. removal_string )
355
+ end
356
+
357
+
333
358
return dtutils
You can’t perform that action at this time.
0 commit comments