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

tido-mei-customization

v0.1.1

Published

Tido MEI Customization

Downloads

6

Readme

Tido MEI Customization

ODD specification and documentation of the Tido MEI Customization.

Setup

git clone https://github.com/tido/mei-customization.git

If you run node and would like to build the schema and/or the documentation or run the tests:

cd mei-customization
npm install

Usage - Schemata and Guidelines

Use the schema files in build/schema/ to validate MEI documents. Refer to the html guidelines in build/guidelines folder for documentation of the customization format.

The source

The Tido ODD customization file is located at src/tido.xml. In addition to the schema specifications, this file contains examples of valid and invalid fragments.

Build

Java dependencies

In order to build the schema and guidelines you will need

  • a Java Development Kit (JDK)
  • ANT

MEI and TEI dependencies

The Tido MEI Customization project contains copies of https://github.com/music-encoding/music-encoding and https://github.com/TEIC/Stylesheets in the vendor folder. In case these dependencies need to be updated, run ./update-git-dependencies.sh and commit the updated project.

Build commands

In order to build the schema:

ant -lib vendor/stylesheets/lib schema

The output schema will be placed in build/schema

To build the HTML guidelines:

ant -lib vendor/stylesheets/lib html-guidelines

The output of this will be placed in build/guidelines

Test environment for Node

In addition to providing documentation, the provided examples also serve validation test for the schema. A node test environment is included in order to make sure that provided examples (or counter-examples) are indeed validated (or invalidated) by the compiled schema.

Run the tests

npm test

Build and test

In Node you can also run the build scripts through npm scripts:

npm run schema
npm run html-guidelines

And if you want to do all the above at once, that is build the schema, build the documentation and run the tests:

npm run refresh

Modifying the Customization

When modifying the schema it is expected that for each feature there are valid and invalid examples provided. Each of these examples then serve as a test case for the test environment to check whether the examples actually conform to the compiled schemata.

Typically, test cases are appended to <elementSpec>, <classSpec> etc. elements they refer to (as a child of <exemplum>), but <egXML> may appear anywhere in the ODD, for example in the initial prose descriptions of the features. If the content of <egXML> is supposed to be valid against the Tido schema, it will have an attribute @valid="true", if it is supposed to be invalid, it will have @valid="false". Incomplete examples, which are in fact invalid but could be made valid by providing additional attributes are marked with @valid="feasible". In that case, its content will be skipped when running the validation tests.

The test environment uses the jade template library to construct complete MEI documents from the MEI fragments in <egXML>. The test/jade folder contains wrappers and mixins that help to contextualise the provided examples. In order to assign a wrapper to a fragment, the <egXML> elements link to <rendition> declarations in the <teiHeader> which point to the Jade template files in concern.

Here's a full example of a class specification with a single test case:

<classSpec ident="att.startendid" module="MEI.shared" type="atts" mode="change">
  <attList>
    <attDef ident="endid" usage="opt" mode="change">
      <datatype>
        <rng:ref name="data.URI.local"/>
      </datatype>
    </attDef>
  </attList>
  <exemplum>
    <p>A valid <gi>pedal</gi> element with local URI references in
      <att>startid</att> and <att>endid</att></p>
    <egXML xmlns="http://www.tei-c.org/ns/Examples" valid="true" rendition="#afterStaff">
      <pedal dir="down" staff="1" layer="1" startid="#n01" endid="#n02"/>
    </egXML>
  </exemplum>
</classSpec>