deno.land/x/ichat
A Deno module for parsing macOS *.ichat archives.
Status
This module is just a prototype, reversed engineered with the help of the deno.land/x/bplist_parser module. Further, this has only been anecdotally tested using ichat files from my machine. Thereās probably some bugs I havenāt caught. Please report them if you find them.
Examples
// You should @version this import
import { parseBuffer } from "https://deno.land/x/ichat/mod.ts";
const file = await Deno.readFile("./path/to/file.ichat");
const ichat = parseBuffer(file);Command line
To parse ichat archives from the command line, you can deno install the
bin/ichat_json.ts script:
deno install --allow-read --allow-write https://deno.land/x/ichat/bin/ichat_json.tsThis will install the script as the ichat_json command. The name of the
installed command can be customized with the --name/-n flag. See deno install --help for more info.
Usage
The following will extract messages from ./messages.ichat and print the output
JSON to the command line. Message attachments will be ignored.
ichat_json messages.ichatThe following will store the messages into ./messages.json with attachments
saved to the ./attachments folder.
ichat_json messages.ichat -o messages.json -a attachmentsSee ichat_json --help for more usage information.
Contributing
Contributions of any kind are welcome, just open a GitHub issue.
Iām currently looking for data-rich, well-known ichat archives to use as test data. If you have some youāre willing to provide or know of some on the internet somewhere, please let me know.