- Add text cleaning to remove page reference numbers (e.g., "10After" -> "After") - Implement cleanHighlightText() function with boundary detection - Add NickelMenu configuration for UI integration - Create sync wrapper scripts (with and without FBInk notifications) - Add installation guides for Kobo deployment - Include pointer/slice explanation examples for learning Features: - Extracts highlights from Kobo SQLite database - Cleans page references from academic texts - Computes SHA-256 hashes for deduplication - POSTs JSON to Flask API endpoint - Supports ARM static linking for Kobo hardware - Optional FBInk notifications for user feedback 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
763 B
Bash
27 lines
763 B
Bash
#!/bin/sh
|
|
# Sync Kobo highlights to home server
|
|
# Place at: /usr/local/bin/sync_highlights.sh
|
|
|
|
DB="/mnt/onboard/.kobo/KoboReader.sqlite"
|
|
ENDPOINT="http://192.168.88.69:42070/api/highlights"
|
|
LOGFILE="/mnt/onboard/.adds/kb_exfiltrator.log"
|
|
|
|
# Create log directory if needed
|
|
mkdir -p /mnt/onboard/.adds
|
|
|
|
# Log with timestamp
|
|
echo "=== $(date) ===" >> "$LOGFILE"
|
|
|
|
# Run exfiltrator and capture output
|
|
if /usr/local/bin/kb_exfiltrator "$DB" "$ENDPOINT" >> "$LOGFILE" 2>&1; then
|
|
# Success
|
|
echo "Success: Highlights synced!" >> "$LOGFILE"
|
|
# Optional: Show a notification (requires FBInk or similar)
|
|
# fbink -g file=success.png
|
|
exit 0
|
|
else
|
|
# Failure
|
|
echo "Error: Sync failed. Check log at .adds/kb_exfiltrator.log" >> "$LOGFILE"
|
|
exit 1
|
|
fi
|