dgelessus / python-typedstream Goto Github PK
View Code? Open in Web Editor NEWA pure Python, cross-platform library/tool for reading Mac OS X and NeXTSTEP typedstream files
License: GNU General Public License v3.0
A pure Python, cross-platform library/tool for reading Mac OS X and NeXTSTEP typedstream files
License: GNU General Public License v3.0
Once you have decoded a typestream, how do you access content (ie. "bar")?
foo = typedstream.unarchive_from_file("typedstream")
# <-- What comes here?
type b'@': object of class NSMutableAttributedString v0, extends NSAttributedString v0, extends NSObject v0:
super object: <NSObject>
type b'@': NSMutableString('bar')
Thanks for this great library. Added support for NSURL in a personal project. See diff below - don't care about credit happy to just move this forward.
@archiving.archived_class
class NSURL(NSObject):
value: str
def _init_from_unarchiver_(self, unarchiver: archiving.Unarchiver, class_version: int) -> None:
if class_version != 0:
raise ValueError(f"Unsuppored version: {class_version}")
# unk flag
unarchiver.decode_value_of_type(b"c")
# URL string
_nsstr_rep = unarchiver.decode_value_of_type(b"@")
self.value = _nsstr_rep.value
def __repr__(self) -> str:
return f"{type(self).__name__}({self.value!r})"
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.