Skip to content

Commit a6cf760

Browse files
update
1 parent cdbdec7 commit a6cf760

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/4-bb-export.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,16 @@ jobs:
120120
echo "DEBUG: Raw API Response:"
121121
echo "$response"
122122
123-
# Only try to parse as JSON if we have a response
124-
if [ -n "$response" ]; then
125-
SHEET_NAME=$(echo "$response" | python3 -c "import sys, json; print(json.load(sys.stdin).get('name', ''))" || echo "")
126-
echo "DEBUG: Sheet name: $SHEET_NAME"
127-
else
128-
echo "ERROR: Empty response from API"
129-
exit 1
130-
fi
123+
# Option 1: Using grep and cut
124+
SHEET_NAME=$(echo "$response" | grep -o '"name":"[^"]*"' | cut -d'"' -f4)
125+
126+
# Option 2: Using sed
127+
# SHEET_NAME=$(echo "$response" | sed -n 's/.*"name":"\([^"]*\)".*/\1/p')
128+
129+
# Option 3: Using jq if available
130+
# SHEET_NAME=$(echo "$response" | jq -r '.name')
131+
132+
echo "DEBUG: Retrieved sheet name: $SHEET_NAME"
131133
132134
echo "finishing sheetname ================================================"
133135

0 commit comments

Comments
 (0)