Git Product home page Git Product logo

signal-media-exporter's People

Contributors

idealchain avatar kir0ul avatar nahoj avatar rudolfbyker avatar watercrossing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

signal-media-exporter's Issues

malformed database

Hi,

signal-media-exporter fails with Version 6.30.1 of signa-desktop:

$ python -m signal_media_exporter
2023-09-10 11:15:39 CRITICAL DatabaseError "malformed database schema (messages_on_insert_insert_mentions) - near ">>": syntax error" - please check the database and the sqlcipher parameters!
Exporting... |████████████████████████████████████████| 0 in 0.1s (0.00/s)
2023-09-10 11:15:40 ERROR No media messages found.
$ apt show signal-desktop
Package: signal-desktop
Version: 6.30.1
[...]

Perhaps there is a relation with this bugreport.

Stories: Not all media files are exported

Signal has implemented a story feature some time ago. Exporting the pictures and videos of a story only "half-works": some are exported, some are not.

The reason is that within the database, Signal Desktop represents every single attachment that belongs to a story as a separate message. Now, if there is a story published with multiple media files, all these messages have the sent-timestamp within the same second, get assigned the same filename and all but the first file are skipped for export. I guess the problem is the assumption that not more than one media message is sent from a contact per second.

There are some options, but they have to be considered carefully:

  • Change the file naming scheme
    • this could break backward compatibility for deduplication
    • could also fix the somewhat rare edge case that multiple normal media messages are sent per second
  • Identify messages belonging to a single story and export them with increasing numbers
    • can they be reliably identified and do they have a reproduceable order?
    • this would be similar to how multiple attachments in a normal message are handled

Export voice notes

Are voice notes not considered media in signal? I see that these audio clips are not included under "media" in the signal app, nor are they exported by this project. I would love to be able to export all audio clips from a chat.

Media files are stored encrypted

Since v7.18.0, a new storage system is in place. It keeps the attachments encrypted on disk, which are then copied 1:1 by the script and quite useless.

If feasible, the script needs to be updated to decrypt on export.

Groups

Is it possible to group files not just by sender, but also or alternatively by the group in which they were sent?

safeStorage API: DB encryption key can be encrypted

From 7.16.0 on, Signal Desktop implemented the electron safeStorage API (commit: signalapp/Signal-Desktop@e87eaff, issue: signalapp/Signal-Desktop#6944) to encrypt the local DB encryption key in ~/.config/Signal/config.json. If a keyring is available and unlocked on startup, the unencrypted legacy key is replaced with an encrypted one.

If possible, the script could be extended to access the keyring. Meanwhile, as long as the key is not yet migrated, the keyring system can be kept disabled or Signal desktop can be started with the --pasword-store=basic argument.

Option to remove media

It would be great to not only export media, but also have an option to remove the media from signal in order to decrease the attachment file.

Cannot run exporter, database not found (I think?)

Whenever I try to run the exporter, both through standard pip and pipenv, I get the same issue:

2019-09-22 15:03:06 ██████ __main__[72005] INFO Read sqlcipher key: 0x████████████████████████████████████████████████████████████████
2019-09-22 15:03:06 ██████ __main__[72005] INFO Connected to sql/db.sqlite, reading messages...
Traceback (most recent call last):
  File "export.py", line 193, in <module>
    msgs = get_messages(config, key)
  File "export.py", line 49, in get_messages
    """)
pysqlcipher3.dbapi2.DatabaseError: file is not a database

(Note I have redacted some potentially personal information an replaced it with blocks).

I am assuming I need to correct the path to the database, but where do I do that?

Thanks!

Crash with senders with undisclosed number

Hello and thanks for the great work

There is new feature which allows signal users to hide their phone number. They can give a pseudonym instead.
That made the media exporter crashing for me.
Also for some reason, one single contact of mine gives None value as "sender", but his number appears in "source" field of the msg.

So I added below patch in main.py line 113 :

    if sender is None:
        if 'source' in msg:
            sender=msg['source']
        else:
            sender = 'Unknown sender'

and that fixed both issues for me.
It would be neater to get the actual pseudonym from the DB, instead of "unknown sender", but that's sufficient for my use.

regards

Error file is not a database

Sorry, the issue was linked to other chat export (not this one)
I am using signal on windows 10 x64. Installed all dependencies correctly and when I run the script following error comes up. Also when I try to open sql/db.sqlite in sqlite browser same error comes up. Probably, the database is encrypted with some extra level of security in latest desktop app version and that is why it is not being supported.

Traceback (most recent call last): File "../scab.py", line 41, in <module> c.execute("SELECT json, id, name, profileName, type, members FROM conversations") pysqlcipher3.dbapi2.DatabaseError: file is not a database

Export conversations

Hi. I think I would be very useful if the script was able to export the text contents of conversations in a readable format in addition to the media. It could be HTML or the "SMS Backup & Restore" XML format like signal-back was supposed to do.

Would you be interested in developing this? How difficult to you think it would be? It looks to me like you did the tricky work of opening the database and it would just be a matter of exporting the available data in the desired format. If that is the case, I might be interested in contributing it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.