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

annosearch

v0.2.0

Published

W3C web annotation search using the IIIF content search API

Downloads

720

Readme

Annotation Search

AnnoSearch uses Quickwit as its backend database to efficiently index and query W3C Web Annotation data. AnnoSearch can load data directly from IIIF resources and web annotation servers such as Miiify.

Usage

Make sure you have Quickwit installed and running and then install AnnoSearch.

npm install -g annosearch

Commands

init

Initialize a new index with a specified ID.

annosearch init --index <index-id>

load

Load an index from a URI, specifying the type of content being loaded (e.g., Manifest, Collection, or AnnotationCollection).

annosearch load --index <index-id> --type <type> --uri <uri>
  • type: The type of content (Manifest, Collection, AnnotationCollection).
  • uri: The URI to load the content from.

delete

Delete an existing index by ID.

annosearch delete --index <index-id>

search

Perform a search on a specified index.

annosearch search --index <index-id> --query <search-query> [--page <page-number>] [--motivation <motivation>] [--date <date-ranges>] [--user <users>]
  • query: The search query string.
  • page: Optional page number (defaults to 0).
  • motivation: Optional space separated list of motivation terms.
  • date: Optional space separated list of date ranges.
  • user: Optional space separated list of URIs that are the identities of users.

serve

Start a web server that provides a search service using the IIIF Content Search 2.0 API.

annosearch serve --port <port> --host <host>
  • port: The port on which to run the server.
  • host: The host on which to run the server.

version

Display the current version of AnnoSearch.

annosearch version

Configuration

Configure AnnoSearch by setting the following environment variables:

  • ANNOSEARCH_MAX_HITS: Maximum number of search results per query.

    • Default: 20
  • ANNOSEARCH_PORT: Port on which AnnoSearch runs.

    • Default: 3000
  • ANNOSEARCH_HOST: Host on which AnnoSearch runs.

    • Default: localhost
  • ANNOSEARCH_PUBLIC_URL: URL for public-facing server requests.

    • Default: http://localhost:3000

Adjust these values as needed to customize AnnoSearch’s configuration and behavior.

Todo

  • Implement the autocomplete service
  • Implement extended API responses

License

This project is licensed under the MIT License.