Skip to content

Simple conversion script for using the new Facebook message archive format with existing tools

License

Notifications You must be signed in to change notification settings

landalex/facebook-message-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Facebook Message Converter

There are a few good projects on GitHub for pulling statistics from Facebook message archives, like conversation-analyzer and FacebookChatStatistics, but recent changes to the format of Facebook export archives have broken compatibility. This script allows for conversion from the new JSON message archive format to formats that work with the above tools.

Formats

This script exports in a simple text format used by conversation-analyzer, as well as the JSON format defined by fbchat-archive-parser (used by FacebookChatStatistics).

Usage

$ python3 facebook-message-converter.py --help
usage: facebook-message-converter.py [-h] --in ARCHIVEPATH --out OUTPATH
                                     --format FORMAT

FB Message Archive Converter

optional arguments:
  -h, --help        show this help message and exit
  --in ARCHIVEPATH  Path to JSON archive
  --out OUTPATH     Path to output file
  --format FORMAT   txt or json, for conversation-analyzer or
                    FacebookChatStatistics respectively

Example usage:

# Convert to a json format for FacebookChatStatistics
$ python3 facebook-message-converter.py --in message.json --out converted.json --format json
# Convert to a txt format for conversation-analyzer
$ python3 facebook-message-converter.py --in message.json --out converted.txt --format txt

About

Simple conversion script for using the new Facebook message archive format with existing tools

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages