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

@cu-mkp/editioncrafter-cli

v1.0.2

Published

This is the command line tool to take a TEI XML file and turn it into a IIIF Manifest and the necessary Web Annotations to display the text in EditionCrafter.

Downloads

19

Readme

editioncrafter-cli

This is the command line tool to take a TEI XML file and turn it into a IIIF Manifest and the necessary Web Annotations to display the text in EditionCrafter.

Installing

Node

EditionCrafter CLI requires Node. To check if Node is installed, open your terminal or command line and type:

node --version

If the output is a number, you already have Node installed. If the output is an error like "Command not found", you need to install Node.

Please note that EditionCrafter CLI supports Node 14 and higher. If your version of Node is below 14, you'll need to upgrade.

To install or upgrade Node, visit https://nodejs.org/en/download and follow the instructions for your operating system. Alternatively, if you're using the Windows Subsystem for Linux, you should upgrade the version of Linux you're running to one that comes with a newer version of Node.

Installing EditionCrafter

To install the latest version, run:

npm install -g @cu-mkp/editioncrafter-cli

The editioncrafter command will now be available. If it doesn't work right away, try restarting your terminal program.

Usage

The following commands are available to the EditionCrafter CLI. Note that you may optionally pass the path of a configuration file as -c config_path rather than passing individual parameters. The optional configuration file is a JSON file with the following options:

{
    "targetPath": "myfile.xml",
    "outputPath": ".",
    "baseURL": "http://localhost:8080",
    "thumbnailWidth": 124,
    "thumbnailHeight": 192
}

help

Usage:

editioncrafter help

This will display information on the syntax for passing commands to the CLI as well as a list of available commands.

iiif

Usage:

editioncrafter iiif <iiif_url> <output_path>

This will create an XML file at the location of the provided <output_path> based on the information in the IIIF manifest supplied. Note that in this case the <output_path> should be a single XML File, e.g. /MyFiles/TEI/index.xml.

process

Usage:

editioncrafter process <tei_file> <output_path> <base_url>

This will create all of the artifacts that EditionCrafter needs in order to display your document on the web, and place them in the specified <output_path> folder. The <base_url> parameter should be the URL at which you intend to host these artifacts.

Generates the following files:

tei_document_id/tei/index.xml tei_document_id/tei/resource_id/index.xml tei_document_id/tei/resource_id/surface_id/index.xml

tei_document_id/iiif/manifest.json

tei_document_id/html/index.html tei_document_id/html/resource_id/index.html tei_document_id/html/resource_id/surface_id/index.html

Running a development build

The first time you run this program, you'll need to install its dependencies with npm install.

Within the root folder, run npm link to make the repo available as a global command. The entry point is configured by the bin property in package.json.

Open a new terminal session and type which editioncrafter to verify that it linked correctly.