Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Forum italiano (Italian) Risorse italiane (documentazione e tools)
  • Search

[TIP] Esportare i contatti da Evolution a GMail

Forum riservato alla documentazione in italiano.

Moderator: ago

Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
Author
Message
assente
Guru
Guru
User avatar
Posts: 570
Joined: Mon Apr 12, 2004 7:59 pm
Location: Torino, italia, New Europe
Contact:
Contact assente
Website

[TIP] Esportare i contatti da Evolution a GMail

  • Quote

Post by assente » Sat Dec 04, 2004 2:56 pm

Non ho trovato uno script che mi permettesse di farlo, quindi me ne sono fatto uno io; ho notato che l'email viene scritta nel vcf da evo con tag diversi, a seconda della versione di Evolution, quindi il mio consiglio è controllare che sia sempre lo stesso: EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1: oppure EMAIL:
Spero che questo script possa servire anche a qualcun'altro. :wink:

Non è molto che uso Ruby, ma sono sicuro che si può fare la stessa cosa in maniera più elegante e compatta.. :P Se avete qualche idea, fatemelo sapere!

Code: Select all

#! /usr/bin/ruby
=begin
  vcf2csf - Export vcffile to csvfile
  $Author: Assente $
  Copyright (C) 2004 assente.altervista.org
  This program is free software.
  You can distribute/modify this program under
  the terms of the GPL  License.
=end
# CONFIG ME
vcfwords=["FN:","EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:","TEL;TYPE=CELL;X-EVOLUTION-UI-SLOT=3:"]
csvwords=["Full Name","Email Address","Mobile"]
#
if (ARGV[0]=="--help" || ARGV[0]==nil || ARGV[1]==nil)
	puts "Usage: ./vcf2csf.rb [] []
Function: Convert a vcffile to csvfile, usefull to export contacts from Evolution to GMail"
else
	vcffile=ARGV[0]
	csvfile=ARGV[1]
	csv=""
	rows=open(vcffile).readlines
	for i in 0..rows.length-1
		if rows[i].slice(0,5)=='BEGIN'
			csv << "\n"
		end
		 for j in 0..vcfwords.length-1
	
			if rows[i].slice(0,vcfwords[j].length)==vcfwords[j]		
				csv << rows[i].slice(vcfwords[j].length,30).chomp
				csv << ","
			end
		end
	end
	c=open(csvfile,'w+');
	c.write(csvwords.join(",")+csv)
	c.close
end
Blog
E8400, 4850, P5q
Top
Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Risorse italiane (documentazione e tools)”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic