Home | Trees | Indices | Help |
|
---|
|
object --+ | FORMATS_REGISTRY
a registry for data formats that can be produced by DaCHS.
This works by self-registration of the respective modules on their input; hence, if you want to rely on some entry here, be sure there's an import somewhere.
Instance Methods | |
Inherited from |
Class Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Class Variables | |
writerRegistry =
|
|
formatToMIME =
|
|
formatToLabel =
|
|
mimeToKey =
|
|
extensionToKey =
|
|
keyToExtension =
|
Properties | |
Inherited from |
Method Details |
adds a writer to the formats registry. Key is a short, unique handle for the format, writer is a writer function(data, outputFile) -> None (where data can be an rsc.Data or an rsc.Table instance), mainMime is the preferred media type, label is a human-readable designation for the format (shown in selection widgets and the like), extension is a suggested extension for the format (lower-case only), and aliases are other strings that can be used to select the format in DALI FORMAT or similar. Where keys, mainMime, and aliases clash, previous entries are silently overwritten. For extensions, the first registred format wins. |
returns a simple MIME type for our formatName (some incoming MIME or an alias). Some magic, reserved mimes that need to be preserved from the input are recognised and returned in orderedFormat. This is for TAP and related DALI hacks. |
returns a writer for formatName. writers are what's registred via registerDataWriter; formatName is a MIME type or a format alias. This raises CannotSerializeIn if no writer is available. |
returns a DaCHS format key for formatName (DaCHS key or MIME). If formatName is a mime type with parameters, we'll also try to get a format with the parameters stripped and silently succeed if that works. |
returns the media type first registered for extension. extension must begin with a dot. None is returned for extensions no format has (yet) claimed. |
Class Variable Details |
writerRegistry
|
formatToMIME
|
formatToLabel
|
mimeToKey
|
extensionToKey
|
keyToExtension
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |