Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Apply diff3.txt (plus additional documentation) | Walter Dörwald | 2002-09-06 | 1 | -38/+124 |
| | | | | | | | | | from SF patch http://www.python.org/sf/554192 This adds two new functions to mimetypes: guess_all_extensions() which returns a list of all known extensions for a mime type, and add_type() which adds one mapping between a mime type and an extension. | ||||
* | SF 563203. Replaced 'has_key()' with 'in'. | Raymond Hettinger | 2002-06-01 | 1 | -6/+6 |
| | |||||
* | Separate the script portion from the library portion; everything that | Fred Drake | 2001-12-05 | 1 | -17/+17 |
| | | | | | pertains to the script is now in the if __name__ == "__main__" block. This is in response to a commenton python-dev from Neal Norwitz. | ||||
* | Applying proposed patch for bug #474583, optional support for | Barry Warsaw | 2001-10-25 | 1 | -132/+212 |
| | | | | | | | | | | | | | | | | | | | non-standard but common types. Including Martin's suggestion to add rejected non-standard types from patch #438790. Specifically, guess_type(), guess_extension(): Both the functions and the methods grow an optional "strict" flag, defaulting to true, which determines whether to recognize non-standard, but commonly found types or not. Also, I sorted, reformatted, and culled duplicates from the big types_map dictionary. Note that there are a few non-equivalent duplicates (e.g. .cdf and .xls) for which the first will just get thrown away. I didn't remove those though. Finally, use of the module as a script as grown the -l and -e options to toggle strictness and to do guess_extension(), respectively. Doc and unittest updates too. | ||||
* | Patch #438790: Add additional mappings. | Martin v. Löwis | 2001-09-07 | 1 | -3/+36 |
| | | | | Also remove mappings that are not registered with IANA, and not extensions. | ||||
* | Add some fairly important file extensions: bmp css doc mid midi mp2 mp3 xls. | Ka-Ping Yee | 2001-08-18 | 1 | -0/+8 |
| | | | | Entries taken from the standard Debian mime.types file. | ||||
* | Another egregious error that copied the encodings info over the suffix | Fred Drake | 2001-08-16 | 1 | -1/+1 |
| | | | | info. Caught by the tests that I'm writing now. | ||||
* | Bad bug: the MimeTypes.readfp() was supposed to take a file object as a | Fred Drake | 2001-08-16 | 1 | -2/+2 |
| | | | | | | | | parameter, but did not. This was found because it can create failures elsewhere based on the presence of mime.types files in some common locations the module searches by default. (I will be writing a test for this module shortly!) | ||||
* | Refactor so that it is easier to work with alternate MIME types databases, | Fred Drake | 2001-08-03 | 1 | -67/+138 |
| | | | | | | and programmatically extend the database in different ways. This closes the SF bug (feature request) #439710. | ||||
* | Add .pyo as an extension, fixes bug #416462. Also restore alphabetic order. | Martin v. Löwis | 2001-06-05 | 1 | -1/+2 |
| | |||||
* | String method conversion. Added a trivial main to test it with. | Eric S. Raymond | 2001-02-09 | 1 | -7/+10 |
| | |||||
* | added a few more __all__ lists | Skip Montanaro | 2001-01-25 | 1 | -0/+2 |
| | | | | test___all__.py: fail silently in check_all if the module can't be imported | ||||
* | Untabify to pass the -tt test. | Fred Drake | 2000-02-10 | 1 | -20/+20 |
| | |||||
* | Map .js to application/x-javascript. | Fred Drake | 1999-05-20 | 1 | -0/+1 |
| | |||||
* | Added .rdf and .xsl as application/xml types. (.rdf is for the | Fred Drake | 1999-03-11 | 1 | -0/+2 |
| | | | | | Resource Description Framework, a metadata encoding, and .xsl is for the Extensible Stylesheet Language.) | ||||
* | Make mimetypes.guess_type understand data URLs. (Sjoerd Mullender) | Guido van Rossum | 1998-10-12 | 1 | -0/+21 |
| | |||||
* | knownfiles: Add the default installation dirs for Apache | Fred Drake | 1998-05-21 | 1 | -0/+2 |
| | | | | versions <= 1.2, >= 1.3. | ||||
* | guess_extension(): Revise documentation string to be more clear. If not | Fred Drake | 1998-05-19 | 1 | -3/+6 |
| | | | | inited, call init(). | ||||
* | guess_extension(): New function. Performs a reverse mapping from MIME type | Fred Drake | 1998-05-18 | 1 | -1/+18 |
| | | | | to filename extension. | ||||
* | Fixed typo in docstring: suffixes_map --> suffix_map. | Fred Drake | 1998-05-18 | 1 | -1/+1 |
| | |||||
* | Add file extension .xml, mapping it to text/xml. | Guido van Rossum | 1998-05-18 | 1 | -0/+1 |
| | |||||
* | Mass check-in after untabifying all files that need it. | Guido van Rossum | 1998-03-26 | 1 | -25/+25 |
| | |||||
* | Handy utility to guess MIME type from extension. | Guido van Rossum | 1997-09-30 | 1 | -0/+190 |