- Reset master to upstream/main (16,697 commits) - Overlay 2,271 local-only files (skills, tools, workspace, configs, apps) - Restore IDENTITY.md and USER.md templates - Build verified, gateway running, Discord working Co-Authored-By: Claude Opus 4.6 <[email protected]>
21 lines
529 B
Bash
21 lines
529 B
Bash
#!/bin/bash
|
|
# Parse text content from mcporter Google Sheets output
|
|
# Input: JavaScript object literal from mcporter
|
|
# Output: Plain text content
|
|
|
|
# Read from stdin if no argument, otherwise from file
|
|
INPUT="${1:--}"
|
|
|
|
if [ "$INPUT" = "-" ]; then
|
|
CONTENT=$(cat)
|
|
else
|
|
CONTENT=$(cat "$INPUT")
|
|
fi
|
|
|
|
# Extract text content line by line
|
|
# mcporter outputs: text: 'line1\nline2\n...'
|
|
echo "$CONTENT" | \
|
|
grep -A 9999 "text:" | \
|
|
sed "1s/^.*text: '//; \$s/'.*$//" | \
|
|
sed "s/\\\\n/\n/g; s/' +$//; s/^'//; /^ }$/d; /^ \]$/d"
|