Last active
April 14, 2026 20:27
-
-
Save iarp/37ecf7bc6690d95e1d95643d38c0da76 to your computer and use it in GitHub Desktop.
When moving from android to iphone and keeping Nextcloud as my calendar and contacts sync, hundreds of contacts would not sync.
This file contains hidden or 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
| import pathlib | |
| # pip install vobject | |
| import vobject | |
| input_file = pathlib.Path("cache/contacts-bad.vcf") | |
| output_file = pathlib.Path("cache/contacts-fixed.vcf") | |
| with input_file.open() as input_fo, output_file.open('w', newline="") as output_fw: | |
| for item in vobject.readComponents(input_fo): | |
| output_fw.write(item.serialize()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment