dgelessus / python-typedstream

A pure Python, cross-platform library/tool for reading Mac OS X and NeXTSTEP typedstream files
GNU General Public License v3.0
22 stars 3 forks source link

Maybe time to release? #3

Closed jpangburn closed 1 year ago

jpangburn commented 1 year ago

While this thing could use some more instructions, if you can figure out how to use it- it does work pretty well as is. This issue is just a suggestion to make it available via pip. Don't let perfect be the enemy of good enough :-) And thank you for making this, very useful for parsing some data fields in MacOS messages sqlite database.

dgelessus commented 1 year ago

Thank you for the encouraging words, happy to hear that it's useful :)

Yeah, I've been meaning to release this for a while, but never got around to it. Perhaps I'll get it done sometime this week.

jpangburn commented 1 year ago

It's super useful. Without this, there's no clean way in Python to read the content of new text messages in the iMessage sqlite database in MacOS. You'd have to do some hacky byte array splitting rather than a true parse of the typed stream data structure. I'm sure you have tons of other higher priority things to do, but you've clearly put some significant time in already to reverse engineer that stuff- would be nice to have it out there.

Anyone playing around with the iMessage database in the future will want this because Apple broke the old plain text field that developers used to read, and moved it into a typed stream field along with some other stuff so that users could delete messages they had sent. All well and good, but now this library you made is relevant for anyone trying to use that db.

tagatac commented 1 year ago

Heavy plus! I'm using this code heavily in https://github.com/tagatac/bagoup since Mac OS 13.

The goal is eventually to implement it in Go for better performance, but this project has already done the hard work of reverse engineering 👏

dgelessus commented 1 year ago

It is done, finally. Thank you for your patience 🙂 https://pypi.org/project/pytypedstream/

I had to rename the package from "typedstream" to "pytypedstream", because there's already a package called "typed-stream" on PyPI, so it wouldn't let me choose a similar name. The actual Python module/package is still called typedstream though, so you only need to change the dependency name and nothing else.

The version is 0.1.0 for now, but I expect the API to stay relatively stable. The decoded data structures might change a bit as I figure more stuff out.

By the way, let me know if I can do anything to make the library/tool easier to use. Otherwise, have fun decoding your iMessages now 🙂

jpangburn commented 1 year ago

Thank you! Much appreciated! I use it to hook up GPT to iMessage so when scammers are looking for a sucker, I just let them chat all they want with GPT thanks to your decoder 😊