Read skype message archive

前端 未结 5 992
深忆病人
深忆病人 2020-12-08 07:56

I would like to read my skype message archive outside of the Skype app. And be able to export it in some sort (other than copy-paste it from my messages) as far i can figure

5条回答
  •  旧巷少年郎
    2020-12-08 08:22

    C'mon now, this is Stackoverflow, let's get technical, shall we? Let's put away childish jpegs, gui tools, and spreadsheet psuedocode and get to the heart of the problem!

    [fist bump]

    Source: https://coolaj86.com/articles/searching-skypes-sqlite-database/

    Find your Skype DB

    First you've got to find the correct skype db for your user:

    ls ~/Library/Application\ Support/Skype/
    
    sqlite3 ~/Library/Application\ Support/Skype/<>/main.db
    

    Learn them Tables Good!

    You'll want to take a look at the available tables, and their descriptions:

    .tables          " see the short table list
    .schema Contacts " all about the Contacts table
    .schema Messages " all about the Messages table
    

    You'll probably need to use the good ol' ctrl+f to search in the output for things like time, author, and username.

    Dive into the SQLs

    Then you gotsta dive into the SQLs...

    " List the 25 most recently contacted contacts
    SELECT skypename, lastused_timestamp FROM Contacts ORDER BY lastused_timestamp DESC LIMIT 25;
    
    " List the 100 most recent messages
    SELECT id, convo_id, timestamp, type, author, body_xml FROM Messages ORDER BY timestamp DESC LIMIT 100;
    
    " List the 100 most recent conversations (and all participants)
    SELECT last_activity_timestamp, identity, type, given_displayname, displayname FROM Conversations ORDER BY last_activity_timestamp DESC LIMIT 100;
    
    " Search for a message with the text 'home'
    SELECT author, body_xml FROM Messages WHERE body_xml LIKE '%HOME%' ORDER BY timestamp ASC;
    
    " Search for a contact named 'john'
    SELECT (displayname || ' : ' || skypename || ' : ' || fullname) as names FROM Contacts WHERE names LIKE '%JOHN%' ORDER BY lastused_timestamp ASC;
    

    (note comments are with a ", not a #)

    Note that

    • Messages refers to a line of text such as "What's up?"
    • Conversations refers to a collection of Messages between 2 or more parties.
    • I think Chats refers to the logical time gaps separated with labels like 'yesterday', '7 days ago', 'March 24th', etc

提交回复
热议问题