Skip to content

Mutual-Aid-Medford-and-Somerville/google-voice-history

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Google Voice History

Generate a CSV of call and message history from a Google Voice Takeout.

Installing

Download the latest version of src/google_voice_history.py. Currently, the script only requires Python 3.7 or newer, so no further installation is required.

Exporting Google Voice history

  • Go to https://takeout.google.com/

  • Under "Create a New Export", click "Deselect all", select "Voice", and click "Next step"

  • Choose your preferred "Delivery method" and "Frequency"

  • Select ".zip" and "50 GB" for "File type & size"

  • Click "Create export"

  • Wait for the export to complete, then download the .zip file

    • NOTE: It's not necesssary to unzip this file

The downloaded .zip file contains call history and text messages as .html files, plus .mp3 files of voicemails. See the tests directory for an example.

Generating a CSV

Run the script with the path to the downloaded .zip file, saving the output to a .csv file:

$ python google_voice_history.py takeout.zip > google_voice_history.csv

This will parse the call and text history from the .html files without extracting them. See tests/history.csv for an example.

To see detailed usage and a description of the columns in the CSV, run:

$ python google_voice_history.py -h

Currently, the CSV does not include phone numbers; instead, it includes a unique ID generated by the script. In the future, there could be an option to specify which columns to include/exclude.

Developing

Set up your development environment:

  • Fork and clone this repository

  • Create and activate a virtual environment

  • Install the packages required for development:

    $ python -m pip install -U setuptools pip wheel
    
    $ python -m pip install -e .[dev]
    

    This will install:

Run the tests:

$ pytest

Format the code and run the checks:

$ invoke format

$ invoke check

About

Generate a CSV of call and message history from a Google Voice Takeout

Resources

License

Stars

Watchers

Forks