Skip to content

Instantly share code, notes, and snippets.

Created August 9, 2015 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0b37a0df0a24157e1991 to your computer and use it in GitHub Desktop.
Save anonymous/0b37a0df0a24157e1991 to your computer and use it in GitHub Desktop.
# Terminalで一気に
echo "update ThreadInfo set threadStatus=2 where threadStatus=6 and isDatOchi=1;" | sqlite3 "$HOME/Library/Application Support/BathyScaphe/BathyScaphe.db"
# Automator 前スクリプト
echo "select threadName, threadID, boardID from ThreadInfo where threadStatus=6 and isDatOchi=1;" | sqlite3 "$HOME/Library/Application Support/BathyScaphe/BathyScaphe.db" | sed -e 's/\|/ /g'
# Automator 後スクリプト
ps xaw | grep 'BathyScaphe.app' | grep -v grep > /dev/null && exit 1
awk '{ if( NF > 2 ) printf "update ThreadInfo set threadStatus=2 where boardID=%d and threadID=%d;\n", $NF, $(NF-1) }' | sqlite3 "$HOME/Library/Application Support/BathyScaphe/BathyScaphe.db"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment