mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-02-04 02:44:43 -05:00
21 lines
497 B
Bash
Executable File
21 lines
497 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
# Clear today's verse from daily_verses table
|
|
DB_PATH="dev.db"
|
|
TODAY=$(date +%Y-%m-%d)
|
|
|
|
echo "Deleting verse for date: $TODAY"
|
|
|
|
sqlite3 "$DB_PATH" "DELETE FROM daily_verses WHERE date = '$TODAY';"
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "✓ Successfully deleted verse for $TODAY"
|
|
|
|
# Show remaining verses in table
|
|
COUNT=$(sqlite3 "$DB_PATH" "SELECT COUNT(*) FROM daily_verses;")
|
|
echo "Remaining verses in database: $COUNT"
|
|
else
|
|
echo "✗ Failed to delete verse"
|
|
exit 1
|
|
fi
|