[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban] jbovlaste xml to csv
Just in case could be of any use to somebody, I whipped up a quick
script to convert XML jbovlaste dump (the lojban -> xxx direction) to
a CSV file to be imported into OpenOffice (or Excel, or for any other
use).
---8<----- cut here ---8<----- cut here ---8<----- cut here
---8<----- cut here ---8<-----
! gema script to convert jbovlaste XML dump to a CSV file
! 2011 Remo Dentato (rdentato@gmail.com)
! Visit http://gema.sourceforge.net to download gema for your OS
\A="type"\;"official"\;"rafsi1"\;"rafsi2"\;"rafsi3"\;"valsi"\;"definition"\;"note"
\<valsi<vls>=$1
?=
vls:\A=@set{w;}@set{t;}@set{d;}@push{r;\;}@push{r;\;}@push{r;\;}@set{n;}@set{x;"y"}
vls:word\="*"=@set{w;"$1"}
vls:type\="<typ>"=@set{t;"$1"}
vls:\<rafsi\>*\<\/rafsi\>=@push{r;"$1"\;}
vls:\<definition\><nsc>\<\/definition\>=@set{d;"$1"}
vls:\<notes\><nsc>\<\/notes\>=@set{n;"$1"}
vls:?=
vls:\<\/valsi\>=$t\;$x\;$r@pop{r}$r@pop{r}$r$w\;$d\;$n\n@terminate
nsc:\;=,
nsc:\n\r=
nsc:"=''
nsc:\n=
typ:experimental =@set{x;"n"}
typ:cmavo cluster=cluster
cut here ---8<----- cut here ---8<----- cut here ---8<----- cut
here ---8<----- cut here ---8<-----
remod
--
You received this message because you are subscribed to the Google Groups "lojban" group.
To post to this group, send email to lojban@googlegroups.com.
To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lojban?hl=en.