Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Model.Format.Types
- mimeTypeTop :: ByteString -> ByteString
- mimeTypeSub :: ByteString -> ByteString
- mimeTypeTopCompare :: ByteString -> ByteString -> Ordering
- allFormats :: [Format]
- getFormat :: Id Format -> Maybe Format
- getFormat' :: Id Format -> Format
- getFormatByExtension :: ByteString -> Maybe Format
- addFormatExtension :: RawFilePath -> Format -> RawFilePath
- getFormatByFilename :: RawFilePath -> Maybe Format
- dropFormatExtension :: Format -> RawFilePath -> RawFilePath
- videoFormat :: Format
- imageFormat :: Format
- audioFormat :: Format
- formatIsImage :: Format -> Bool
- formatTranscodable :: Format -> Maybe Format
- formatSample :: Format -> Maybe Format
- formatJSON :: ToObject o => Format -> Record (Id Format) o
- formatIsAV :: Format -> Bool
- formatNotAV :: Format -> Bool
Documentation
module Model.Format.Types
mimeTypeTop :: ByteString -> ByteString Source #
Parse a full mimetype value into just its category or type
mimeTypeSub :: ByteString -> ByteString Source #
Parse a full mimetype value into just its subtype
mimeTypeTopCompare :: ByteString -> ByteString -> Ordering Source #
Establish a relative order between to specific mimetype values ...
allFormats :: [Format] Source #
Harcoded list of all formats recognized by Databrary for uploading TODO: db coherence
addFormatExtension :: RawFilePath -> Format -> RawFilePath Source #
dropFormatExtension :: Format -> RawFilePath -> RawFilePath Source #
videoFormat :: Format Source #
Blessed video format, used as output from transcoding, as well as understood by front end for playback
imageFormat :: Format Source #
audioFormat :: Format Source #
Blessed audio format, used as output from transcoding, as well as understood by front end for playback
formatIsImage :: Format -> Bool Source #
Is this an image format
formatTranscodable :: Format -> Maybe Format Source #
If the format can (or should be) transcoded into the blessed internal format, then provide the format it will be transcoded into
formatSample :: Format -> Maybe Format Source #
For formats where we can produce samples, determine the type for sample output
formatJSON :: ToObject o => Format -> Record (Id Format) o Source #
Convert a Format value into the shape of JSON to be produced. Arbitrarily only show the first extension if multiple extensions are present
formatIsAV :: Format -> Bool Source #
Is this an Audio or Video format
formatNotAV :: Format -> Bool Source #