@@ -8,40 +8,33 @@ echo "[DEBUG textutil.start.batch]"
88
99# Get destination folder from CHOOSE_FOLDER_DIALOG
1010destination=" $OMC_DLG_CHOOSE_FOLDER_PATH "
11- echo " [DEBUG] destination = $destination "
1211
1312if [ -z " $destination " ]; then
14- echo " [DEBUG] No destination selected"
1513 exit 0
1614fi
1715
1816# Get output format from Picker id 13
1917output_format=" $OMC_ACTIONUI_VIEW_13_VALUE "
20- echo " [DEBUG] output_format = $output_format "
2118
2219if [ -z " $output_format " ]; then
2320 output_format=" txt"
2421fi
2522
2623# Get all file paths from the table (column 2)
2724file_paths=" $OMC_ACTIONUI_TABLE_10_COLUMN_2_ALL_ROWS "
28- echo " [DEBUG] file_paths = $file_paths "
2925
3026if [ -z " $file_paths " ]; then
31- echo " [DEBUG] No files to convert"
3227 exit 0
3328fi
3429
3530# Convert newline-separated paths to array
3631IFS=$' \n ' read -r -d ' ' -a files <<< " $file_paths" || true
3732
38- echo " [DEBUG] Number of files: ${# files[@]} "
3933
4034# Get options
4135overwrite=" $OMC_ACTIONUI_VIEW_14_VALUE "
4236strip=" $OMC_ACTIONUI_VIEW_15_VALUE "
4337
44- echo " [DEBUG] overwrite = $overwrite , strip = $strip "
4538
4639# Build strip flag
4740strip_flag=" "
@@ -60,7 +53,6 @@ error_count=0
6053skipped_count=0
6154
6255for file_path in " ${files[@]} " ; do
63- echo " [DEBUG] Processing: $file_path "
6456 if [ -e " $file_path " ]; then
6557 filename=" $( " /usr/bin/basename" " $file_path " ) "
6658 name_without_ext=" ${filename% .* } "
@@ -88,7 +80,6 @@ for file_path in "${files[@]}"; do
8880 fi
8981 fi
9082 else
91- echo " [DEBUG] File does not exist: $file_path "
9283 (( error_count++ ))
9384 errors=" ${errors}
9485✗ ${file_path} : file does not exist"
@@ -101,9 +92,6 @@ ${destination}
10192
10293Converted: ${success_count} succeeded, ${skipped_count} skipped, ${error_count} failed${results}${skipped}${errors} "
10394
104- echo " [DEBUG] Result: $result_message "
105- echo " [DEBUG] Setting text view ${FILE_INFO_VIEW_ID} "
10695
10796" $dialog_tool " " $window_uuid " ${FILE_INFO_VIEW_ID} " $result_message "
10897
109- echo " [DEBUG] Done"
0 commit comments