[Sugar-devel] Experiment with Art4Apps

Gonzalo Odiard gonzalo at laptop.org
Mon Dec 9 12:56:37 EST 2013


On Mon, Dec 9, 2013 at 2:40 PM, Lionel Laské <lionel at olpc-france.org> wrote:

> Hi Gonzalo,
>
> Nice idea. I even didn't know it was possible :-)
> Guess that it means that it could be integrate directly into Sugar ?
>

May be we can propose it as a blessed dependency, if more activities use it.


>
> Few remarks however:
> - May be it could be interesting to integrate sounds too.
>

Yes, but probably will package the sounds by language, because of the size
involved.



> - Repeating the complete path prefix of images in words.json should be
> avoided (generate a bigger JSON file).
>

True. I will change that.



> - Grouping words by categories is not necessarily a good idea. In
> Abecedarium for example, I need handling words both by categories and by
> starting letter so I had to use an indirection.
>
>
Hmm, starting letter can be done easily by code.



> Regarding use in Abecedarium, it depends. My objective is to adapt
> Abecedarium to transform it as a SugarWeb Activities so any system related
> link is potentially a constraint...
>
>
I suspected that... maybe we can find a way to solve it.



> Best regards from France.
>
>         Lionel.
>
>
>
Do you have a csv file like the Spanish one for the French words?

Regards,

Gonzalo






>
> 2013/12/9 Gonzalo Odiard <gonzalo at laptop.org>
>
>> I was playing a little with the Art4Apps images and data,
>> and created json files and a python module to mange that,
>> in a way to make easier to activities to use it.
>>
>> Have a very basic api to get the information, like:
>>
>> >>> from art4apps import Art4Apps
>> >>> aa = Art4Apps()
>> >>> aa.get_categories()
>> [u'houseware', u'letters', u'people', u'actions', u'colors', u'numbers',
>> u'tools', u'constructions', u'vegetables', u'emotions', u'sports',
>> u'other', u'bodyparts', u'jobs', u'nature', u'food', u'objects', u'plants',
>> u'animals', u'adjectives', u'fruits', u'furnitures', u'transports',
>> u'clothes']
>> >>> aa.get_words_by_category('colors')
>> [u'black', u'blue', u'brown', u'color', u'gray', u'green', u'mauve',
>> u'orange-color', u'pink', u'red', u'white', u'yellow']
>> >>> aa.get_languages()
>> ['es']
>> >>> aa.get_translation('es', 'white')
>> u'blanco'
>> >>> aa.get_image_filename_by_word('penguin')
>> u'/usr/share/art4apps/images/penguin.png'
>>
>> The data is in json format, to make easier use it in web activities too.
>>
>> I have utilities to create the json files based in csv files,
>> and I plan create a utility to help in the translation to new languages,
>> displaying the images.
>>
>> As a simple example, I have modified the Story, to use the Art4Apps
>> images if available (patch attached). Iwant modify Memorize activity too.
>>
>> The art4apps rpm can be downloaded from:
>>
>> http://dev.laptop.org/~gonzalo/art4apps-0.1-0.noarch.rpm
>>
>> This is just a experiment, looking for feedback. I would like to know if
>> something like this can be used in Abecedarium, by example.
>>
>> Gonzalo
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131209/fb6181f2/attachment.html>


More information about the Sugar-devel mailing list