/mbox-to-json

A small package that converts MBOX files to JSON(or CSV). Also includes functionality to extract attachments.

Primary LanguagePythonMIT LicenseMIT

Open in Visual Studio Code

Prakhar Sharma - LinkedIn
Adrita Bhattacharya - LinkedIn

MBOX to JSON

A command line tool to convert MBOX file to JSON.
Explore the docs » (Currently NA)

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. License
  6. Contact

About The Project

A small package that converts MBOX files to JSON. Also includes functionality to extract attachments.

(back to top)

Built With

(back to top)

Getting Started

There are 2 ways to install this tool.

Prerequisites

Make sure you upgrade pip before moving on.
All the required dependencies are in requirements.txt which would be installed at the time of running the setup.

pip install --upgrade pip

1. Install from PyPI

pip install mbox-to-json

2. Install from GitHub

  1. Download the repository as zip. Unzip.

  2. cd to the repository folder

  3. Run this command

    pip install .

(back to top)

Usage

  • Help Function

    mbox-to-json -h
  • Most basic conversion from MBOX to JSON. Just provide the file path. Output JSON file would be in the same location as the input file.

    mbox-to-json /Users/prakhar/downloads/random_file.mbox
  • Use -a flag to extract attachments. The files would be available in input_file_directory/attachments

    mbox-to-json /Users/prakhar/downloads/random_file.mbox -a
  • Use -c flag to convert to CSV insted of JSON. Output CSV file would be in the same location as the input file.

    mbox-to-json /Users/prakhar/downloads/random_file.mbox -c
  • Use -o to specify the output file location. Make sure to provide the file name too, with the extension JSON (or CSV)

    mbox-to-json /Users/prakhar/downloads/random_file.mbox -o /Users/prakhar/downloads/random_output.json

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • TBA

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

LinkedIn - Prakhar Sharma, Adrita Bhattacharya

Github - PS1607, adritabhattacharya

Google Developer - PS1607

(back to top)