Last active
September 23, 2015 15:31
-
-
Save pjvandehaar/7d71a530abda01b7f11c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Notes: since we're just taking everything, we're not using the information in this comment block. | |
# Note: dialog_partner is no longer reliable as of 2015 Aug 25. | |
# Good columns are: timestamp, convo_id, author, body_xml. | |
# To find the right convo_id, run | |
# $ sqlite3 path/to/main.db | |
# > select datetime(timestamp, 'unixepoch'),convo_id,author from Messages; | |
# > select count(*) from Messages; | |
# > select count(*) from Messages where convo_id = 270; | |
# > select datetime(timestamp, 'unixepoch'),convo_id,author from Messages order by timestamp desc limit 40; | |
# > select datetime(timestamp, 'unixepoch'),convo_id,author from Messages order by timestamp limit 40; | |
# Make sure that plenty of messages are matched. | |
sqlite3 -batch "$(find "$HOME/Library/Application Support/Skype" -name main.db)" <<EOF | |
.mode csv | |
.output skype-chat-backup.csv | |
select datetime(timestamp,'unixepoch'), author, REPLACE(body_xml,CHAR(10),'\n') from Messages order by timestamp; | |
.output stdout | |
.exit | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment