-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_export.sh
More file actions
executable file
·48 lines (37 loc) · 1.32 KB
/
test_export.sh
File metadata and controls
executable file
·48 lines (37 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
# Test script for conversation export functionality
set -e
# Find a real session file
SESSION_FILE=$(find ~/.claude/projects -name "*.jsonl" -type f | head -1)
if [ -z "$SESSION_FILE" ]; then
echo "No session files found in ~/.claude/projects"
exit 1
fi
# Extract session ID from filename
SESSION_ID=$(basename "$SESSION_FILE" .jsonl)
echo "Testing conversation export with session: $SESSION_ID"
echo "Session file: $SESSION_FILE"
echo
# Create output directory
mkdir -p /tmp/ccboard-export-test
# Test Markdown export
echo "==> Testing Markdown export..."
cargo run --quiet --bin ccboard -- export "$SESSION_ID" -o /tmp/ccboard-export-test/conversation.md -f markdown 2>&1 | tail -5
echo
# Test JSON export
echo "==> Testing JSON export..."
cargo run --quiet --bin ccboard -- export "$SESSION_ID" -o /tmp/ccboard-export-test/conversation.json -f json 2>&1 | tail -5
echo
# Test HTML export
echo "==> Testing HTML export..."
cargo run --quiet --bin ccboard -- export "$SESSION_ID" -o /tmp/ccboard-export-test/conversation.html -f html 2>&1 | tail -5
echo
# Show file sizes
echo "==> Export results:"
ls -lh /tmp/ccboard-export-test/
# Open HTML in browser (macOS)
if [[ "$OSTYPE" == "darwin"* ]]; then
echo
echo "Opening HTML export in browser..."
open /tmp/ccboard-export-test/conversation.html
fi