[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OT - trivial programming language



I'm asking for a bit of advice here.  

I wish to convert a kaddressbook database to abook format saving as 
many fields as possible.  

I could do this by exporting to cvs, importing to gnumeric (or any 
spreadsheet), shuffling the columns around, re-exporting to cvs and 
importing back to abook.  I'll lose a lot more than I want to, as the 
abook cvs is only a partial dump.

I could do it in BASIC - I still vaguely remember my first language!

I could probably do it in perl - but I've never really learned perl, 
and would have to work from the manual.

But it seems to me most rational to use the opportunity to begin 
learning one of the lighter languages that I keep seeing mention of.  
So the question is, which do you people recommend?  

The input data will be the cvs dump from kmail, and the output will be 
abook native format, which is a series of numbered paragraphs , 
reminiscent of an doze .ini file. That is to say, it begins:
   [2]
   name=name
   email=email1@here.com,email2@here.com,email3@here.com,email4@here.com
   address=address_1
   address2=address_2
   city=hereville
   ...
so I assume sed is less than optimal.  It seems like a function I 
might need again, so it is worth having it in a script.

I really do need to equip myself with a convenient scripting language 
for all these day-to-day admin tasks, and I'd like it if it can do a 
little maths for me at time too.  Please advise me which manual to 
open.

TIA

-- 
richard



Reply to: