-
Notifications
You must be signed in to change notification settings - Fork 164
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
Question/Feature request: Sync/merge contacts from a Google/iCloud .vcf export/backup #1056
Comments
Following docs: config.html?highlight=singlefile#google, and searching for CardDAV, I see
Is presume the docs refer to Google Contacts CardDAV API, also known as
Is the |
We use the CardDav API: https://developers.google.com/people/carddav I think that if you had configured something wrong you'd be getting an error, so I don't think you've picked the wrong choice. Does |
Thank you for your feedback. I'm going to reproduce the issue and post the errors I see. As alternative to the Google People API CarDAV integration, when the integration doesn't work, I was proposing to support the alternative to sync from a backup file (export) in either |
Running with
This has been executed in a virtualenv:
While
|
Trying to make it sync with Google Contacts didn't work for me. I'm focused on trying to make it work with |
Looks to me like the real issue for Google - Local storage to work is documented by #975. As this issue is not currently fixed, I wonder what you think of the alternative to use the file backup as |
Does anyone knows what the following code in path = os.path.abspath(expand_path(path))
try:
path_glob = path % "*"
except TypeError:
# If not exactly one '%s' is present, we cannot discover
# collections because we wouldn't know which name to assign.
raise NotImplementedError
|
@azbarcea A storage can have many collections:
You can sync a caldav storage (aka account, which can have multiple calendars) to a singlefile storage (each calendar is one file). |
In short, and maybe this is the real issue, on Going to your reply, I presume the purpose of this was to validate that
True. A
The goal is indeed to sync the directory structure:
Now, maybe there is a problem with Now, with a configuration like:
It will extract the For
maybe should have been:
A more generic example to understand/play with from pathlib import Path
# Assume that path is a string representing a file path or pattern
path_str = "/path/to/my/files/*.txt"
# Convert path_str into a Path object
path = Path(path_str)
# Check if path is a valid path
if path.is_absolute() or path.is_relative_to(Path.cwd()):
# Use glob to search for files that match the specified pattern
for file_path in path.glob('*'):
# Do something with each file_path here
print(file_path)
else:
print("Invalid path:", path_str) As conclusion, the way the PR (#1064) is proposed, per my understanding, satisfies 100% the constraints/requirements you have mentioned above. Because Any guideline is much appreciated! |
I'm looking to find out if import/sync can be done between a unified
.vcf
file obtained as export/backup from Google/iCloud/etc.I presume the
singlefile
storage type was created for this, but using a config file:~/.config/vdirsyncer/config
:Having output:
vdirsyncer
version:0.19.1
Server: iCloud/Google export/backup as
.vcf
Python version:
3.10.10
OS:
arch
The text was updated successfully, but these errors were encountered: