forked from calyptecc/gvoice-sms-takeout-xml
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more script improvements and README explanations #2
Open
wjcarpenter
wants to merge
17
commits into
karlrees:master
Choose a base branch
from
wjcarpenter:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Two techniques are used to deal with the several edge cases where it's impossible to figure out the contact phone number for an SMS/MMS. First, we notice name to number mappings as we encounter them along the way, so we might be able to figure it out automatically. Second, if we can't figure it out, we emit a message asking the user to add an entry to a JSON file and re-run until everything is accounted for. If we didn't deal with those edge cases, it would be possible to see SMS/MMS messages either mapped to the number "0" or without any number at all (which will show up as something like "Unknown caller") instead of being mapped to the correct contact. SMS Backup and Restore is pretty good at duplicate detection, but if you make a mistake and have things ending up in "0" or "Unknown caller", delete those entire SMS/MMS conversations from your phone, fix up your run of this script, and restore again. Otherwise, a lot of MMS attachments will be detected as duplicates and will never restore properly. (I had 300-400 of those out of 25,000 SMS/MMS messages, and it was a big puzzle to figure it out.)
Account for various edge cases where the contact phone number is missing
* work in progress * work in progress * formatting * work in progress * work in progress * work in progress * work in progress * work in progress * work in progress * with open(), and refactor out several globals * treat 'Me' contact as less of a special case * simplify for loops * command line arguments * wordsmithing --------- Co-authored-by: WJCarpenter <[email protected]>
* cleanups * test data --------- Co-authored-by: WJCarpenter <[email protected]>
* typo in test data file * typo in test data file * voicemail records in call history now 'missed' * typo in test data file * MMS XML nesting was messed up * fix over-parsing of the SMS/MMS text elements * sort out MMS sender --------- Co-authored-by: WJCarpenter <[email protected]>
* typo in test data file * typo in test data file * voicemail records in call history now 'missed' * typo in test data file * MMS XML nesting was messed up * fix over-parsing of the SMS/MMS text elements * sort out MMS sender * os.path.join --------- Co-authored-by: WJCarpenter <[email protected]>
* how to use the test data with your own phone * how to use the test data with your own phone * timestamp conversions ignored TZ --------- Co-authored-by: WJCarpenter <[email protected]>
* how to use the test data with your own phone * how to use the test data with your own phone * timestamp conversions ignored TZ * fix link to archive browser --------- Co-authored-by: WJCarpenter <[email protected]>
Co-authored-by: WJCarpenter <[email protected]>
* prepare for Google Chat by implementing number policies * number to name is now 1-N * NANP heuristics * add iso date to timestamped tuples for the timestamped contact names (to be more readable in dump) * give up on archive browser; too tedious to edit * Google Chat test data (wihout attachments right now) * ignore test_data/contacts.json * remove final comma * chat processing all good, except for maybe bugs for special cases :-) * fake JPG and PNG images in test data * examples from Google Chat * wordsmithing --------- Co-authored-by: WJCarpenter <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tidied up some file manipulation stuff in the script and also put some "HOWTO" instructions in the README.