Code Monkey home page Code Monkey logo

gcontactsync's Introduction

gcontactsync

Synchronizes contacts & groups between Thunderbird or SeaMonkey and Google Contacts. Imports Facebook friends and more.

gcontactsync's People

Contributors

jdgeenen avatar jobisoft avatar zanonmark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gcontactsync's Issues

Implement log rotation

Need to implement log rotation for debugging issues that happened before Thunderbird was restarted. At least 1 backup would help tremendously.

Add access keys to dialogs

Need access keys for the new account setup wizard, the preferences, and a few things in the edit accounts dialog.

New anniversaries in TB are not synchronized to Google.\

There's a bug in setValue under the EVENT type that causes gContactSync to not set new anniversaries in Google contacts. It shows up with this message in the log:

***WARNING: Error in GContact.setValue:
ReferenceError: parentElem is not defined

Support incremental sync

Use an incremental/fast sync when possible to save time and memory. This will require some journaling since I don't know of a way to identify deleted contacts in TB. The AB listener would need to insert a row with the deleted ID (needs to support multiple sync sources, maybe a JSON object with key/value pairs?) and the date it was deleted in an sqlite db. Add cleanup of sqlite tables for deleted ABs to the preferences.

Use min-updated, showdeleted, and requirealldeleted. If it returns a 410 fall back to a slow sync. https://developers.google.com/google-apps/contacts/v3/reference#Parameters

To handle the case where gContactSync is disabled and a contact was deleted, a fast sync should verify the number of contacts match at the end. If not fall back to a slow sync.

Fully remove support for unsupported import sources

Plaxo and MySpace completely dropped their APIs without any announcements that I can find.

They should be fully removed from Overlay.xul, the DTDs, and Import.js.
If possible update the website with a useful error.

Support plugins

From: http://pirules.org/forum/index.php/topic,589.0.html

Hey Josh,

I'm creating a new thread for this Feature Request to make it easier to track, and will incorporate everything from the thread it originated from.

Ok, so this is a feature request to make gContactSync capable of syncing to a standard file format - like JSON, a custom XML format, or even LDIF or VCF - and then extending that capability to be able to sync to non-google/privately hosted local and/or remote filesystems, ie, local/networked locations, and remote filesystems using something like WebDAV and FTP.

The first part would be selecting and defining the most robust, stable file format for storing the sync'd data itself.

Next, allow for the ability to sync to this format via any one of multiple 'account type' plugins.

For testing purposes, you could maybe start off with one: WebDAV - which I think is what you were basically describing in the original thread, using Apache+PHP+MySQL.

I think simply supporting the generic WebDAV protocol is the best, then the back end can be implemented using whatever tools the user wants - in your case, Apache+PHP+MySQL, but someone else for example could use lighttpd and PostgreSQL.

