mimetype and icon for Cython programs?

46 views
Skip to first unread message

Shriramana Sharma

unread,
May 8, 2013, 7:42:57 AM5/8/13
to cython...@googlegroups.com
I would like to see my pyx and pyd files [or cy and cyd files ;-)]
have an icon on OSS filemanagers. I suppose the way it is gone about
is to have an icon and a set of extensions associated with a mimetype
(at least that is how it is on KDE).

Any official mimetype/icon for Cython files?

--
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा

Mathieu Bridon

unread,
May 8, 2013, 10:14:55 AM5/8/13
to cython...@googlegroups.com
On Wednesday, May 08, 2013 07:42 PM, Shriramana Sharma wrote:
> I would like to see my pyx and pyd files [or cy and cyd files ;-)]
> have an icon on OSS filemanagers. I suppose the way it is gone about
> is to have an icon and a set of extensions associated with a mimetype
> (at least that is how it is on KDE).
>
> Any official mimetype/icon for Cython files?

No idea if that's a standard, but maybe try to do the same as what
Pygments does?
http://pygments.org/docs/lexers/#lexers-for-compiled-languages


--
Mathieu

Shriramana Sharma

unread,
May 8, 2013, 11:32:31 AM5/8/13
to cython...@googlegroups.com
On Wed, May 8, 2013 at 7:44 PM, Mathieu Bridon
<boch...@fedoraproject.org> wrote:
>> Any official mimetype/icon for Cython files?
>
> No idea if that's a standard, but maybe try to do the same as what Pygments
> does?
> http://pygments.org/docs/lexers/#lexers-for-compiled-languages

text/x-cython sounds OK, but not application/x-cython. At least, going
by what I see on my Kubuntu Raring system for Python: text/x-python
but application/x-python-bytecode.

It is not clear from http://en.wikipedia.org/wiki/Mimetypes whether we
have to register this somewhere or it is all just de facto.

Robert Bradshaw

unread,
May 8, 2013, 8:00:42 PM5/8/13
to cython...@googlegroups.com
"text/x-cython" makes sense for all of pyx, pxd, and pxi. pyd is a
Windows Python thing (not really specific to Cython). Feel free to use
the log at http://en.wikipedia.org/wiki/File:Cython-logo.svg (with our
without the trailing ython).
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "cython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Shriramana Sharma

unread,
May 8, 2013, 11:17:43 PM5/8/13
to cython...@googlegroups.com
On Thu, May 9, 2013 at 5:30 AM, Robert Bradshaw <robe...@gmail.com> wrote:
> Feel free to use
> the log at http://en.wikipedia.org/wiki/File:Cython-logo.svg (with our
> without the trailing ython).

For proper transparency I removed the white rectangle used to make O
look like C:

http://en.wikipedia.org/wiki/File:Cython-logo.svg

But since this apparently isn't under a free licence, it can't be part
of the official KDE distro. Is there a way out?

I have submitted https://bugs.kde.org/show_bug.cgi?id=319557 to
include this into KDE.

This still leaves us with the question as to where we are supposed to
register this mimetype officially if necessary.

Stefan Behnel

unread,
May 9, 2013, 12:05:00 AM5/9/13
to cython...@googlegroups.com, Cython-devel
Shriramana Sharma, 09.05.2013 05:17:
> On Thu, May 9, 2013 at 5:30 AM, Robert Bradshaw wrote:
>> Feel free to use
>> the log at http://en.wikipedia.org/wiki/File:Cython-logo.svg (with our
>> without the trailing ython).
>
> For proper transparency I removed the white rectangle used to make O
> look like C:
>
> http://en.wikipedia.org/wiki/File:Cython-logo.svg

Just to keep things official and to avoid the possibility of legal
conflicts, I uploaded my original version here:

https://de.wikipedia.org/wiki/Datei:Cython-logo.svg

Apparently, I cannot overwrite the english version file. If someone else
can, please replace it.


> But since this apparently isn't under a free licence, it can't be part
> of the official KDE distro. Is there a way out?

Not sure how KDE handles this, but it also uses the official Python logo
for .py files. So I can't imagine it being a problem.


> I have submitted https://bugs.kde.org/show_bug.cgi?id=319557 to
> include this into KDE.

Please use the official version instead then.


> This still leaves us with the question as to where we are supposed to
> register this mimetype officially if necessary.

IANA, I guess:

https://www.iana.org/assignments/media-types

Not sure it's worth it, though.

Stefan

Shriramana Sharma

unread,
May 9, 2013, 12:34:20 AM5/9/13
to cython...@googlegroups.com
On Thu, May 9, 2013 at 9:35 AM, Stefan Behnel <stef...@behnel.de> wrote:
>> For proper transparency I removed the white rectangle used to make O
>> look like C:
>>
>> http://en.wikipedia.org/wiki/File:Cython-logo.svg
>
> Just to keep things official and to avoid the possibility of legal
> conflicts, I uploaded my original version here:
>
> https://de.wikipedia.org/wiki/Datei:Cython-logo.svg
>
> Apparently, I cannot overwrite the english version file. If someone else
> can, please replace it.

I'm sorry I don't understand. Was it wrong or a copyright infringement
or something to fix the transparency of the SVG? I did it since icons
need to have proper transparency for clean display on any-coloured
background.

If you want to restore your "official" version of the English
Wikipedia Cython logo with the white rectangle kludge you can still do
so. If you are not sure how, please tell and I will do it, but I don't
understand why you would do that.

Stefan Behnel

unread,
May 9, 2013, 1:38:19 AM5/9/13
to cython...@googlegroups.com
Shriramana Sharma, 09.05.2013 06:34:
> On Thu, May 9, 2013 at 9:35 AM, Stefan Behnel wrote:
>>> For proper transparency I removed the white rectangle used to make O
>>> look like C:
>>>
>>> http://en.wikipedia.org/wiki/File:Cython-logo.svg
>>
>> Just to keep things official and to avoid the possibility of legal
>> conflicts, I uploaded my original version here:
>>
>> https://de.wikipedia.org/wiki/Datei:Cython-logo.svg
>>
>> Apparently, I cannot overwrite the english version file. If someone else
>> can, please replace it.
>
> I'm sorry I don't understand. Was it wrong or a copyright infringement
> or something to fix the transparency of the SVG?

IANAL, but it definitely complicates the legal constraints to have a chain
of derived works with multiple authors. And there is absolutely no reason
to go that route.


> I did it since icons
> need to have proper transparency for clean display on any-coloured
> background.
>
> If you want to restore your "official" version of the English
> Wikipedia Cython logo with the white rectangle kludge you can still do
> so. If you are not sure how, please tell and I will do it, but I don't
> understand why you would do that.

Note that the version I uploaded does not suffer from this problem. Only
the file in the English wikipedia had a broken background. If you replace
it with the official file I uploaded, all is well.

Stefan

Shriramana Sharma

unread,
May 9, 2013, 3:34:05 AM5/9/13
to cython...@googlegroups.com
On Thu, May 9, 2013 at 11:08 AM, Stefan Behnel <stef...@behnel.de> wrote:
>
> IANAL, but it definitely complicates the legal constraints to have a chain
> of derived works with multiple authors. And there is absolutely no reason
> to go that route.

Done: http://en.wikipedia.org/wiki/File:Cython-logo.svg
Reply all
Reply to author
Forward
0 new messages