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

@myrmidon/cadmus-cod-location

v5.1.0

Published

Cadmus - codicology: manuscript location.

Downloads

25

Readme

CadmusCodLocation

This library was generated with Angular CLI version 17.3.0.

  • codicologic location component.
  • codicologic location interpolator.
  • codicologic location parser.
  • codicologic location pipe and codicologic locations range pipe.

Models

A codicologic location (CodLocation) is an object with these properties (the only required one being n):

  • endleaf: whether the location refers to a set of endleaves, either at the start or at the end of the manuscript: 0=not in endleaf, 1=front endleaves, 2=back endleaves.
  • s: ID of the reference system.
  • n: sheet number (defaults to 0 if not specified).
  • rmn: true if n must be displayed with Roman digits.
  • sfx: an arbitrary suffix appended to n (e.g. "bis").
  • v: true if verso, false if recto, undefined if not specified or not applicable.
  • c: column number.
  • l: line number.
  • word: the word we refer to. By scholarly convention, this is a word picked from the line so that it cannot be ambiguous, i.e. confused with other instances of the same word in its line.

There is also a CodLocationRange which is a range having two CodLocation's, one for start and one for end.

The default value of 0 for n is due to the fact that users might want to enter an arbitrary sheet label (as found on the manuscript) rather than its physical location. In this case, the convention is entering just the suffix, between "" as usual, like e.g. "III"; this will result in n=0 and sfx=III, which can be later looked up against a label sheets part to get the corresponding physical location.

String Representation

A single CodLocation can be expressed as a string, parsable into CodLocation with CodLocationParser. The same parser also provides parsing for location ranges (CodLocationRange), and comparison between two locations a/b to determine whether a comes before b, or after it, or is the same.

The string format is (/[SYSTEM:][^]N["SUFFIX"][(r|v)[COLUMN]].LINE), where () can be replaced with [] for covers, including these components (all optional except for n):

  • endleaf, optional: ( for front or (/ for back endleaf; [ for front or [/ for back cover. For covers, only system and suffix are meaningful.
  • system: starts with a-z or A-Z and then contains only letters, a-z or A-Z, underscores, or digits 0-9. It is terminated by :.
  • ^ for a Roman number.
  • sheet: the sheet number. This is the only required component.
  • suffix between "".
  • recto/verso: r or v, otherwise unspecified/not applicable.
  • column: the column letter(s) (column 1=a, 2=b, etc.: range is a-q).
  • line: the line number preceded by ..
  • word preceded by @.

A specialized pipe (CodLocationPipe) can be used to display a CodLocation object by converting it into its parsable version.

Another pipe (CodLocationRangePipe) can be used to convert to string an array of CodLocationRange's.

Editor

The CodLocationComponent is used to edit a location using its string format. It has these properties:

  • label: the label to display for the editor.
  • required: true if the location is required.
  • single: true if the location refers to a single sheet. If false, it refers to 1 or more ranges.
  • location: the location(s) edited, an array of CodLocationRange (or null). When changes, locationChange is emitted.