Skip to content

Latest commit

 

History

History
411 lines (324 loc) · 10.3 KB

mediawiki.md

File metadata and controls

411 lines (324 loc) · 10.3 KB

Extension: MediaWiki

Retrieve information from MediaWiki image pages, like the actual image file URL and EXIF metadata.

On entities with URL relationship types that represent images, this extension will find those URLs that appear to be MediaWiki image pages, and use the MediaWiki API to fetch information about the image. This information will include the actual file URL, so you can use it as the src in an <img> tag (for example).

MediaWiki image URLs are assumed to be those with a path that starts with /wiki/Image: or /wiki/File:.

This extension uses its own cache, separate from the MusicBrainz loader cache.

Configuration

This extension can be configured using environment variables:

  • MEDIAWIKI_CACHE_SIZE: The number of items to keep in the cache. Defaults to GRAPHBRAINZ_CACHE_SIZE if defined, or 8192.
  • MEDIAWIKI_CACHE_TTL: The number of seconds to keep items in the cache. Defaults to GRAPHBRAINZ_CACHE_TTL if defined, or 86400000 (one day).

Schema Types

Table of Contents

Objects

Artist

🔹 This type has been extended. See the base schema for a description and additional fields.

Field Argument Type Description
mediaWikiImages [MediaWikiImage]!

Artist images found at MediaWiki URLs in the artist’s URL relationships. Defaults to URL relationships with the type “image”. This field is provided by the MediaWiki extension.

type String

The type of URL relationship that will be selected to find images. See the possible Artist-URL relationship types.

Instrument

🔹 This type has been extended. See the base schema for a description and additional fields.

Field Argument Type Description
mediaWikiImages [MediaWikiImage]!

Instrument images found at MediaWiki URLs in the instrument’s URL relationships. Defaults to URL relationships with the type “image”. This field is provided by the MediaWiki extension.

type String

The type of URL relationship that will be selected to find images. See the possible Instrument-URL relationship types.

Label

🔹 This type has been extended. See the base schema for a description and additional fields.

Field Argument Type Description
mediaWikiImages [MediaWikiImage]!

Label images found at MediaWiki URLs in the label’s URL relationships. Defaults to URL relationships with the type “logo”. This field is provided by the MediaWiki extension.

type String

The type of URL relationship that will be selected to find images. See the possible Label-URL relationship types.

MediaWikiImage

An object describing various properties of an image stored on a MediaWiki server. The information comes the MediaWiki imageinfo API.

Field Argument Type Description
url URLString!

The URL of the actual image file.

descriptionURL URLString

The URL of the wiki page describing the image.

user String

The user who uploaded the file.

size Int

The size of the file in bytes.

width Int

The pixel width of the image.

height Int

The pixel height of the image.

canonicalTitle String

The canonical title of the file.

objectName String

The image title, brief description, or file name.

descriptionHTML String

A description of the image, potentially containing HTML.

originalDateTimeHTML String

The original date of creation of the image. May be a description rather than a parseable timestamp, and may contain HTML.

categories [String]!

A list of the categories of the image.

artistHTML String

The name of the image author, potentially containing HTML.

creditHTML String

The source of the image, potentially containing HTML.

licenseShortName String

A short human-readable license name.

licenseURL URLString

A web address where the license is described.

metadata [MediaWikiImageMetadata]!

The full list of values in the extmetadata field.

MediaWikiImageMetadata

An entry in the extmetadata field of a MediaWiki image file.

Field Argument Type Description
name String!

The name of the metadata field.

value String

The value of the metadata field. All values will be converted to strings.

source String

The source of the value.

Place

🔹 This type has been extended. See the base schema for a description and additional fields.

Field Argument Type Description
mediaWikiImages [MediaWikiImage]!

Place images found at MediaWiki URLs in the place’s URL relationships. Defaults to URL relationships with the type “image”. This field is provided by the MediaWiki extension.

type String

The type of URL relationship that will be selected to find images. See the possible Place-URL relationship types.