Sha256: 99f7aca0907e3b519e15336432d3eae93a2ff65b3c579923afbba60223ab6361

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

module EPUB
  module Constants
    NAMESPACES = {
      'dc'    => 'http://purl.org/dc/elements/1.1/',
      'ocf'   => 'urn:oasis:names:tc:opendocument:xmlns:container',
      'opf'   => 'http://www.idpf.org/2007/opf',
      'xhtml' => 'http://www.w3.org/1999/xhtml',
      'epub'  => 'http://www.idpf.org/2007/ops',
      'm'     => 'http://www.w3.org/1998/Math/MathML',
      'svg'   => 'http://www.w3.org/2000/svg'
    }

    module MediaType
      class UnsupportedError < StandardError; end

      ROOTFILE = 'application/oebps-package+xml'
      IMAGE = %w[
        image/gif
        image/jpeg
        image/png
        image/svg+xml
      ]
      APPLICATION = %w[
        application/xhtml+xml
        application/x-dtbncx+xml
        application/vnd.ms-opentype
        application/font-woff
        application/smil+xml
        application/pls+xml
      ]
      AUDIO = %w[
        audio/mpeg
        audio/mp4
      ]
      TEXT = %w[
        text/css
        text/javascript
      ]
      CORE = IMAGE + APPLICATION + AUDIO + TEXT
    end
  end

  include Constants
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
epub-parser-0.1.2 lib/epub/constants.rb
epub-parser-0.1.1 lib/epub/constants.rb