Re: [Sugar-devel] MIME type?

2016-06-21 Thread Iain Brown Douglas
On Tue, 2016-06-21 at 18:26 -0300, Gonzalo Odiard wrote:
> Just beautiful :)

It is.

@Sam is this a product of Sphinx and Alabaster?

I read [1] "as of Sphinx 1.3, Alabaster is ... the default theme."

Previously I tried using Alabaster as the theme for Help Activity, it
looked super, but I could not get it ready for production.

Perhaps with Sphinx 1.3 it would be easier now?

Thanks,

Iain

[1] http://alabaster.readthedocs.io/en/latest/


> 
> On Tue, Jun 21, 2016 at 6:17 PM, Sam P.  wrote:
> Hi Sebastian,
> 
> 
> We have Sphinx docs avbaliable
> online: https://developer.sugarlabs.org/sugar3/
> 
> 
> Contributions to add more docstrings are always appreciated.
> 
> 
> Thanks,
> Sam
> 
> On Wed, Jun 22, 2016, 04:53 Sebastian Silva
>  wrote:
> 
> El 21/06/16 a las 13:32, Gonzalo Odiard escribió:
> 
> > (btw, would be good have this information in a
> official place)
> +1 in fact the Sugar Toolkit API docs are not online.
> Aleksey used to
> maintain a website for them. Also, recently Tony
> complained that there's
> no toolkit docs.
> 
> I don't know how those were generated (epydocs?). They
> were not pretty
> but worked.
> 
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
> 
> 
> 
> 
> -- 
> photo
> 
> Gonzalo Odiard
> Lider de proyecto
> tel.:
> 4210-7748 | www.trinom.ioAv Calchaqui 4936· 2do Piso. Quilmes
>  
> 
> 
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Dave Crossland
Probably, yes; there is a new font top level type in draft stage -
https://datatracker.ietf.org/doc/draft-ietf-justfont-toplevel/ - and you
could try these 3 for import:

ttf "application/x-font-ttf" or "application/x-font-truetype"
otf "application/x-font-opentype"
sfnt "application/font-sfnt"

I don't think UFO has a mime type that is registered, though, and since its
a 'bundle file' - ie, a folder with a *.ufo name - then I doubt it will
have a mime type itself. However, there is a new "single file UFO" format
in draft stage at http://unifiedfontobject.org/roadmap/ which has the
extension .ufoz that could have a mime type. However, first let's support
that experimental format :)
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Yash Agarwal
The documentation (attached below) says that we only use generic mime types
defined in mime.py
so do I need to make additions to mime.py to accommodate these types

*what_filter (str): an activity bundle_id or a generic mime type as*
*defined in :mod:`sugar3.mime` used to determine which objects*
*will be presented in the object chooser*

On Wed, Jun 22, 2016 at 5:50 AM Yash Agarwal  wrote:

> What if I want to open .ttf/.otf or .ufo files that are already on the
> system and not generated by my activity?
> What filter type should I specify then?
>
> On Wed, Jun 22, 2016 at 2:56 AM Gonzalo Odiard  wrote:
>
>> Just beautiful :)
>>
>> On Tue, Jun 21, 2016 at 6:17 PM, Sam P.  wrote:
>>
>>> Hi Sebastian,
>>>
>>> We have Sphinx docs avbaliable online:
>>> https://developer.sugarlabs.org/sugar3/
>>>
>>> Contributions to add more docstrings are always appreciated.
>>>
>>> Thanks,
>>> Sam
>>>
>>> On Wed, Jun 22, 2016, 04:53 Sebastian Silva 
>>> wrote:
>>>
 El 21/06/16 a las 13:32, Gonzalo Odiard escribió:

 > (btw, would be good have this information in a official place)
 +1 in fact the Sugar Toolkit API docs are not online. Aleksey used to
 maintain a website for them. Also, recently Tony complained that there's
 no toolkit docs.

 I don't know how those were generated (epydocs?). They were not pretty
 but worked.
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

>>>
>>
>>
>> --
>> [image: photo]
>> *Gonzalo Odiard*
>> Lider de proyecto
>> tel.: 4210-7748 | www.trinom.ioAv Calchaqui 4936· 2do Piso. Quilmes
>> 
>> 
>>
>>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Yash Agarwal
What if I want to open .ttf/.otf or .ufo files that are already on the
system and not generated by my activity?
What filter type should I specify then?

On Wed, Jun 22, 2016 at 2:56 AM Gonzalo Odiard  wrote:

