2012-09-16 [mones] 3.8.1cvs60
[claws.git] / tools / vcard2xml.py
index 5ededf07ac8949377860d88d0e333192df3008f3..594e67d2b49a96c6c5980a24e9c15c0dae011734 100644 (file)
@@ -5,7 +5,7 @@ Copyright 
 
   This file is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
+  the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
    
   This program is distributed in the hope that it will be useful, but
@@ -17,10 +17,10 @@ Copyright 
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-  script name : evolutionvcard2sylpheed.py
+  script name : evolutionvcard2claws.py
 
  script purpose : convert an evolution addressbook VCARD file 
- into a Sylpheed addressbook
+ into a Claws Mail addressbook
 
  tested with evolution 1.2.x, and 1.4.x
 
@@ -75,14 +75,14 @@ def readVCARD (file) :
                                 
 
 ###############################################################################################
-## writes on a given file an xml representation for sylpheed addressbook received as a hash  ##
+## writes on a given file an xml representation for claws-mail addressbook received as a hash  ##
 ###############################################################################################
 
 def writeXMLREPR (vcard,file,uid) :
 
        """
        based on <vcard> and <uid> writes only recognized tags (the ones defined in <keywds> list)
-       NOTE: <url> and <org> tag will be written as attributes (there are such tags in sylpheed's
+       NOTE: <url> and <org> tag will be written as attributes (there are such tags in claws-mail's
              XML schema)
        """
        if len (vcard.keys()) == 0 : return
@@ -151,12 +151,12 @@ def execute () :
        if len(sys.argv) <> 3 and len(sys.argv) <> 2 :
                print str("\nUsage: vcard2xml.py  source_file [destination_file]\n\n" +
                '\tWhen only <source_file> is specified will overwrite the existing addressbook.\n'+
-               '\tWhen both arguments are suplied will create a new additional addressbook named \n\tas the destination file.'+'\n\tNOTE: in both cases the sylpheed must be closed and ran at least once.\n\n')
+               '\tWhen both arguments are suplied will create a new additional addressbook named \n\tas the destination file.'+'\n\tNOTE: in both cases the Claws Mail must be closed and ran at least once.\n\n')
                sys.exit(1)
 
        in_file = None
        out_file = None
-       path_to_out = os.environ['HOME']+'/.sylpheed/'
+       path_to_out = os.environ['HOME']+'/.claws-mail/'
        adr_idx = 'addrbook--index.xml'
        adr_idx_file = None
        tmp_adr_idx_file= None
@@ -189,7 +189,7 @@ def execute () :
                        tmp_adr_idx_file = open(path_to_out+adr_idx+'.tmp')
                        adr_idx_file = open(path_to_out+adr_idx,'w')
                except Exception, e :
-                       print 'Could not open <', path_to_out+adr_idx,'> file. Make sure you started sylpheed at least once.'
+                       print 'Could not open <', path_to_out+adr_idx,'> file. Make sure you started Claws Mail at least once.'
                        sys.exit(1)
                try :
                        out_file = open(path_to_out+sys.argv[2],'w')