Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # $Id: mimetypes.yaml 591 2010-09-14 02:14:08Z ian $
- # This is the content type definition file.
- # It is in YAML format as a list of hashes.
- # Essentially this file is a series of YAML documents, each separated
- # by three dashes on its own line. The data is loaded into instances
- # of the FeedFetcherMimeType class. The key/value pairs represent the
- # class fields to load into, so it is important NOT to misspell them
- # or alter their case. Use title, contentType, and extension
- # The patterns themselves are standard regular expressions. They do not
- # need extra escaping of special regex characters such as ? (see
- # the xml example where the ? character is escaped by a single backspace
- # character as in perl code. In Java code you would need four backspace
- # characters, two for the string escape and two more to get the backspace
- # character in the resulting string.
- # The whole document is not checked, only the first 256 characters
- # (see MessageMimeTypeTransformer), so the pattern to detect must exist
- # within this section.
- # GZ Compressed Data
- # Needs to be first so that it can be returned and re-run after decompressing
- ---
- title: GZ Compressed Data
- # This is what it SHOULD be. 8b is 139 and ef is 239
- # 139 10001011
- # 239 11101111
- #hexPattern: 1f8b
- hexPattern: 1fef
- pattern:
- contentType: application/x-gzip
- extension: gz
- compressible: false
- # BZ2 compressed data
- # This is for testing purposes
- #---
- #title: BZipped Data
- #hexPattern: 425a68
- #pattern:
- #contentType: application/x-bzip2
- #extension: bz2
- # GIF IMAGE
- ---
- title: GIF Image
- hexPattern:
- pattern: ^GIF.*$
- contentType: image/gif
- extension: gif
- compressible: false
- # JPEG IMAGE
- ---
- title: JPEG Image
- hexPattern:
- pattern: ^.+?JFIF.*$
- contentType: image/jpeg
- extension: jpeg
- compressible: false
- # SportsML TEXT
- ---
- title: XML Document
- hexPattern:
- pattern: ^.*?<\?xml.*?<sports-content.*$
- contentType: text/sportsml+xml
- extension: xml
- compressible: true
- # XML TEXT
- ---
- title: XML Document
- hexPattern:
- pattern: ^.*?<\?xml.*$
- contentType: text/xml
- extension: xml
- compressible: true
- # XSL TEXT
- ---
- title: XSL Stylesheet Document
- hexPattern:
- pattern: ^.*?<\?xsl:stylesheet.*$
- contentType: text/xslt+xml
- extension: xsl
- compressible: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement