Contacts : export et import

ANGLES

Membre actif
1 Avril 2006
574
10
61
Reunion
www.angles-associes.com
bonjour,
Je souhaite exporter mon carnet d'adresses (contacts maintenant), le modifier et le ré-importer.
Cela semble simple en théorie mais on ne peut exporte qu'en VCARD ou en Archive ABBU.
Le problème si on exporte en ABBU c'est comment modifier les contacts puisque l'on ne peut l'ouvrir apparemment qu'avec "Contacts" !!!!
Une autre solution serait de passer par BENTO où l'o,n peut exporte en excel et donc modifier facilement.
Mais alors un autre problème : une fois le fichier modifié c'est pour le ré-importer et le faire remplacer le carnet d'adresse actuel...
En effet, on peut ré-importer dans BENTO mais IMPOSSIBLE de ré-importer en synchro sur le carnet, obligé de créer un autre dossier....
Et comme BENTO se synchronise UNIQUEMENT avec CARNET D'ADRESSES, on est dans un cul de sac...
il doit bien y avoir une solution, j'attends vos suggestions.
Grand merciforum.jpg
 
Tu peux aussi simplement importer des contacts en .csv. ;)

Pour le reste, l'aide de Carnet d'adresses est assez complète sur le sujet…
 
Bonsoir,

Quelles sont les modifications que tu veux apporter à tes contacts ?

Selon la réponse, un AppleScript pourrait (ou non) faire l’affaire !

Cordialement
Nicolas
 
alors voilà : j'ai environ 8000 contacts à modifier.
1/ est-il possible de substituer le "0" d'un numéro en 06 par "+33"
2/ peut-on modifier l'intitulé d'un numéro si il commence par +33?
dans carnet d'adresse, il n'y a qu'un champ "portable", si celui-ci est occupé alors toute importation d'un nouveau numéro prend automatiquement l'intitulé "bureau".
Or je souhaite distinguer TOUS mes numéros en +33 des autres par un intitulé différent (peu importe le nom d'ailleurs)

Une autre question annexe sur une solution qui pourrait aussi convenir, c'est la création d'une autre base dans carnet d'adresse : peut-on avoir 2 carnet d'adresse ? je suppose que non
alors comment manage-t-on ces deux identités différentes si on en créé une deuxième?

Merci de vos réponses
 
Bonjour,

Je m’etais fait un AppleScript qui permettait de mettre des +33 au lieu des 0... Je regarde si je le retrouve pour te l’envoyer ce soir.
Une adaptation permettra de modifier le libellé.

Pour gérer deux carnets d’adresses, c’est possible : tu peux avoir autant de comptes iCloud que tu veux, et un carnet d’adresses associé à chaque compte iCloud.

Cordialement
Nicolas
 
Voici le script que j'avais fait à l'époque.
A adapter, certainement, mais c'est une base de départ !


Bloc de code:
tell application "Contacts"
   
    set foundset to people
    repeat with theperson in foundset
        set thename to the name of theperson
        set foundphones to the phones of theperson
        repeat with thephone in foundphones
            set thephonestring to the value of thephone as string
           
            set longueur to the number of characters of thephonestring
            if longueur is 14 then -- traitement des numéros du type 01 23 45 67 89
                set thephonetronque to ""
                repeat with laposition from 2 to 14
                    set thecharacter to character laposition of thephonestring
                    set thephonetronque to thephonetronque & thecharacter
                end repeat
               
                set thephonestring33 to "+33 " & thephonetronque
                display dialog (thename & return & thephonestring & return & return & thephonestring33) buttons {"cancel", "OK", "pas ce numéro"}
                if the button returned of result is "OK" then
                    set the value of thephone to thephonestring33
                end if
            end if
           
            if longueur is 12 then -- traitement des numéros du type +33123456789
                set laliste to {4, 5, 7, 9, 11}
                set testindicatif to ""
                repeat with i from 1 to 3
                    set testindicatif to testindicatif & character i of thephonestring
                end repeat
                if testindicatif is "+33" then
                    set thephonetronque to testindicatif
                    repeat with laposition from 4 to 12
                        if laposition is in laliste then
                            set thephonetronque to thephonetronque & " "
                        end if
                        set thecharacter to character laposition of thephonestring
                        set thephonetronque to thephonetronque & thecharacter
                       
                    end repeat
                   
                    set thephonestring33 to thephonetronque
                    display dialog (thename & return & thephonestring & return & return & thephonestring33) buttons {"cancel", "OK", "pas ce numéro"}
                    if the button returned of result is "OK" then
                        set the value of thephone to thephonestring33
                    end if
                end if
            end if
           
            if longueur is 13 then -- traitement des numéros du type +33 123456789
                set laliste to {5, 6, 8, 10, 12}
                set testindicatif to ""
                repeat with i from 1 to 3
                    set testindicatif to testindicatif & character i of thephonestring
                end repeat
                if testindicatif is "+33" then
                    set thephonetronque to testindicatif
                    repeat with laposition from 5 to 13
                        if laposition is in laliste then
                            set thephonetronque to thephonetronque & " "
                        end if
                        set thecharacter to character laposition of thephonestring
                        set thephonetronque to thephonetronque & thecharacter
                       
                    end repeat
                   
                    set thephonestring33 to thephonetronque
                    display dialog (thename & return & thephonestring & return & return & thephonestring33) buttons {"cancel", "OK", "pas ce numéro"}
                    if the button returned of result is "OK" then
                        set the value of thephone to thephonestring33
                    end if
                end if
            end if
           
           
        end repeat
    end repeat
    save
end tell