Metadata-Version: 2.1
Name: catplist
Version: 0.0.5
Summary: Print apple plist files in a readable and comprehensible way
Home-page: https://github.com/yoshtec/catplist
Author: Yoshtec
Author-email: yoshtec@gmail.com
License: UNKNOWN
Keywords: plist,apple,cat,metadata
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Console
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: OS Independent
Requires-Python: >=3.5
Description-Content-Type: text/markdown
License-File: LICENSE

# catplist

`catplist` is a small python utility to print apple plists 
([Information Property List](https://developer.apple.com/documentation/bundleresources/information_property_list/)) 
in a readable and comprehensible manner.

## Rationale

While `plistutil` exists to convert plists from binary to xml and vice versa plists are usually still hard to 
read for humans or parse from the command line with tools like grep. `catplist` aims to make this task easier.
It's main focus is to print a **human-readable** and parsable representation of the plist. Additionally, plists
often contain binary data, or some strange nested key value structures originating from 
[NSArchiver](https://developer.apple.com/documentation/foundation/nsarchiver)
or [NSKeyedArchiver](https://developer.apple.com/documentation/foundation/nskeyedarchiver) serialization. 
`catplist` aims to deliver a good readable representation by unwrapping those structures. 

Try it on some Metadata out of your iPhone Photo library like `*.albummetadata`, `*.memorymetadata`, `*.facemetadata`, 
`*.foldermetadata` or just regular `*.plist` files. 

For editing and more accurate/original representation of plists or search for PlistBuddy, XCode, plutil. 

## Features

* wildcard support 
* recurse into directories with option `--recurse`
* reads binary and xml plists
* NSKeyedArchiver: unpacks NSKeyedArchiver plists that just add an layer of indirectness into the key value store. 
* Nested plists: in some plists apple stores plist as a value. `catplist` unwraps those nested plists.
* Interpretation of some of Binary Data stored within plists, usually consisting of:
  * UUID data
  * xz compressed data
  * binary plists
  
## Usage

```
catplist myplist.plist
```

```
> catplist --help
Usage: catplist [OPTIONS] [FILE]...

  This is catplist: print plists for human reading and easy grepping.

Options:
  -R, --raw                   print raw plist contents, will not unpack nested
                              data & plists
  -r, --recurse               recurse into subdirs, reads all files ignores non
                              plist files
  -f, --format [python|json]  format output in
  --help                      Show this message and exit.

```

## Install

Installation via PyPi:
```
pip install catplist
```


## Known Bugs
* valid plists with a date in year 0 will not be read since the underlying python 
  datetime implementation is currently not allowing year 0 dates. 
  See also [Python Issue 41083](https://bugs.python.org/issue41083)