> Just beautiful :)
>
> On Tue, Jun 21, 2016 at 6:17 PM, Sam P.  wrote:
>
>> Hi Sebastian,
>>
>> We have Sphinx docs avbaliable online:
>> https://developer.sugarlabs.org/sugar3/
>>
>> Contributions to add more docstrings are always appreciated.
>>
>> Thanks,
>> Sam
>>
>> On Wed, Jun 22, 2016, 04:53 Sebastian Silva 
>> wrote:
>>
>>> El 21/06/16 a las 13:32, Gonzalo Odiard escribió:
>>>
>>> > (btw, would be good have this information in a official place)
>>> +1 in fact the Sugar Toolkit API docs are not online. Aleksey used to
>>> maintain a website for them. Also, recently Tony complained that there's
>>> no toolkit docs.
>>>
>>> I don't know how those were generated (epydocs?). They were not pretty
>>> but worked.
>>> ___
>>> Sugar-devel mailing list
>>> Sugar-devel@lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>
>>
>
>
> --
> [image: photo]
> *Gonzalo Odiard*
> Lider de proyecto
> tel.: 4210-7748 | www.trinom.ioAv Calchaqui 4936· 2do Piso. Quilmes
> 
> 
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Gonzalo Odiard
Just beautiful :)

On Tue, Jun 21, 2016 at 6:17 PM, Sam P.  wrote:

> Hi Sebastian,
>
> We have Sphinx docs avbaliable online:
> https://developer.sugarlabs.org/sugar3/
>
> Contributions to add more docstrings are always appreciated.
>
> Thanks,
> Sam
>
> On Wed, Jun 22, 2016, 04:53 Sebastian Silva 
> wrote:
>
>> El 21/06/16 a las 13:32, Gonzalo Odiard escribió:
>>
>> > (btw, would be good have this information in a official place)
>> +1 in fact the Sugar Toolkit API docs are not online. Aleksey used to
>> maintain a website for them. Also, recently Tony complained that there's
>> no toolkit docs.
>>
>> I don't know how those were generated (epydocs?). They were not pretty
>> but worked.
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>


-- 
[image: photo]
*Gonzalo Odiard*
Lider de proyecto
tel.: 4210-7748 | www.trinom.ioAv Calchaqui 4936· 2do Piso. Quilmes


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Sam P.
Hi Sebastian,

We have Sphinx docs avbaliable online:
https://developer.sugarlabs.org/sugar3/

Contributions to add more docstrings are always appreciated.

Thanks,
Sam

On Wed, Jun 22, 2016, 04:53 Sebastian Silva 
wrote:

> El 21/06/16 a las 13:32, Gonzalo Odiard escribió:
>
> > (btw, would be good have this information in a official place)
> +1 in fact the Sugar Toolkit API docs are not online. Aleksey used to
> maintain a website for them. Also, recently Tony complained that there's
> no toolkit docs.
>
> I don't know how those were generated (epydocs?). They were not pretty
> but worked.
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Gonzalo Odiard
Also Sam was experimenting with generate the docs (like Aleksey did for the
gtk2 sugar api)
with gtk3 sugar3 api.

On Tue, Jun 21, 2016 at 5:10 PM, Gary Martin  wrote:

> > On 21 Jun 2016, at 19:48, Sebastian Silva 
> wrote:
> >
> > El 21/06/16 a las 13:32, Gonzalo Odiard escribió:
> >
> >> (btw, would be good have this information in a official place)
> > +1 in fact the Sugar Toolkit API docs are not online. Aleksey used to
> > maintain a website for them. Also, recently Tony complained that there's
> > no toolkit docs.
> >
> > I don't know how those were generated (epydocs?). They were not pretty
> > but worked.
>
> Sorry, it’s been a while (don’t have a machine quickly to hand to test).
> Can you not just run pydoc from the Terminal or console on an install of
> Sugar and point your web browser at it to navigate? Pretty sure I accessed
> all the docs this way for python Sugar development.
>
> pydoc -p 8080
>
> —Gary
>
> > ___
> > Sugar-devel mailing list
> > Sugar-devel@lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


-- 
[image: photo]
*Gonzalo Odiard*
Lider de proyecto
tel.: 4210-7748 | www.trinom.ioAv Calchaqui 4936· 2do Piso. Quilmes


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Gary Martin
> On 21 Jun 2016, at 19:48, Sebastian Silva  wrote:
> 
> El 21/06/16 a las 13:32, Gonzalo Odiard escribió:
> 
>> (btw, would be good have this information in a official place)
> +1 in fact the Sugar Toolkit API docs are not online. Aleksey used to
> maintain a website for them. Also, recently Tony complained that there's
> no toolkit docs.
> 
> I don't know how those were generated (epydocs?). They were not pretty
> but worked.

Sorry, it’s been a while (don’t have a machine quickly to hand to test). Can 
you not just run pydoc from the Terminal or console on an install of Sugar and 
point your web browser at it to navigate? Pretty sure I accessed all the docs 
this way for python Sugar development.

pydoc -p 8080

—Gary

> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Sebastian Silva
El 21/06/16 a las 13:32, Gonzalo Odiard escribió:

> (btw, would be good have this information in a official place)
+1 in fact the Sugar Toolkit API docs are not online. Aleksey used to
maintain a website for them. Also, recently Tony complained that there's
no toolkit docs.

I don't know how those were generated (epydocs?). They were not pretty
but worked.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Sebastian Silva
El 21/06/16 a las 13:32, Gonzalo Odiard escribió:

