Google Voice exports its text messages in an HTML format, one HTML file per day of messages. This format can be extremely inconvenient for viewing an entire texting history. This script addresses this issue by stripping out all relevant text message data from these HTML files, formatting it, and compiling it into one continuous texting history file, saved as a single TXT file.
To use this script effectively:
- Export Text message history from Google Voice.
- Unzip the downloaded file.
- Navigate to the
Takeout/Voice/Callsfolder. - Filter by Text Messages only (e.g.,
ls *Text*.html). - Identify the Phone Number or Contact Name of interest (e.g.,
ls *Tom*Text*.html). - Create a new directory for sorting.
- Copy (do not move) the relevant files to the new directory (e.g.,
cp *Tom*Text*.html NewFolder). - The script can be executed from another location. To process the files in your new directory, navigate to that directory in the terminal so that it is your current working directory. Then, run the script by specifying its path. For example, if your script is in the parent directory, you would use
../google-voice-texts-converter.sh. - Execute the script. It will find every HTML file in the current working directory, compile the data in chronological order, and save it to
compiled_texts_{timestamp}.txt. - You can then safely move the
compiled_texts_{timestamp}.txtfile to a different location and delete the newly created folder and its contents.
Ensure that your Linux environment has the following tools installed:
- sed
- grep
- cut
- cat
This script is currently compatible with the Google Voice export format as of 2024-02-11. If future versions of Google Voice change their export format, the script may require adjustments.
Code Correct
2024-02-12