motschel123 / Mac-Contact-Sync-Obsidian

GNU Affero General Public License v3.0
9 stars 2 forks source link

Errors in syncing addresses #6

Closed bikelanta closed 2 months ago

bikelanta commented 8 months ago

Hello, I've noticed two issues when syncing contacts:

  1. The state in an address is not being included. In my case, this is a US State
  2. If the address doesn't include a street, no details are synced. In some cases, I don't know someone's street, but I know their city and state, so I put those in the contact

Could adjustments be made to fix these?

One remaining suggestion, perhaps add a field that would cause the plugin to run automatically every so many minutes or hours.

Thanks for the plugin.

motschel123 commented 8 months ago

Thanks for the Issue, I'll take a look at it. Could you set up a dummy contact for both problems and send me the exported vCard please.

bikelanta commented 8 months ago

Attached in the zip file are two vCards. One includes a full street address, city, state, and postal code. The other just includes the city, state, and postal code, no address. In both cases, the state does not sync to Obsidian. It does appear that the city and postal code sync for the address that does not include a street. One note, in the US, the postal code comes after city and state, so it would be Atlanta, GA 30306. With the plugin, it's showing postal code then city. Don't know if this is an option you could include, since address formats are globally different.

Archive.zip

motschel123 commented 8 months ago

Thanks for the information and cards. I will check if I can modify the parsing logic depending on the respective country format.

bikelanta commented 8 months ago

Thanks.

motschel123 commented 2 months ago

It took a while but I got around to look at it. Regarding your two issues:

  1. The vCard contact you provided had no State set, when set 'Country or Region' to i.e. Florida, it syncs normal to obsidian.
  2. Syncing contacts without address works for me, please check if the error persists for you. If so, please provide me with the error log by running the command and afterwards opening the developer console by pressing option command i ( ⌥ ⌘ I ). And send me the error you are getting.
  3. I did not look at adaptive address formatting yet

As I could not reproduce the error I will close this Issue for now, feel free to open is again.

bikelanta commented 2 months ago

Thanks for checking into this item. I will check the console if I get further errors and share with you.