> (btw, would be good have this information in a official place)
+1 in fact the Sugar Toolkit API docs are not online. Aleksey used to
maintain a website for them. Also, recently Tony complained that there's
no toolkit docs.

I don't know how those were generated (epydocs?). They were not pretty
but worked.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] MIME type?

2016-06-21 Thread Gonzalo Odiard
You can set the mime types your activity can open, and request to the
object chooser
open these mime types. More info:

http://godiard.blogspot.com.ar/2013/07/sugar-programming-improovements-in.html

(btw, would be good have this information in a official place)

On Tue, Jun 21, 2016 at 3:23 PM, Yash Agarwal 
wrote:

> Hello,
> what mime type should I use in the object chooser dialog for opening any
> ttf/otf or ufo files?
>
> Yash Agarwal
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


-- 
[image: photo]
*Gonzalo Odiard*
Lider de proyecto
tel.: 4210-7748 | www.trinom.ioAv Calchaqui 4936· 2do Piso. Quilmes


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] MIME type?

2016-06-21 Thread Yash Agarwal
Hello,
what mime type should I use in the object chooser dialog for opening any
ttf/otf or ufo files?

Yash Agarwal
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] mime type error in sugar

2014-01-19 Thread Gonzalo Odiard
I don't know if this was needed by historical reasons,
maybe the Gio functionality was not available.

mime.get_for_file do some magic to recognize text files.

Probably mime.get_for_file could call Gio instead of the SugarExt
equivalent.

Gonzalo


On Sat, Jan 18, 2014 at 6:49 AM, Daniel Narvaez dwnarv...@gmail.com wrote:

 Why we need that method at all? Without knowing the history of this code,
 it seems like we should Gio, both if the file exists and if it doesn't (if
 I remember correctly guess if for when the file doesn't exist).


 On 16 January 2014 20:42, Gonzalo Odiard godi...@sugarlabs.org wrote:

 I have filled #4715 [1] with information about a problem with the mime
 database in sugar.
 A workaround is available, but I would like to know what other think
 about using Gio to identify the mime types instead of our own
 SugarExt.mime_get_mime_type_for_file
 Regards,
 --
 Gonzalo Odiard

 SugarLabs - Learning Software for children

 [1] http://bugs.sugarlabs.org/ticket/4715

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




 --
 Daniel Narvaez




-- 
Gonzalo Odiard

SugarLabs - Learning Software for children
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] mime type error in sugar

2014-01-19 Thread Daniel Narvaez
On 19 January 2014 17:04, Gonzalo Odiard godi...@sugarlabs.org wrote:

 I don't know if this was needed by historical reasons,
 maybe the Gio functionality was not available.

 mime.get_for_file do some magic to recognize text files.


Gio seems to handle that just fine (tested with Gio.content_guess_type).


 Probably mime.get_for_file could call Gio instead of the SugarExt
 equivalent.


IMO we should deprecate mime.get_for_file and replace it with Gio.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] mime type error in sugar

2014-01-19 Thread Gonzalo Odiard
On Sun, Jan 19, 2014 at 1:47 PM, Daniel Narvaez dwnarv...@gmail.com wrote:

 On 19 January 2014 17:04, Gonzalo Odiard godi...@sugarlabs.org wrote:

 I don't know if this was needed by historical reasons,
 maybe the Gio functionality was not available.

 mime.get_for_file do some magic to recognize text files.


 Gio seems to handle that just fine (tested with Gio.content_guess_type).


 Probably mime.get_for_file could call Gio instead of the SugarExt
 equivalent.


 IMO we should deprecate mime.get_for_file and replace it with Gio.



I agree.

This week I will be almost disconnected. Next week will be back working.

Gonzalo



-- 
Gonzalo Odiard

SugarLabs - Learning Software for children
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] mime type error in sugar

2014-01-18 Thread Daniel Narvaez
Why we need that method at all? Without knowing the history of this code,
it seems like we should Gio, both if the file exists and if it doesn't (if
I remember correctly guess if for when the file doesn't exist).


On 16 January 2014 20:42, Gonzalo Odiard godi...@sugarlabs.org wrote:

 I have filled #4715 [1] with information about a problem with the mime
 database in sugar.
 A workaround is available, but I would like to know what other think
 about using Gio to identify the mime types instead of our own
 SugarExt.mime_get_mime_type_for_file
 Regards,
 --
 Gonzalo Odiard

 SugarLabs - Learning Software for children

 [1] http://bugs.sugarlabs.org/ticket/4715

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




-- 
Daniel Narvaez
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] mime type error in sugar

2014-01-16 Thread Gonzalo Odiard
I have filled #4715 [1] with information about a problem with the mime
database in sugar.
A workaround is available, but I would like to know what other think
about using Gio to identify the mime types instead of our own
SugarExt.mime_get_mime_type_for_file
Regards,
-- 
Gonzalo Odiard

SugarLabs - Learning Software for children

[1] http://bugs.sugarlabs.org/ticket/4715
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel