Am 25.08.2007 um 09:18 schrieb a¿ex:
> do in order that trac does not
> treat .ls and .as files as plain text.
> Somewhere I must "tell" trac to update the mime types.
> I thought, that this information was read from the pygments
> installation, but appaerently it isn't.
just for the record (if anyone ever "googles" for this info):
search for the file: trac/mimeview/api.py
and in that file you can add file extensions at:
...
...
# extend the above with simple (text/x-<something>: <something>)
mappings
for x in ['as', 'ada', 'asm', 'asp', 'awk', 'idl', 'inf', 'java',
'ksh', 'ls', 'lua',
'm4', 'mail', 'psp', 'rfc', 'rst', 'sql', 'tcl', 'tex',
'zsh']:
KNOWN_MIME_TYPES.setdefault('text/x-%s' % x, []).append(x)
...
...
in my case I added 'as' and 'ls' for actionscript and lingoscript files.
works like a charme now and i am a happy camper...
...for now at least :-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---