Skip to content

Commit 51f0d85

Browse files
committed
Remove debug info
And add applet entitlements for codesigning
1 parent 9ffe1a2 commit 51f0d85

4 files changed

Lines changed: 11 additions & 15 deletions

File tree

OMCApplet.entitlements

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.automation.apple-events</key>
6+
<true/>
7+
</dict>
8+
</plist>

TextUtil.app/Contents/Resources/Scripts/TextUtil.main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
# TextUtil.main.sh - Entry point for TextUtil applet
33

4-
echo "[$(/usr/bin/basename "$0")]"
5-
env | sort
4+
# echo "[$(/usr/bin/basename "$0")]"
5+
# env | sort
66

77
# This is the main command handler. The ActionUI window is already shown
88
# via the ACTIONUI_WINDOW definition in Command.plist.

TextUtil.app/Contents/Resources/Scripts/textutil.cancel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
# This script runs when the ActionUI window is closed
55
# Currently just echoes a cancellation message
6-
echo "TextUtil window closed"
6+
# echo "TextUtil window closed"

TextUtil.app/Contents/Resources/Scripts/textutil.start.batch.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,33 @@ echo "[DEBUG textutil.start.batch]"
88

99
# Get destination folder from CHOOSE_FOLDER_DIALOG
1010
destination="$OMC_DLG_CHOOSE_FOLDER_PATH"
11-
echo "[DEBUG] destination = $destination"
1211

1312
if [ -z "$destination" ]; then
14-
echo "[DEBUG] No destination selected"
1513
exit 0
1614
fi
1715

1816
# Get output format from Picker id 13
1917
output_format="$OMC_ACTIONUI_VIEW_13_VALUE"
20-
echo "[DEBUG] output_format = $output_format"
2118

2219
if [ -z "$output_format" ]; then
2320
output_format="txt"
2421
fi
2522

2623
# Get all file paths from the table (column 2)
2724
file_paths="$OMC_ACTIONUI_TABLE_10_COLUMN_2_ALL_ROWS"
28-
echo "[DEBUG] file_paths = $file_paths"
2925

3026
if [ -z "$file_paths" ]; then
31-
echo "[DEBUG] No files to convert"
3227
exit 0
3328
fi
3429

3530
# Convert newline-separated paths to array
3631
IFS=$'\n' read -r -d '' -a files <<< "$file_paths" || true
3732

38-
echo "[DEBUG] Number of files: ${#files[@]}"
3933

4034
# Get options
4135
overwrite="$OMC_ACTIONUI_VIEW_14_VALUE"
4236
strip="$OMC_ACTIONUI_VIEW_15_VALUE"
4337

44-
echo "[DEBUG] overwrite = $overwrite, strip = $strip"
4538

4639
# Build strip flag
4740
strip_flag=""
@@ -60,7 +53,6 @@ error_count=0
6053
skipped_count=0
6154

6255
for 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
10293
Converted: ${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

Comments
 (0)