[Sugar-devel] Experiment with Art4Apps

Lionel Laské lionel at olpc-france.org
Mon Dec 9 12:40:46 EST 2013


Hi Gonzalo,

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

Few remarks however:
- May be it could be interesting to integrate sounds too.
- Repeating the complete path prefix of images in words.json should be
avoided (generate a bigger JSON file).
- 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.

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...

Best regards from France.

        Lionel.



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/a1fe51bd/attachment.html>


More information about the Sugar-devel mailing list