-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
25 changed files
with
3,611 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# IIIF extension for MediaWiki | ||
|
||
The IIIF extension is an extension to MediaWiki which offers a number of API services and associated tools for working with IIIF (International Image Interoperability Framework), such as integrating annotations, creating collections and using MediaWiki image files. Some of its features are based on Semantic MediaWiki. | ||
|
||
Documentation about installation, configuration and usage is or will be found on the CODECS website : https://codecs.vanhamel.nl/Show:Lab/IIIF. | ||
|
||
It does not include Mirador, which is part of a separate extension, but the extensions can be used together. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# IIIF extension for MediaWiki | ||
|
||
The IIIF extension is an extension to MediaWiki which offers a number of API services and associated tools for working with IIIF (International Image Interoperability Framework), such as integrating annotations, creating collections and using MediaWiki image files. Some of its features are based on Semantic MediaWiki. | ||
|
||
Documentation about installation, configuration and usage is or will be found on the CODECS website : https://codecs.vanhamel.nl/Show:Lab/IIIF. | ||
|
||
It does not include Mirador, which is part of a separate extension, but the extensions can be used together. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
{ | ||
"name": "IIIF", | ||
"version": "0.2", | ||
"type": "api", | ||
"author": [ | ||
"[https://codecs.vanhamel.nl Dennis Groenewegen]" | ||
], | ||
"url": "https://codecs.vanhamel.nl/Show:Lab/IIIF", | ||
"description": "API services and other tools for working with IIIF, such as integrating annotations, creating collections and using MediaWiki image files.", | ||
"license-name": "GPL-2.0-or-later", | ||
"requires": { | ||
"MediaWiki": ">= 1.39.0", | ||
"extensions": { | ||
} | ||
}, | ||
"MessagesDirs": { | ||
"IIIF": [ | ||
"i18n" | ||
] | ||
}, | ||
"ExtensionMessagesFiles": { | ||
"iiifMagic": "iiif.i18n.php", | ||
"iiifNamespaces": "iiif.i18n.namespaces.php" | ||
}, | ||
"AutoloadNamespaces": { | ||
"iiif\\": "src/" | ||
}, | ||
"AutoloadClasses": { | ||
"IIIFHooks": "src/IIIFHooks.php", | ||
"IIIFManifestAPI": "src/IIIFManifestAPI.php", | ||
"IIIFAnnotationsAPI": "src/IIIFAnnotationsAPI.php", | ||
"IIIFCollectionAPI": "src/IIIFCollectionAPI.php", | ||
"IIIFMwImgAPI": "src/IIIFMwImgAPI.php", | ||
"IIIFMwPresAPI": "src/IIIFMwPresAPI.php", | ||
"IIIFMwRemote": "src/IIIFMwRemote.php", | ||
"IIIFWikiAPI": "src/IIIFWikiAPI.php", | ||
"IIIFSMW": "src/IIIFSMW.php", | ||
"IIIFJson": "src/IIIFJson.php", | ||
"IIIFSpecialServ": "src/IIIFSpecialServ.php", | ||
"IIIFUtils": "src/IIIFUtils.php", | ||
"IIIFSpecial": "src/Special/iiif.Special.php", | ||
"IIIFJsonContentHandler": "src/IIIFJsonContentHandler.php", | ||
"IIIFJsonContent": "src/IIIFJsonContent.php", | ||
"IIIFConfig": "src/IIIFConfig.php" | ||
}, | ||
"Hooks": { | ||
"ParserFirstCallInit": [ "IIIFHooks::onParserFirstCallInit" ], | ||
"ContentHandlerDefaultModelFor": [ "IIIFHooks::onContentHandlerDefaultModelFor" ], | ||
"CodeEditorGetPageLanguage": [ "IIIFHooks::onCodeEditorGetPageLanguage" ], | ||
"AdminLinks": [ "IIIFHooks::addToAdminLinks" ] | ||
}, | ||
"ResourceFileModulePaths": { | ||
"localBasePath": "modules", | ||
"remoteExtPath": "IIIF/modules" | ||
}, | ||
"ResourceModules": { | ||
"ext.iiif.styles": { | ||
"class": "MediaWiki\\ResourceLoader\\CodexModule", | ||
"codexStyleOnly": "true", | ||
"styles": "ext.iiif.styles.less", | ||
"codexComponents": [ | ||
"CdxButton", | ||
"CdxCard", | ||
"CdxCheckbox", | ||
"CdxProgressBar", | ||
"CdxTextInput" | ||
] | ||
} | ||
}, | ||
"APIModules": { | ||
"iiif-annotations": "IIIFAnnotationsAPI", | ||
"iiif-manifest": "IIIFManifestAPI", | ||
"iiif-collection": "IIIFCollectionAPI", | ||
"iiif-mw-img": "IIIFMwImgAPI", | ||
"iiif-mw-pres": "IIIFMwPresAPI", | ||
"iiif-wiki": "IIIFWikiAPI" | ||
}, | ||
"SpecialPages": { | ||
"IIIF": "IIIFSpecial", | ||
"IIIFServ": "IIIFSpecialServ" | ||
}, | ||
"config_prefix": "wg", | ||
"config": { | ||
"IIIFv3QueryArg": { | ||
"value": "[[Class::Subject:manuscript items]] [[Is item in MS::@]] [[Has target URI::+]]", | ||
"description": "The SMW query argument to be used by the IIIF manifest API (v3), which queries for all annotations. Use an ampersand as placeholder for the resource page." | ||
}, | ||
"IIIFv2QueryArg": { | ||
"value": "[[Class::Subject:manuscript items]] [[Has target URI::@]]", | ||
"description": "The SMW query argument to be used by the IIIF manifest API (v2), which queries for annotations for the canvas only. Use an ampersand as placeholder for the canvas ID." | ||
}, | ||
"IIIFAnnotTextProp": { | ||
"value": "Has resource comments", | ||
"description": "The property that contains the text of the annotation." | ||
}, | ||
"IIIFAnnotTargetProp": { | ||
"value": "Has target URI", | ||
"description": "The property that links annotations to the canvas URI, corresponding to 'target' in v3, 'on' in v2." | ||
}, | ||
"IIIFAnnotSortProp": { | ||
"value": "", | ||
"description": "The property or properties used to sort multiple annotations. Use a comma to separate multiple properties." | ||
}, | ||
"IIIFAnnotDoParse": { | ||
"value": true, | ||
"description": "Whether or not annotations should be parsed as wikitext (true by default)." | ||
}, | ||
"IIIFCollectionQueryArg": { | ||
"value": "[[Class::Subject:CODECS external links]] [[Has link type::IIIF Manifest URL]]", | ||
"description": "The default query argument for IIIF manifest links in the collection." | ||
}, | ||
"IIIFCollectionItemURI": { | ||
"value": "Link has URL", | ||
"description": "Property holding the URIs of IIIF manifests and collections." | ||
}, | ||
"IIIFCollectionItemResource": { | ||
"value": "For page", | ||
"description": "Currently, the property linking back to the resource." | ||
}, | ||
"IIIFCollectionSortProp": { | ||
"value": "For page", | ||
"description": "The property used to sort multiple items in the collection API. Use a comma to separate multiple properties." | ||
} | ||
}, | ||
|
||
"ContentHandlers": { | ||
"iiifjson": "IIIFJsonContentHandler" | ||
}, | ||
"callback": "IIIFHooks::onRegister", | ||
"namespaces": [ | ||
{ | ||
"id": 1230, | ||
"constant": "NS_IIIF", | ||
"name": "IIIF", | ||
"subpages": false, | ||
"content": false | ||
}, | ||
{ | ||
"id": 1231, | ||
"constant": "NS_IIIF_TALK", | ||
"name": "IIIF_talk", | ||
"defaultcontentmodel": "wikitext", | ||
"subpages": true, | ||
"content": false | ||
} | ||
], | ||
|
||
"manifest_version": 2, | ||
"load_composer_autoloader": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"@metadata": { | ||
"authors": [ | ||
"Dennis Groenewegen" | ||
] | ||
}, | ||
"iiif-extensionname": "IIIF", | ||
"iiif": "IIIF", | ||
"iiif-desc": "...", | ||
|
||
"apihelp-iiif-manifest-summary": "Returns a IIIF manifest, optionally with references to annotations (AnnotationPage or sc:AnnotationList) automatically merged in. Annotations may be queried with SMW ('smwconfig', 'obj') or retrieved from JSON in a wiki page ('annotid').", | ||
"apihelp-iiif-manifest-param-action": "iiif-manifest", | ||
"apihelp-iiif-manifest-param-manifest": "URL of IIIF manifest.", | ||
"apihelp-iiif-manifest-param-obj": "Either the page ID or full name of the wiki page to which SMW annotations are linked.", | ||
"apihelp-iiif-manifest-param-smwconfig": "Page ID of the JSON config containing the information used to build an SMW #ask query.", | ||
"apihelp-iiif-manifest-param-smwquery": "An SMW #ask query in escaped, URL-safe syntax. Not fully implemented and likely to be superseded by smwconfig.", | ||
"apihelp-iiif-manifest-param-annotid": "Page ID of the wiki page (in JSON) containing the annotations to be merged into the manifest.", | ||
"apihelp-iiif-manifest-param-annoturl": "Annotations from a URL. Not implemented.", | ||
"apihelp-iiif-manifest-param-format": "MediaWiki-specific setting expected to be set to 'json'.", | ||
|
||
"apihelp-iiif-annotations-summary": "Auxiliary API for the iiif-manifest API action which returns annotations as AnnotationPage (v3) or sc:AnnotationList (v2), or if 'dest' is set to 'localstorage', as a LocalStorageService. Receives redirects from Special:IIIFServ/annot/...", | ||
"apihelp-iiif-annotations-param-action": "iiif-annotations", | ||
"apihelp-iiif-annotations-param-manifest": "IIIF Manifest (URL).", | ||
"apihelp-iiif-annotations-param-obj": "Either the page ID or full name of the wiki page to which SMW annotations are linked.", | ||
"apihelp-iiif-annotations-param-v": "Version of the IIIF Presentation API, currently either 2 or 3.", | ||
"apihelp-iiif-annotations-param-canvas": "IIIF Pres. 2 only. The id of the canvas (URL).", | ||
"apihelp-iiif-annotations-param-smwconfig": "Page ID of the JSON config containing the information used to build an SMW #ask query", | ||
"apihelp-iiif-annotations-param-smwquery": "Unused. Escaped version of SMW query.", | ||
"apihelp-iiif-annotations-param-annotid": "Page ID of the wiki page (JSON) containing the annotations to be merged.", | ||
"apihelp-iiif-annotations-param-dest": "Optional. Allowed values: localstorage.", | ||
|
||
"apihelp-iiif-collection-summary": "API that returns a IIIF Collection based on: (1) a config containing data needed to build an SMW query; config data can be set in LocalSettings or in a wiki page referenced by 'smwconfig'; or experimentally, (2) a direct SMW query (with 'smwquery') or an SMW concept ('concept'), making use of LocalSettings for printout properties. Receives redirects from Special:IIIFServ/collection/...", | ||
"apihelp-iiif-collection-param-action": "iiif-collection", | ||
"apihelp-iiif-collection-param-smwconfig": "Page ID of the JSON config containing the information used to build an SMW #ask query", | ||
"apihelp-iiif-collection-param-smwquery": "Experimental? Reserved, not yet implemented", | ||
"apihelp-iiif-collection-param-concept": "SMW concept.", | ||
"apihelp-iiif-collection-param-manifest": "Currently unused.", | ||
|
||
"apihelp-iiif-mw-pres-summary": "IIIF Presentation API (currently 2.0 only) using the MediaWiki file system. Supports image files (level 0, tileless, pyramidically sized) from the local MediaWiki repository as well as from external repositories such as Wikimedia Commons. Redirect URLs include Special:IIIFServ/presentation/{source}/pageids/{pageids} and Special:IIIFServ/presentation/{source}/files/{files}", | ||
"apihelp-iiif-mw-pres-param-action": "iiif-mw-pres", | ||
"apihelp-iiif-mw-pres-param-pageids": "Page IDs of the wanted files.", | ||
"apihelp-iiif-mw-pres-param-files": "Page names of the wanted files", | ||
"apihelp-iiif-mw-pres-param-smwquery": "Reserved, not yet implemented. Use an #ask query to fetch images from the wiki.", | ||
"apihelp-iiif-mw-pres-param-smwsort": "Reserved, not yet implemented. Intended to add sorting conditions to smwquery.", | ||
"apihelp-iiif-mw-pres-param-version": "API version. Only 2 is presently supported.", | ||
"apihelp-iiif-mw-pres-param-label": "Text for the 'label' entry.", | ||
"apihelp-iiif-mw-pres-param-source": "local (default), commons or the name associated with a resource added through 'wgForeignFileRepos'.", | ||
|
||
"apihelp-iiif-mw-img-summary": "Image Information Request API service (ImageService v2 and v3) as used by iiif-mw-pres. Receives redirects from Special:IIIFServ/image/{source}/{pageid}/info.json.", | ||
"apihelp-iiif-mw-img-param-action": "iiif-mw-img", | ||
"apihelp-iiif-mw-img-param-source": "local (default), commons or the name associated with a resource added through 'wgForeignFileRepos'.", | ||
"apihelp-iiif-mw-img-param-pageid": "Page ID of the file page.", | ||
"apihelp-iiif-mw-img-param-file": "As an alternative to 'pageid', name of the file page. Full support may be wanting.", | ||
"apihelp-iiif-mw-img-param-revid": "Optionally, revision ID of the file page.", | ||
|
||
"apihelp-iiif-wiki-summary": "Receives redirects from Special:IIIFServ/wiki/...", | ||
"apihelp-iiif-wiki-param-id": "page id", | ||
"apihelp-iiif-wiki-param-format": "defaults to json" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* @license GPL-2.0-or-later | ||
* @author D. Groenewegen | ||
*/ | ||
|
||
$namespaceNames = []; | ||
|
||
if( !defined( 'NS_IIIF' ) ) { | ||
define( 'NS_IIIF', 1230 ); | ||
} | ||
if( !defined( 'NS_IIIF_TALK' ) ) { | ||
define( 'NS_IIIF_TALK', 1231 ); | ||
} | ||
|
||
/** English */ | ||
$namespaceNames['en'] = [ | ||
NS_IIIF => 'IIIF', | ||
NS_IIIF_TALK => 'IIIF_talk', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* @license GPL-2.0-or-later | ||
* @author Dennis Groenewegen | ||
*/ | ||
|
||
$magicWords = []; | ||
|
||
/** English | ||
* @author Dennis Groenewegen | ||
*/ | ||
|
||
$magicWords['en'] = [ | ||
'iiif' => [ 0, 'iiif' ], | ||
'iiif-get-canvases' => [ 0, 'iiif-get-canvases' ] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.iiif-header { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-bottom: 1rem; | ||
.iiif-header-right { | ||
display: flex; | ||
& > * { | ||
margin-right:1rem; | ||
} | ||
& > :last-child { | ||
margin-right:0; | ||
} | ||
} | ||
} | ||
|
||
.label-iiif { | ||
font-weight: 400; | ||
background: #dfcccc9e; | ||
text-align: center; | ||
vertical-align: middle; | ||
padding: 0.25rem 0.5rem; | ||
font-size: 0.875rem; | ||
line-height: 1.5; | ||
border-radius: 0.2rem; | ||
font-variant:small-caps; | ||
} | ||
|
||
.btn-iiif { | ||
display: inline-block; | ||
font-weight: 400; | ||
color: #fff; | ||
background: #343a40 linear-gradient(180deg,#52585d,#343a40) repeat-x; | ||
// color: #212529; | ||
transition: color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out; | ||
text-align: center; | ||
vertical-align: middle; | ||
user-select: none; | ||
padding: 0.25rem 0.5rem; | ||
font-size: 0.875rem; | ||
line-height: 1.5; | ||
box-shadow: inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075); | ||
border-radius: 0.2rem; | ||
border-color: #343a40; | ||
border: 1px solid transparent; | ||
&:hover { | ||
color:#FFF; | ||
background: #23272b linear-gradient(180deg,#44474b,#23272b) repeat-x; | ||
border-color: #1d2124; | ||
} | ||
} |
Oops, something went wrong.