Looking for a glossary split up script
Hello,
I'm a novice to AppleScript and I'm looking for a script that will be useful for me as a translator: a script to split up a glossary with source-side alternatives, separated by semicolons. As a matter of fact I'm not sure whether this is something that can easily be done with AppleScript or better should be handled with Perl or another solution.
This is how the glossary looks (TAB stands for the tabulator character):
Ethanol;Ethylalkohol;Äthanol;Äthylalkohol;Weingeist;Spiritus;Sprit;Alkohol;Hydro xyethanTABEthanol;ethyl alcohol;pure alcohol;beverage alcohol;drinking alcohol;CH3CH2OH;C2H5OH;C2H6O
Quarz;Tiefquarz;α-QuarzTABSiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
And this is how this UTF-8 text file should be rewritten:
Ethanol TAB Ethanol;ethyl alcohol;pure alcohol;beverage alcohol;drinking alcohol;CH3CH2OH;C2H5OH;C2H6O
Ethylalkohol TAB Ethanol;ethyl alcohol;pure alcohol;beverage alcohol;drinking alcohol;CH3CH2OH;C2H5OH;C2H6O
etc.
Quarz TAB SiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
Tiefquarz TAB SiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
α-Quarz TAB SiO2;quartz;citrine;rose quartz;smoky quartz;milk quartz;milky quartz
Thank you for any suggestions!
Hans
iMac, Mac OS X (10.6.2)