[gcompris-devel] Re: Using some gcompris images.

Bruno Coudoin bruno.coudoin at free.fr
Wed Sep 3 15:33:09 UTC 2003


Le mer 03/09/2003 à 20:21, stasZ a écrit :
> On 2003.09.02 04:34, Bruno Coudoin wrote:
> 
> > Also, Stas, you maybe interrested in assetml that I defined to ease
> > image and sound exchange between project like ours.
> > 
> > http://freeduc.linuxtag.uni-kl.de/cps/Public/devel/assetml/assetml_description/view
> 
> > It's currently implemented in the cvs version of gcompris.
> 
> I have had a look at the cvs tree and the assetml readme, and i must
> say it's certainly a nice idea.
> I think it could, like you suggest in the readme, become a standard way
> of using game data, in a real open source way.
> The more i think of it, the more i like it :-)
> 
Thanks, I'am glad you appreciate.

> I'am currently working on 'voice support' for childsplay and network 
> sound support. (this last thing is IMHO a big problem in linux)
> 
> To make this network sound work, i'm rewriting the way childsplay
> handles sound, and i think i'm gonna try your assetml as the
> way to handle sounds.
> (Have you some ideas for sound support in a thin client enviroment ?)
> 
LTSP already supports that. As I remember it works the way X does
forwarding the sound to the thin client.
It should not be done at application level. It's a sound daemon issue,
not yours or mine.

> Back to assetml.
> 
> For what i understand of it, and please correct me if i am wrong, i'm 
> not (yet) a xml-believer ;-)
> 
> You first create a xml file like the one in your
>   /test/test_assetml.assetml.
> 
> Set the xml root to where your pics,sounds etc are.
> (basicly use your assetml xml file)
> 
> Use a (gcompris?) tool to create po files of it.
> 
First this step is not mandatory, it is possible to do it and I support
it at libassetml level. To do it effectively, I uses the INTLTOOL which
are basicaly a set of perl scripts that does populate the po files and
the xml file accordingly. Gcompris uses that already.

> Use a xml i18n parser (at run time?) to translate it.
> (like with gettext?, and why translate it?)
> 
It's not at runtime, it's at package creation time (make install).
For example in geography, you will get the country in the description
field of assetml in the user locale.
So you could easily create a board that display a country and its name
in the correct locale without having anything to translate in your
application.

> Use a (gcompris?) tool (assetml.c?) to extract the relevant fields.
> 
I created a C API to parse and get data from assetml files. It won't
help you in python. You can easily use your python xml parser to do the
same. The assetml.c is just 400 lines of C, it's probably 200 of python
;)

Now from a C program, you can use libassetml and link you to it.
libassetml does not requires gcompris at all.

> The location of the files in this fields are the xml root and name of 
> the file.
> 
> Finally, why would a user wants to search/browse the xml file?
> You speak of choosing a back ground/music, do you mean that
> the application gets it's info out the assetml and present it to
> the user in a application dependent way?
> 
Why not.
let's say you parse xml files and search for music category and play
them one by one.
If the user grab the latest madonna.assetml package, he will have it as
well, wherever the music are.

> Are there "assetml standard" rules on how the xml file should be
> formatted?
> 
Yes, that the way it's documented.
One area still open is the categories. We should perhaps organise
categories in order to be able to be sure to discover files on the fly.

> Thank you in advance for answering.
> 
> > I already have assetml package for voices in pt en fr de es for
> > alphabet, geography (country name), misc (good, excellent, ..),
> > colors.
> > 
> > Feel free to reuse them as well, if we could share the same package
> > (rpm), it will help distro to save space.
> 
> Thank you, i will.
> 
Great.

Is you pick up the cvs now, you will be abble to build rpm assetml
packages for all sounds. 
It works but I am not sure yet how to organize that, it's a lot of
packages.
Today I have:
gcompris-assetml-flags-1.0-1.i586.rpm
gcompris-assetml-voice-alphabet-de-1.0-1.i586.rpm
gcompris-assetml-voice-alphabet-en-1.0-1.i586.rpm
gcompris-assetml-voice-alphabet-es-1.0-1.i586.rpm
gcompris-assetml-voice-alphabet-fr-1.0-1.i586.rpm
gcompris-assetml-voice-alphabet-pt-1.0-1.i586.rpm
gcompris-assetml-voice-colors-de-1.0-1.i586.rpm
gcompris-assetml-voice-colors-en-1.0-1.i586.rpm
gcompris-assetml-voice-colors-es-1.0-1.i586.rpm
gcompris-assetml-voice-colors-fr-1.0-1.i586.rpm
gcompris-assetml-voice-colors-pt-1.0-1.i586.rpm
gcompris-assetml-voice-geography-de-1.0-1.i586.rpm
gcompris-assetml-voice-geography-en-1.0-1.i586.rpm
gcompris-assetml-voice-geography-es-1.0-1.i586.rpm
gcompris-assetml-voice-geography-fr-1.0-1.i586.rpm
gcompris-assetml-voice-geography-pt-1.0-1.i586.rpm
gcompris-assetml-voice-misc-de-1.0-1.i586.rpm
gcompris-assetml-voice-misc-en-1.0-1.i586.rpm
gcompris-assetml-voice-misc-es-1.0-1.i586.rpm
gcompris-assetml-voice-misc-fr-1.0-1.i586.rpm
gcompris-assetml-voice-misc-pt-1.0-1.i586.rpm






More information about the Gcompris-devel mailing list