npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hyperion-framework/presentation-2-parser

v2.0.0-alpha.0

Published

Downloads

33

Readme

Parser IIIF conversion

Lists

Set properties

  • thumbnail
  • logo
  • behavior
  • rendering
  • service
  • seeAlso
  • partOf

Annotation properties

  • body
  • target
  • motivation
  • source
  • selector
  • state
  • stylesheet
  • styleClass

Object properties

  • thumbnail -> "Image"
  • logo -> Image"
  • homepage -> ""
  • rendering -> ""
  • seeAlso -> "Dataset"
  • partOf -> ""

Content type map

  • "image" -> "Image",
  • "audio" -> "Sound",
  • "video" -> "Video",
  • "application/pdf" -> "Text",
  • "text/html" -> "Text",
  • "text/plain" -> "Text",
  • "application/xml" -> "Dataset",
  • "text/xml" -> "Dataset"

Steps (re-naming)

  • [x] attribution to requiredStatement
  • [x] viewingHint to behavior
  • [x] description to summary
  • [x] otherContent to annotations
  • [x] within to partOf
  • [x] Start canvas to start - fixing string starts to objects

Steps

  • [x] Convert language mapping on descriptive properties
  • [x] Fix context fields
  • [x] Fix profiles
  • [x] Fix types
  • [x] Fix non-array elements that need to be (set_properties)
  • [x] Head requests for content type of remote items - behind configuration
  • [x] Fix License field, move to metadata if multiple
  • [x] Fix service type (nothing else)
  • [x] Combine members, collections and manifests into items properties
  • [x] contentLayer to supplementary (AnnotationCollection)
  • [x] Convert canvas images to items into annotation page
  • [x] Annotation page to Annotation list
  • [x] Annotation: on -> target
  • [x] Annotation: resource -> body
  • [x] Annotation: motivation remove prefix

Steps (todo)

  • [ ] Convert multiple sequences into ranges
  • [ ] Merge range structure items + make sure they all have type
  • [ ] Remove behaviour=top from range
  • [ ] Annotation: parse stylesheet
  • [ ] Try to set type on everything - using format, remote types, URL format (content_type_map)
  • [ ] Minting of new URLs for IDs that are not set, using IIIF resource guides

Post-process steps

  • [ ] Process range structures
  • [ ] Add v3 context to top level
  • [ ] Reorder keys

Processing levels

  • [x] Process service
  • [x] Process resource (not service or language or not to be traversed)
  • [x] Process generic (top level?)
  • [x] Process collection
  • [x] Process manifest
  • [x] Process sequence
  • [x] Process canvas
  • [x] Process layer
  • [x] Process annotation page (list)
  • [x] Process annotation collection (layer)
  • [x] Process annotation
  • [x] Process specific resource
  • [x] Process textual body
  • [x] Process choice

Post-processing

  • [x] Post-process manifest

Fixtures

  • http://iiif.io/api/presentation/2.1/example/fixtures/collection.json
  • http://iiif.io/api/presentation/2.1/example/fixtures/1/manifest.json
  • http://iiif.io/api/presentation/2.0/example/fixtures/list/65/list1.json
  • http://media.nga.gov/public/manifests/nga_highlights.json
  • https://iiif.lib.harvard.edu/manifests/drs:48309543
  • http://adore.ugent.be/IIIF/manifests/archive.ugent.be%3A4B39C8CA-6FF9-11E1-8C42-C8A93B7C8C91
  • http://bluemountain.princeton.edu/exist/restxq/iiif/bmtnaae_1918-12_01/manifest
  • https://api.bl.uk/metadata/iiif/ark:/81055/vdc_00000004216E/manifest.json
  • https://damsssl.llgc.org.uk/iiif/2.0/4389767/manifest.json
  • http://iiif.bodleian.ox.ac.uk/iiif/manifest/60834383-7146-41ab-bfe1-48ee97bc04be.json
  • https://lbiiif.riksarkivet.se/arkis!R0000004/manifest
  • https://d.lib.ncsu.edu/collections/catalog/nubian-message-1992-11-30/manifest.json
  • https://ocr.lib.ncsu.edu/ocr/nu/nubian-message-1992-11-30_0010/nubian-message-1992-11-30_0010-annotation-list-paragraph.json
  • http://iiif.harvardartmuseums.org/manifests/object/299843
  • https://purl.stanford.edu/qm670kv1873/iiif/manifest.json
  • http://dams.llgc.org.uk/iiif/newspaper/issue/3320640/manifest.json
  • http://manifests.ydc2.yale.edu/manifest/Admont43
  • https://manifests.britishart.yale.edu/manifest/1474
  • http://demos.biblissima-condorcet.fr/iiif/metadata/BVMM/chateauroux/manifest.json
  • http://www.e-codices.unifr.ch/metadata/iiif/sl-0002/manifest.json
  • https://data.ucd.ie/api/img/manifests/ucdlib:33064
  • http://dzkimgs.l.u-tokyo.ac.jp/iiif/zuzoubu/12b02/manifest.json
  • https://dzkimgs.l.u-tokyo.ac.jp/iiif/zuzoubu/12b02/list/p0001-0025.json
  • http://www2.dhii.jp/nijl/NIJL0018/099-0014/manifest_tags.json
  • https://data.getty.edu/museum/api/iiif/298147/manifest.json
  • https://www.e-codices.unifr.ch/metadata/iiif/csg-0730/manifest.json

Other

  • Check all presence of all MUSTs in the spec and maybe bail?
  • A Collection must have at least one label.
  • A Manifest must have at least one label.
  • An AnnotationCollection must have at least one label.
  • id on Collection, Manifest, Canvas, content, Range,
  • AnnotationCollection, AnnotationPage, Annotation
  • type on all
  • width+height pair for Canvas, if either
  • items all the way down