Documentation
¶
Index ¶
- Constants
- func AddHandler(re *regexp.Regexp, name string, fn HandlerFunc, namespaces ...string)
- func AddHandlerAfter(re *regexp.Regexp, name string, after []string, fn HandlerFunc, ...)
- func AddHandlerAfterWithPriority(re *regexp.Regexp, name string, priority int, after []string, fn HandlerFunc, ...)
- func AddHandlerWithPriority(re *regexp.Regexp, name string, priority int, fn HandlerFunc, ...)
- func AddSignature(prefix []byte, contentType string) error
- func AddTextExtensionType(ext, contentType string) error
- func ContentType(r io.Reader) (string, map[string]string, error)
- func ExtensionByType(contentType string) string
- func HTTPErr(err error) error
- type Err
- type HandlerFunc
- type Metadata
- type NamedReader
- type Option
- func WithAcoustID(client *acoustid.Client) Option
- func WithContentType(contentType string) Option
- func WithImageDPI(dpi int) Option
- func WithMaxImageDimension(pixels int) Option
- func WithMaxSize(size int64) Option
- func WithNamespace(ns ...string) Option
- func WithPassword(password string) Option
- func WithRange(r string) Option
- func WithTMDB(client *tmdb.Client) Option
- func WithTMDBEpisode(show, season, episode uint64) Option
- func WithTMDBMovie(id uint64) Option
- func WithTracer(tracer trace.Tracer) Option
- type Opts
- func (o *Opts) AcoustID() *acoustid.Client
- func (o *Opts) ContentType() string
- func (o *Opts) Get(ns, key string) Metadata
- func (o *Opts) HasImageDPI() bool
- func (o *Opts) HasNamespace(ns string) bool
- func (o *Opts) ImageDPI() int
- func (o *Opts) MaxImageDimension() int
- func (o *Opts) Password() string
- func (o *Opts) Range() (offset, limit uint64)
- func (o *Opts) TMDB() *tmdb.Client
- func (o *Opts) TMDBEpisode() (show, season, episode uint64)
- func (o *Opts) TMDBMovie() uint64
Constants ¶
const ( // Separator is between the namespace and key of metadata, such as // dc:title Separator = ':' // DefaultPriority is the priority of a handler which is added with // AddHandler. A handler with a higher priority has its metadata first, // and in place of the metadata with the same namespace and key from a // handler with a lower priority (see AddHandlerWithPriority). DefaultPriority = 0 // MetadataNamespace is the namespace of the metadata about the input // itself, such as its kind, as metadata:kind MetadataNamespace = "metadata" // MarkdownNamespace is the namespace of a document's content as // Markdown, which a handler returns only when it's requested MarkdownNamespace = "markdown" // KindKey is the key of the kind of the input, such as a book, in the // metadata namespace (see the kinds in the dublincore package) KindKey = "kind" // ArtworkNamespace is the namespace of images which represent a // document, such as the thumbnails of its pages, which a handler // returns only when it's requested, as extracting them is expensive ArtworkNamespace = "artwork" // Namespace for artwork NamespaceArtwork = "artwork" // Namespace for markdown text NamespaceMarkdown = "markdown" )
const ( ContentTypeTextPlain = "text/plain" ContentTypeTextHTML = "text/html" ContentTypeTextXML = "text/xml" )
Variables ¶
This section is empty.
Functions ¶
func AddHandler ¶
func AddHandler(re *regexp.Regexp, name string, fn HandlerFunc, namespaces ...string)
Add a metadata handler for a given regular expression, along with a short name identifying it (e.g. "ffmpeg", "tmdb", "artwork" - used to name its span, "metadata.Handler.<name>", so it's distinguishable from other handlers in a trace) and the namespaces (e.g. "exif", "tiff") of metadata it can produce. A caller that requests specific namespaces via WithNamespace will only run handlers registered for one of those namespaces. The handler has the default priority, DefaultPriority.
func AddHandlerAfter ¶
func AddHandlerAfter(re *regexp.Regexp, name string, after []string, fn HandlerFunc, namespaces ...string)
AddHandlerAfter adds a metadata handler, as AddHandler does, which uses the metadata of other handlers, in the namespaces after, such as a video's duration in the video namespace. It runs once the handlers which can produce them have finished, and gets their metadata from Opts.Get. Those handlers run even when their namespaces weren't requested, though their metadata isn't returned. A handler doesn't get the metadata of other handlers added with AddHandlerAfter, which run alongside it. The handler has the default priority, DefaultPriority.
func AddHandlerAfterWithPriority ¶
func AddHandlerAfterWithPriority(re *regexp.Regexp, name string, priority int, after []string, fn HandlerFunc, namespaces ...string)
AddHandlerAfterWithPriority adds a metadata handler which uses the metadata of other handlers, as AddHandlerAfter does, with a priority, as AddHandlerWithPriority does, such as a handler whose title is better than the title of the handlers which ran first.
func AddHandlerWithPriority ¶
func AddHandlerWithPriority(re *regexp.Regexp, name string, priority int, fn HandlerFunc, namespaces ...string)
AddHandlerWithPriority adds a metadata handler, as AddHandler does, with a priority, which is DefaultPriority, zero, or higher for a handler whose metadata is better than others', such as the thumbnail embedded in a photo, rather than the photo itself. Extract returns the metadata of the handlers with the highest priority first, and of those with the same priority in the order they were added. Metadata with the same namespace and key as metadata from a handler with a higher priority isn't returned, but handlers with the same priority can each return it, such as more than one dc:creator.
func AddSignature ¶
AddSignature registers the type of content which starts with the prefix, such as image/vnd.adobe.photoshop for 8BPS, or application/rtf for {\rtf, which content which http.DetectContentType detects as binary, or as plain text, has, rather than the type of its extension, so it's detected without its extension, or with the wrong one. The prefix is at most 512 bytes, and the longest prefix which content starts with is its type.
func AddTextExtensionType ¶
AddTextExtensionType registers the type of text with the extension, such as text/x-typescript for .ts, which refines content sniffed as plain text, as mime.AddExtensionType's does, but is never the type of content by its extension alone, so content which isn't text, such as an MPEG transport stream, has the type it otherwise has. The extension starts with a dot, and is matched without case.
func ContentType ¶
Type returns the MIME type of the given file, along with a map of any additional metadata that was extracted from the file. If the MIME type cannot be determined, an error is returned.
func ExtensionByType ¶ added in v1.0.2
ExtensionByType returns the usual extension of a content type, with its dot, such as .jpg for image/jpeg, or an empty string when it has none. It's the type's preferred extension, when it has one, or else the usual extension of a common type, or else the first of its extensions which the mime package knows, or else the first extension of a type of text (see AddTextExtensionType). The type's parameters, such as a charset, are ignored.
Types ¶
type Err ¶
type Err uint
const ( ErrBadParameter Err = http.StatusBadRequest ErrNotFound Err = http.StatusNotFound ErrInternalError Err = http.StatusInternalServerError ErrNotImplemented Err = http.StatusNotImplemented )
func (Err) HTTP ¶
func (e Err) HTTP() httpresponse.Err
type HandlerFunc ¶
HandlerFunc is a function that can be used to extract metadata from a given reader. The context can be used to cancel or time out long-running extraction. Opts carries the options passed to Extract; in particular Opts.HasNamespace can be used to check whether a specific namespace (e.g. "artwork") was requested via WithNamespace, which handlers that do expensive work for a single namespace should use to opt in only when that namespace was explicitly requested. A handler can return metadata in any of its namespaces, as Extract returns only the metadata in the namespaces which were requested.
func GetHandlers ¶
func GetHandlers(contentType string) []HandlerFunc
GetHandlers returns all handlers registered for a given content type, or nil if no handler is registered for that content type.
type Metadata ¶
type Metadata interface {
// Return the namespace of the metadata, such as "exif"
NS() string
// Return the metadata key within its namespace, such as
// "DateTimeOriginal"
Key() string
// Return the value as a string. Returns the mimetype if the value is a
// byte slice, and the mimetype can be detected.
Value() string
// Returns the value as a byte slice
Bytes() []byte
// Returns the value as an image, or nil if it isn't one
Image() image.Image
// Returns the value as an interface
Any() any
}
Metadata is an entry of metadata, with a key and a value. The value can be retrieved as a string, as bytes, as an image (for artwork), or as is.
func Extract ¶
func Extract(parent context.Context, r io.Reader, opts ...Option) (_ string, _ []Metadata, err error)
Extract runs every handler registered for the content type of r against it, concurrently, and returns the content type, with its parameters, such as "text/html; charset=utf-8", and the combined metadata from all of them. The content type is set with WithContentType, or else detected from r. When r has a name, and no handler returned a title, its title is from its name, which is returned even when there is no handler for the content type, along with ErrNotImplemented. The metadata which was extracted is returned even when a handler fails.
r is read from its current position, and each handler reads, and can seek in, its own section of it. When r can't be read at an offset and seeked, such as a pipe, it's copied to a temporary file first, which is removed when Extract returns. Use WithMaxSize to limit the size of r.
func KindMetadata ¶
KindMetadata returns the metadata of the kind of an input, such as a book (see the kinds in the dublincore package), which a handler returns for the inputs it handles: the kind, as metadata:kind, and its DCMI type, such as Text, as dc:type. It returns nil when the kind is empty. A handler which returns it registers the metadata and dc namespaces.
type NamedReader ¶
NamedReader is a reader with a name, such as a file. The extension of the name is used to detect the content type, and a handler may use the name itself (e.g. to look up TMDB metadata).
type Option ¶
func WithAcoustID ¶
Set the client of AcoustID, which a handler of audio uses to look up the AcoustID identifier of a recording which doesn't have one in its tags, from its fingerprint, which is from its tags, or else from its audio, when it's built with Chromaprint. When not set, audio isn't looked up.
func WithContentType ¶
Set the content type of the reader, which selects the handlers to run. When not set, the content type is detected from the reader.
func WithImageDPI ¶
Set the resolution of an image of a page, in dots per inch, such as the artwork of a scanned page, which a handler downscales an image to, from the size of its page, keeping its aspect ratio, so an A4 page at 300 dpi, as for OCR, is 2480 by 3508 pixels. An image is never upscaled. When it's set, an image of a page is at its resolution, however large, and when it isn't, it's 150 dpi, and at most the largest dimension (see WithMaxImageDimension).
func WithMaxImageDimension ¶
Set the largest width or height of an image, in pixels, which a handler downscales an image to fit, keeping its aspect ratio. It's the size of an image without a size of its own, such as a photo, and the most an image of a page can be, such as a poster, unless its resolution is set (see WithImageDPI). When not set, it's 1024 pixels.
func WithMaxSize ¶
Set the maximum size of the input, in bytes. A larger input is a bad parameter, and a stream is copied to a temporary file only up to this size. When not set, or zero, there is no limit.
func WithNamespace ¶
Return only the metadata from the given namespaces.
func WithPassword ¶
Set the password of a document which is encrypted, such as a PDF document which needs a password to be opened, which a handler uses to read it
func WithRange ¶
WithRange sets the part of a document's Markdown which a handler of the markdown namespace returns, as a range of bytes, so a long document is read a part at a time: from:to, from:, :to, or : for all of it. When not set, or empty, it's the first kilobyte. A range which ends holds at least a whole character.
func WithTMDB ¶
Set the client of TMDB, which a handler of videos uses to look up the movie or TV episode which a video is, from its name. When not set, videos aren't looked up.
func WithTMDBEpisode ¶
Set the episode of a TV show on TMDB which a video is, by its show's identifier, such as 1396 for Breaking Bad, and its season and episode numbers, which is got rather than looked up from the video's name, when a TMDB client is set (see WithTMDB). An episode has an identifier of its own, but TMDB gets an episode only by its show, season and episode. The season is zero for a show's specials. It replaces a movie set with WithTMDBMovie.
func WithTMDBMovie ¶
Set the movie on TMDB which a video is, by its identifier, such as 603 for The Matrix, which is got rather than looked up from the video's name, when a TMDB client is set (see WithTMDB). It replaces an episode set with WithTMDBEpisode.
func WithTracer ¶
Set the otel tracer to use for metadata operations.
type Opts ¶
type Opts struct {
// contains filtered or unexported fields
}
func (*Opts) AcoustID ¶
AcoustID returns the client of AcoustID set via WithAcoustID, or nil when it wasn't set, when audio isn't looked up
func (*Opts) ContentType ¶
ContentType returns the content type that was set via WithContentType, or detected from the reader when it wasn't set.
func (*Opts) Get ¶
Get returns the first metadata with the namespace and key from the handlers which ran before this one, or nil when there's none. Only a handler added with AddHandlerAfter gets it, of the namespaces it uses.
func (*Opts) HasImageDPI ¶
HasImageDPI reports whether the resolution of an image of a page was set via WithImageDPI, when an image of a page is at its resolution, rather than at most the largest dimension
func (*Opts) HasNamespace ¶
HasNamespace reports whether ns was requested via WithNamespace,
func (*Opts) ImageDPI ¶
ImageDPI returns the resolution of an image of a page, in dots per inch, which a handler downscales an image to, set via WithImageDPI, or 150 dpi when it wasn't set
func (*Opts) MaxImageDimension ¶
MaxImageDimension returns the largest width or height of an image, in pixels, which a handler downscales an image to fit, set via WithMaxImageDimension, or 1024 pixels when it wasn't set
func (*Opts) Password ¶
Password returns the password of a document which is encrypted, set via WithPassword, or an empty string when it wasn't set
func (*Opts) Range ¶
Range returns the byte offset and limit of the part of the Markdown which a handler returns, set via WithRange, or the first kilobyte when it wasn't set. A limit of zero is to the end.
func (*Opts) TMDB ¶
TMDB returns the client of TMDB set via WithTMDB, or nil when it wasn't set, when videos aren't looked up
func (*Opts) TMDBEpisode ¶
TMDBEpisode returns the identifier of the show on TMDB, and the season and episode numbers, set via WithTMDBEpisode, or zeros when they weren't set
Directories
¶
| Path | Synopsis |
|---|---|
|
Package application registers the handlers of application documents, such as PDF, PostScript, office, iWork and RTF documents, EPUB and Kindle books, archives, and Google documents, so importing it anonymously registers them all
|
Package application registers the handlers of application documents, such as PDF, PostScript, office, iWork and RTF documents, EPUB and Kindle books, archives, and Google documents, so importing it anonymously registers them all |
|
archive
Package archive registers handlers of archives, which are zip files, such as Java archives, Android apps and comic books, tar files, and gzip and bzip2 files, and tar files in them, which return the number of files in them, their size, and when they were last modified, and a table of their contents as Markdown
|
Package archive registers handlers of archives, which are zip files, such as Java archives, Android apps and comic books, tar files, and gzip and bzip2 files, and tar files in them, which return the number of files in them, their size, and when they were last modified, and a table of their contents as Markdown |
|
epub
Package epub registers handlers of EPUB books, which return their metadata, their cover, and their text as Markdown
|
Package epub registers handlers of EPUB books, which return their metadata, their cover, and their text as Markdown |
|
google
Package google registers a handler of the files which Google Drive for desktop creates for Google documents, such as .gdoc files, which return the type of the document, its identifier, and its URL
|
Package google registers a handler of the files which Google Drive for desktop creates for Google documents, such as .gdoc files, which return the type of the document, its identifier, and its URL |
|
iwork
Package iwork registers a handler of documents of Apple's iWork applications, Pages, Keynote and Numbers, which are zip archives, which returns their kind, the properties of a document from iWork '09, such as its title and authors, the template and version of a document from iWork 2013 or later, and their previews, as artwork
|
Package iwork registers a handler of documents of Apple's iWork applications, Pages, Keynote and Numbers, which are zip archives, which returns their kind, the properties of a document from iWork '09, such as its title and authors, the template and version of a document from iWork 2013 or later, and their previews, as artwork |
|
mobi
Package mobi registers handlers of Mobipocket and Kindle books, such as .mobi, .prc, .azw and .azw3 files, which return their metadata, their cover, and their text as Markdown
|
Package mobi registers handlers of Mobipocket and Kindle books, such as .mobi, .prc, .azw and .azw3 files, which return their metadata, their cover, and their text as Markdown |
|
msoffice
Package msoffice registers handlers of the binary Word, Excel and PowerPoint documents from before Office 2007, such as .doc, .xls and .ppt files, of Visio drawings and Project plans, such as .vsd and .mpp files, and of Works documents, such as .wps files, which are compound files, which return their properties, and a note that their content can't be read yet
|
Package msoffice registers handlers of the binary Word, Excel and PowerPoint documents from before Office 2007, such as .doc, .xls and .ppt files, of Visio drawings and Project plans, such as .vsd and .mpp files, and of Works documents, such as .wps files, which are compound files, which return their properties, and a note that their content can't be read yet |
|
office
Package office registers handlers of office documents, which are Word, Excel and PowerPoint documents, and OpenDocument text documents, spreadsheets and presentations, which are zip archives of XML, and which return their properties, their thumbnail, and their content as Markdown
|
Package office registers handlers of office documents, which are Word, Excel and PowerPoint documents, and OpenDocument text documents, spreadsheets and presentations, which are zip archives of XML, and which return their properties, their thumbnail, and their content as Markdown |
|
pdf
Package pdf registers a handler of PDF documents, which returns their properties, from their XMP metadata, or their document information
|
Package pdf registers a handler of PDF documents, which returns their properties, from their XMP metadata, or their document information |
|
postscript
Package postscript registers a handler of PostScript documents and EPS files, such as .ps, .eps and older Illustrator .ai files, which returns their kind, what their comments say about them, such as their title, who they were made for, when, and their pages and size, and the preview of an EPS file, as artwork
|
Package postscript registers a handler of PostScript documents and EPS files, such as .ps, .eps and older Illustrator .ai files, which returns their kind, what their comments say about them, such as their title, who they were made for, when, and their pages and size, and the preview of an EPS file, as artwork |
|
rtf
Package rtf registers a handler of RTF documents, which returns their kind, a document, the properties in their info group, such as their title, author and when they were created, and their text as Markdown
|
Package rtf registers a handler of RTF documents, which returns their kind, a document, the properties in their info group, such as their title, author and when they were created, and their text as Markdown |
|
Package audio registers the handlers of audio, and of playlists, and the lookup of audio on AcoustID, so importing it anonymously registers them all.
|
Package audio registers the handlers of audio, and of playlists, and the lookup of audio on AcoustID, so importing it anonymously registers them all. |
|
acoustid
Package acoustid registers a handler of audio which looks up a recording on AcoustID, when an AcoustID client is set (see metadata.WithAcoustID), for its MusicBrainz recording and artist identifiers, when they aren't in its tags: by its AcoustID identifier, when it's in its tags, or else, or when it isn't linked to a recording, by the fingerprint of its audio, when it's built with cgo and Chromaprint (see the chromaprint package), whose match is its AcoustID identifier.
|
Package acoustid registers a handler of audio which looks up a recording on AcoustID, when an AcoustID client is set (see metadata.WithAcoustID), for its MusicBrainz recording and artist identifiers, when they aren't in its tags: by its AcoustID identifier, when it's in its tags, or else, or when it isn't linked to a recording, by the fingerprint of its audio, when it's built with cgo and Chromaprint (see the chromaprint package), whose match is its AcoustID identifier. |
|
ffmpeg
Package ffmpeg registers handlers of audio, such as MP3, AAC, FLAC and WAV files, which return their tags, such as their title, artists and album, their MusicBrainz identifiers, their duration and codec, and their cover art as artwork, which use ffmpeg, so need cgo
|
Package ffmpeg registers handlers of audio, such as MP3, AAC, FLAC and WAV files, which return their tags, such as their title, artists and album, their MusicBrainz identifiers, their duration and codec, and their cover art as artwork, which use ffmpeg, so need cgo |
|
playlist
Package playlist registers a handler of playlists, M3U, HLS and PLS files, which returns their format, title, entries and duration
|
Package playlist registers a handler of playlists, M3U, HLS and PLS files, which returns their format, title, entries and duration |
|
cmd
|
|
|
metadata
command
|
|
|
Package image registers the handlers of images, such as raster images and SVG images, and EXIF metadata when built with cgo, so importing it anonymously registers them all
|
Package image registers the handlers of images, such as raster images and SVG images, and EXIF metadata when built with cgo, so importing it anonymously registers them all |
|
exif
Package exif registers a handler of the EXIF metadata of JPEG images, such as the camera, the exposure, when the photo was taken and where, as the tiff and exif namespaces, which uses libexif, so needs cgo
|
Package exif registers a handler of the EXIF metadata of JPEG images, such as the camera, the exposure, when the photo was taken and where, as the tiff and exif namespaces, which uses libexif, so needs cgo |
|
heif
Package heif registers handlers of HEIF images, such as HEIC photos from an iPhone, and AVIF images, which return their EXIF metadata, as the JPEG handler does, their XMP metadata, and their embedded thumbnail as artwork, which uses libheif, so needs cgo.
|
Package heif registers handlers of HEIF images, such as HEIC photos from an iPhone, and AVIF images, which return their EXIF metadata, as the JPEG handler does, their XMP metadata, and their embedded thumbnail as artwork, which uses libheif, so needs cgo. |
|
photoshop
Package photoshop registers handlers of Photoshop documents, PSD and PSB files, which return their channels, depth and color mode, their XMP and IPTC metadata, their EXIF metadata when built with cgo, and their embedded thumbnail as artwork.
|
Package photoshop registers handlers of Photoshop documents, PSD and PSB files, which return their channels, depth and color mode, their XMP and IPTC metadata, their EXIF metadata when built with cgo, and their embedded thumbnail as artwork. |
|
raster
Package raster registers handlers of raster images, such as JPEG, PNG, GIF, BMP, TIFF and WebP images, which return their format and size, and the image itself as artwork
|
Package raster registers handlers of raster images, such as JPEG, PNG, GIF, BMP, TIFF and WebP images, which return their format and size, and the image itself as artwork |
|
raw
Package raw registers handlers of RAW images from cameras, such as Canon CR2, Nikon NEF and Olympus ORF images, which return their EXIF metadata, as the JPEG handler does, the camera and shooting parameters which libraw reads, their format and size, and their embedded preview as artwork, which use libraw and libexif, so need cgo
|
Package raw registers handlers of RAW images from cameras, such as Canon CR2, Nikon NEF and Olympus ORF images, which return their EXIF metadata, as the JPEG handler does, the camera and shooting parameters which libraw reads, their format and size, and their embedded preview as artwork, which use libraw and libexif, so need cgo |
|
svg
Package svg registers a handler of SVG images, which returns their size, their title and description, and their Dublin Core metadata
|
Package svg registers a handler of SVG images, which returns their size, their title and description, and their Dublin Core metadata |
|
internal
|
|
|
artwork
Package artwork downscales and encodes images which represent documents, such as the scans of their pages, their thumbnails, and their covers
|
Package artwork downscales and encodes images which represent documents, such as the scans of their pages, their thumbnails, and their covers |
|
byterange
Package byterange parses a range of bytes, such as of the Markdown of a document, which is read a part at a time
|
Package byterange parses a range of bytes, such as of the Markdown of a document, which is read a part at a time |
|
contentline
Package contentline reads and writes the content lines of vCard and iCalendar, which have the same rules: a property's name, its parameters, and its value, folded so no line is more than 75 octets, with the characters of text values escaped.
|
Package contentline reads and writes the content lines of vCard and iCalendar, which have the same rules: a property's name, its parameters, and its value, folded so no line is more than 75 octets, with the characters of text values escaped. |
|
input
Package input gives each handler of an input its own section of it, which it can read independently and concurrently, and seek in, copying an input which can't be read at an offset, such as a pipe, to a temporary file
|
Package input gives each handler of an input its own section of it, which it can read independently and concurrently, and seek in, copying an input which can't be read at an offset, such as a pipe, to a temporary file |
|
isbn
Package isbn parses International Standard Book Numbers, which identify books, such as in their metadata
|
Package isbn parses International Standard Book Numbers, which identify books, such as in their metadata |
|
markdown
Package markdown is the writer of the content of a document as Markdown, which a handler of the markdown namespace writes, and which keeps the part of it in the range set via metadata.WithRange
|
Package markdown is the writer of the content of a document as Markdown, which a handler of the markdown namespace writes, and which keeps the part of it in the range set via metadata.WithRange |
|
meta
Package meta provides metadata entries for the handlers of content types
|
Package meta provides metadata entries for the handlers of content types |
|
testassert
Package testassert checks the conditions of tests, as testify's assert and require do, so tests which use them can be ported without testify
|
Package testassert checks the conditions of tests, as testify's assert and require do, so tests which use them can be ported without testify |
|
text
Package text reads text documents as UTF-8, from whatever character set they're in, and writes plain text as Markdown, so it's shown as it is
|
Package text reads text documents as UTF-8, from whatever character set they're in, and writes plain text as Markdown, so it's shown as it is |
|
tiff
Package tiff reads the tags of the TIFF structure of EXIF data, in a JPEG image or a TIFF image, which libexif doesn't expose, or which are needed without cgo, such as the orientation of an image and its thumbnail
|
Package tiff reads the tags of the TIFF structure of EXIF data, in a JPEG image or a TIFF image, which libexif doesn't expose, or which are needed without cgo, such as the orientation of an image and its thumbnail |
|
title
Package title knows the titles which applications give documents which aren't their titles, such as the name of the file a document was made from, so a document's title is from its own name instead
|
Package title knows the titles which applications give documents which aren't their titles, such as the name of the file a document was made from, so a document's title is from its own name instead |
|
zipdoc
Package zipdoc reads documents which are zip archives, such as office documents and EPUB books: the archive, the XML files in it, and the images in it, such as a thumbnail or a cover
|
Package zipdoc reads documents which are zip archives, such as office documents and EPUB books: the archive, the XML files in it, and the images in it, such as a thumbnail or a cover |
|
Package message registers the handlers of messages, such as email messages, and of mailboxes, so importing it anonymously registers them all
|
Package message registers the handlers of messages, such as email messages, and of mailboxes, so importing it anonymously registers them all |
|
email
Package email registers a handler of email messages, such as .eml files, which returns their kind, their subject, sender, date, identifier and the start of their text as Dublin Core, their addresses and attachments, and their headers and text as Markdown
|
Package email registers a handler of email messages, such as .eml files, which returns their kind, their subject, sender, date, identifier and the start of their text as Dublin Core, their addresses and attachments, and their headers and text as Markdown |
|
mbox
Package mbox registers a handler of mailboxes in the mbox format, such as Eudora's .mbx files, which returns their kind, how many messages they have, when the first and last were sent, their subjects and senders, and their messages as Markdown
|
Package mbox registers a handler of mailboxes in the mbox format, such as Eudora's .mbx files, which returns their kind, how many messages they have, when the first and last were sent, their subjects and senders, and their messages as Markdown |
|
pkg
|
|
|
acoustid
Package acoustid implements a client for the AcoustID API, which looks up the recordings which a Chromaprint fingerprint of audio is, and their MusicBrainz identifiers https://acoustid.org/webservice
|
Package acoustid implements a client for the AcoustID API, which looks up the recordings which a Chromaprint fingerprint of audio is, and their MusicBrainz identifiers https://acoustid.org/webservice |
|
acoustid/schema
Package schema is the responses of the AcoustID API
|
Package schema is the responses of the AcoustID API |
|
chromaprint
Package chromaprint makes the Chromaprint fingerprint of audio, which AcoustID looks up (see the acoustid package).
|
Package chromaprint makes the Chromaprint fingerprint of audio, which AcoustID looks up (see the acoustid package). |
|
eml
Package eml reads email messages, in the Internet Message Format, with MIME parts, such as .eml files, and the messages in a mailbox: their subject, addresses, date and identifier, their text and HTML, decoded from their transfer encoding and character set, and their attachments
|
Package eml reads email messages, in the Internet Message Format, with MIME parts, such as .eml files, and the messages in a mailbox: their subject, addresses, date and identifier, their text and HTML, decoded from their transfer encoding and character set, and their attachments |
|
geo
Package geo defines a position on the Earth, as a latitude and longitude in decimal degrees, and optionally an altitude in metres, which is text in degrees, minutes and seconds, such as 52°28'21.71"N 13°20'16.33"E 91.5m, or decimal degrees, such as "52.472697,13.337869,91.5", as in a geo URI (RFC 5870), and JSON such as {"lat":52.472697,"long":13.337869,"alt":91.5}
|
Package geo defines a position on the Earth, as a latitude and longitude in decimal degrees, and optionally an altitude in metres, which is text in degrees, minutes and seconds, such as 52°28'21.71"N 13°20'16.33"E 91.5m, or decimal degrees, such as "52.472697,13.337869,91.5", as in a geo URI (RFC 5870), and JSON such as {"lat":52.472697,"long":13.337869,"alt":91.5} |
|
ical
Package ical defines an iCalendar, a calendar of events and tasks, which is encoded and decoded as iCalendar 2.0, and its images, which can be embedded in it, as artwork.
|
Package ical defines an iCalendar, a calendar of events and tasks, which is encoded and decoded as iCalendar 2.0, and its images, which can be embedded in it, as artwork. |
|
iptc
Package iptc reads IPTC metadata, in the Information Interchange Model (IIM), which is a sequence of datasets, such as the title, keywords and caption of a photo, in a JPEG image or a Photoshop document
|
Package iptc reads IPTC metadata, in the Information Interchange Model (IIM), which is a sequence of datasets, such as the title, keywords and caption of a photo, in a JPEG image or a Photoshop document |
|
iwork
Package iwork reads documents of Apple's iWork applications, Pages, Keynote and Numbers, which are zip archives: the properties of a document from iWork '09, such as its title and authors, and the template and version of a document from iWork 2013 and later, and their previews
|
Package iwork reads documents of Apple's iWork applications, Pages, Keynote and Numbers, which are zip archives: the properties of a document from iWork '09, such as its title and authors, and the template and version of a document from iWork 2013 and later, and their previews |
|
mbox
Package mbox reads mailboxes in the mbox format, such as Eudora's .mbx files, and Thunderbird's and Unix mail's mailboxes, which are messages, each after a line which starts with From, the sender, and the date it was received, a message at a time
|
Package mbox reads mailboxes in the mbox format, such as Eudora's .mbx files, and Thunderbird's and Unix mail's mailboxes, which are messages, each after a line which starts with From, the sender, and the date it was received, a message at a time |
|
postscript
Package postscript reads the comments of PostScript documents, and of Encapsulated PostScript (EPS) files, which follow Adobe's Document Structuring Conventions (DSC), such as their title, the application which made them, who they were made for, when, and their pages and bounding box, and the preview of an EPS file with a DOS EPS header
|
Package postscript reads the comments of PostScript documents, and of Encapsulated PostScript (EPS) files, which follow Adobe's Document Structuring Conventions (DSC), such as their title, the application which made them, who they were made for, when, and their pages and bounding box, and the preview of an EPS file with a DOS EPS header |
|
rational
Package rational defines a rational number, a numerator and denominator, as in EXIF and XMP metadata, such as an exposure time of 1/60 second, which is text such as "1/60", and a number in JSON
|
Package rational defines a rational number, a numerator and denominator, as in EXIF and XMP metadata, such as an exposure time of 1/60 second, which is text such as "1/60", and a number in JSON |
|
rtf
Package rtf reads RTF documents: the text of their paragraphs, and the properties in their info group, such as their title, author, and when they were created
|
Package rtf reads RTF documents: the text of their paragraphs, and the properties in their info group, such as their title, author, and when they were created |
|
tmdb
Package tmdb implements a client for the TMDB API https://developer.themoviedb.org/docs/getting-started
|
Package tmdb implements a client for the TMDB API https://developer.themoviedb.org/docs/getting-started |
|
vcard
Package vcard defines a vCard, a contact, such as a person or an organisation, which is encoded as vCard 4.0, and decoded from vCard 2.1, 3.0 or 4.0, and its photo, which can be embedded in it, as artwork.
|
Package vcard defines a vCard, a contact, such as a person or an organisation, which is encoded as vCard 4.0, and decoded from vCard 2.1, 3.0 or 4.0, and its photo, which can be embedded in it, as artwork. |
|
xmp
Package xmp provides XMP (Extensible Metadata Platform) encoding and decoding.
|
Package xmp provides XMP (Extensible Metadata Platform) encoding and decoding. |
|
Package text registers the handlers of text documents, such as HTML, Markdown, plain text, source code, comma-separated values, vCards, iCalendars and XML, so importing it anonymously registers them all
|
Package text registers the handlers of text documents, such as HTML, Markdown, plain text, source code, comma-separated values, vCards, iCalendars and XML, so importing it anonymously registers them all |
|
calendar
Package calendar registers handlers of iCalendars, calendars of events and tasks, which return their events, which are searched for by when and where they are, a description of them in words, and their image as artwork
|
Package calendar registers handlers of iCalendars, calendars of events and tasks, which return their events, which are searched for by when and where they are, a description of them in words, and their image as artwork |
|
csv
Package csv registers a handler of comma-separated and tab-separated values, such as .csv and .tsv files, whose delimiter, which can be a comma, tab, semicolon or bar, is detected, which returns their kind, data, how many rows and columns they have, their headers, when their first row is one, and their rows as a Markdown table
|
Package csv registers a handler of comma-separated and tab-separated values, such as .csv and .tsv files, whose delimiter, which can be a comma, tab, semicolon or bar, is detected, which returns their kind, data, how many rows and columns they have, their headers, when their first row is one, and their rows as a Markdown table |
|
markdown
Package markdown registers handlers of Markdown documents, which return their title, and the metadata in their front matter, and their content
|
Package markdown registers handlers of Markdown documents, which return their title, and the metadata in their front matter, and their content |
|
plain
Package plain registers a handler of plain text, which returns its content as Markdown, decoded from its character set
|
Package plain registers a handler of plain text, which returns its content as Markdown, decoded from its character set |
|
sourcecode
Package sourcecode registers a handler of source code, and the data and build files with it, such as YAML, JSON and TOML, which returns its content as Markdown, as a code block in its language
|
Package sourcecode registers a handler of source code, and the data and build files with it, such as YAML, JSON and TOML, which returns its content as Markdown, as a code block in its language |
|
vcard
Package vcard registers handlers of vCards, which are contacts, such as a person in an address book, which return the details of the first contact, its photo as artwork, and the contacts as Markdown
|
Package vcard registers handlers of vCards, which are contacts, such as a person in an address book, which return the details of the first contact, its photo as artwork, and the contacts as Markdown |
|
xml
Package xml registers a handler of XML documents, which returns their kind, which is data, their root element and its namespace, their DOCTYPE, and their title, when they have one, such as an RSS feed's, and their content as Markdown, as an XML code block.
|
Package xml registers a handler of XML documents, which returns their kind, which is data, their root element and its namespace, their DOCTYPE, and their title, when they have one, such as an RSS feed's, and their content as Markdown, as an XML code block. |
|
Package video registers the handlers of videos, and of their subtitles, and the lookup of videos on TMDB, so importing it anonymously registers them all.
|
Package video registers the handlers of videos, and of their subtitles, and the lookup of videos on TMDB, so importing it anonymously registers them all. |
|
ffmpeg
Package ffmpeg registers handlers of videos, such as MP4, QuickTime and AVI videos, which return the tags of their container, their duration, the codec and size of their video, and the codec of their audio, and their cover art as artwork, which use ffmpeg, so need cgo
|
Package ffmpeg registers handlers of videos, such as MP4, QuickTime and AVI videos, which return the tags of their container, their duration, the codec and size of their video, and the codec of their audio, and their cover art as artwork, which use ffmpeg, so need cgo |
|
subtitle
Package subtitle registers a handler of SubRip subtitles, .srt files, which returns their language, from their name, and their cues as Markdown
|
Package subtitle registers a handler of SubRip subtitles, .srt files, which returns their language, from their name, and their cues as Markdown |
|
tmdb
Package tmdb registers a handler of videos which looks up the movie or TV episode which a video is on TMDB, when a TMDB client is set (see metadata.WithTMDB): by its identifier, when it's set, and otherwise by searching with the video's title, and its year, season and episode when they're known, from its tags, such as the show of an episode from iTunes, and otherwise from its name (see tmdb.ExtractQuery).
|
Package tmdb registers a handler of videos which looks up the movie or TV episode which a video is on TMDB, when a TMDB client is set (see metadata.WithTMDB): by its identifier, when it's set, and otherwise by searching with the video's title, and its year, season and episode when they're known, from its tags, such as the show of an episode from iTunes, and otherwise from its name (see tmdb.ExtractQuery). |