I'd also like to support for local network syncing via a local/network filesystem path (ie, on Windows, you'd need to support UNC style "\server\share" paths as well as plain drive letters (whether local or mapped drives (UNC paths mapped to drive letters - then however linux does this too), but if you don't want to do this part, as long as this could be implemented via a plugin, that would be awesome.

Then you (or anyone else with the coding skills) could start adding support for new account types - ie, FTP, Google Drive, etc, as time (and motivation) permitted...

As always, Josh, thanks for gContactSync, and thanks for considering new features like this one!

Charles

Create a button to reset gContactSync

Multiple users have requested a way to "reset" gContactSync and start over. The advanced preferences tab would be a good place for this button.

This would have to:

  1. Delete all gContactSync auth tokens
  2. Reset all preferences
  3. Clear custom AB preferences

Only upload photos if the photo actually changed

gContactSync currently updates contact photos if the contact has changed. It should be possible to use the etag to determine if the TB photo is outdated and the timestamp on the TB contact photo file to determine if the remote photo is out of date.

A few users have commented that gContactSync replaces HD photos with lower quality photos. This should help with that issue since the API must limit the size or quality of uploaded photos...

Add an option to only sync contacts with e-mail addresses

Suggestion from Bartek:

As a suggestion to further improve the addon: consider adding an option in the settings not to sync contacts without an email address. That would avoid the ugliness of dummy email addresses. I really don't need contacts without email addresses in Thunderbird, but I have lots of those because my phone syncs with Google.

Invalid rel value on gContact:website when changing website type

I received a log from someone who got the following error:
[Line 1, Column 2654, element gContact:website] Invalid value for attribute : 'rel'

The element that causes the error looks like this:
<gContact:website xmlns:gContact="http://schemas.google.com/contact/2008" href="http://www.google.com" rel="http://schemas.google.com/g/2005#home"/>

Valid rel values are listed here (shouldn't include the schemas URI):
https://developers.google.com/google-apps/contacts/v3/reference#gcWebsite

"null" stripped out of contacts and groups

com.gContactSync.serialize has a bug where it will globally replace "null" with "".
This can cause errors like the following, or delete 4 letters unexpectedly:
Referenced group doesn't belong to the same user. Should be: 'nullXYZ'. Is: 'XYZ'
Please report this error to gcontactsync at pirules.org (in English, if possible)

Only update contact if synchonized data actually changed

gContactSync always uploads contacts to Google if the TB contact was updated, even if there is no actual change to the contact (if an unsynchronized attribute changed, for example). This contributes to 503/over quota errors.

Warning when auto sync tries to set a custom label

Custom labels aren't working on scheduled syncs (setTimeout vs manually syncing has different behavior for "this"). This typically won't cause any issues since gContactSync doesn't allow setting a custom label from TB but produces a warning and is a potential bug (create a website with a custom label from Google, sync, remove website from TB, sync, add a website to the same field and keep the custom label, sync, label doesn't match).

**WARNING: Error in GContact.setValue:
TypeError: this.mCurrentElement is undefined

***WARNING: Error updating card after being removed:

***WARNING: Error updating card after being removed: [xpconnect wrapped nsIAbCard] moz-abmdbdirectory://abook-1.mab/MailList2 1406944015.486 Error Message: Invalid directory supplied to the AddressBook constructor

Do not POST or PUT contacts with no fields set

Trying to POST or PUT a contact with no fields set results in the following:

***ERROR: Error while adding contact
Error Message:
Entry does not have any fields set

To recreate:

  1. Create a contact in Google with no synchronized fields set (such as Internet Call).
  2. Sync
  3. Right-click the AB and click on Replace to server
  4. Sync

Accounts.saveSelectedAccount doesn't reset if username or groups option changes

gContactSync needs to reset the address book when the groups and contacts to synchronize changes. There's code that does this but it isn't working properly because the AB prefs are being saved with the new values before being checked.

For example, the following sequence will cause gCS to prompt the user to delete all contacts outside of "My Contacts"

  1. Sync All Contacts and Groups
  2. Switch to My Contacts. Next sync will prompt the user to delete from TB all contacts outside My Contacts.
  3. Switch back to all. Next sync will prompt the user to delete from Google all contacts outside My Contacts.

Improve people fields

People fields should link to other contacts in the contact details pane
Provide autocompletion or a menu of some kind to choose an existing contact in the edit contact dialog.

Switch to OAuth

ClientLogin is obsolete and will no longer work in 2015, so v0.5 will switch to OAuth for authentication. Google can provide a long-term token.

Last modified date warning if a new TB contact has a photo

If a new TB contact has a photo when gCS is adding the contact the following warning will be logged:

John Doe
***WARNING: Unable to get last modified date from a contact:
TypeError: this.xml.getElementsByTagName(...)[0] is undefined

As far as I can tell this is harmless since 1 will be returned which is certainly older than any contact photo. I'd still like to fix it by returning 0 if there is no LMD.

Create an initial setup wizard

I've received comments that gContactSync is not very easy to setup so an initial setup wizard could make setup easier.
I'd like to finish this before releasing 0.4.

Support multi-lined gd:street

TB has two fields for street addresses. It looks like Google handles these addresses with a newline in the gd:street value. This should be fairly easy to implement.

<gd:structuredPostalAddress rel='http://schemas.google.com/g/2005#home' >
gd:formattedAddress1234 1st St NW
Apt 123
Rochester, MN 55901</gd:formattedAddress>
gd:street1234 1st St NW
Apt 123</gd:street>
gd:postcode55901</gd:postcode>
gd:cityRochester</gd:city>
gd:regionMN</gd:region>
</gd:structuredPostalAddress>

Add website label to contact view pane

Website labels aren't currently in the contact view pane so it's unclear which type of website it is. Types are only displayed in the edit contact dialog.

Throttle requests to mitigate 503 errors

Several people are getting 503 errors about being over quota. I added some code to run a test that will determine the minimum delay between asynchronous requests. This should be enough of a delay between gContactSync's requests.

I've seen errors with a delay up to 100 ms while 120 ms appears to be enough of a delay.

No sync on exit

I don't know if this is intended, but it appears the latest changes I do in my address book are not always synced when I open these same contacts later. It's like if there was no sync when exiting Thunderbird.

Is it a bug or should it be seen as an enhancement?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.