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

mdcodes

v2.10.0

Published

CodeLists for ADIwg mdJSON

Downloads

288

Readme

Gem Version npm version

mdCodes

mdCodes provides code lists in hash or JSON formats for loading of mdEditor and other metadata tools that use the ADIwg mdJson-schemas. The code lists include all ISO 19115-2 and ISO 19115-1 codes plus supplemental codes added by NGDC and ADIwg. The code lists may be accessed in Ruby using the gem. Alternatively, JSON may be generated from the YAML using Grunt. NPM package is available as well. See the following for instructions.

npm

npm install mdcodes

Note: The npm install will also create JavaScript modules for the codelists.

Ruby

The adiwg-mdcodes gem provides code lists in Ruby hash or JSON formats.

Installation

Add this line to your application's Gemfile:

gem 'adiwg-mdcodes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install adiwg-mdcodes

Methods

getYamlPath

returns the path to the 'resources' folder containing codelist files in YAML format'.

getAllCodelistsDetail( returnFormat )

returns all code lists with all codelist detail returnFormat = [hash | json] (string)

getCodelistDetail( codeListName, returnFormat )

returns a single codelist with all code list detail codeListName = name of code list to return (string) returnFormat = [ hash | json ] (string)

getAllStaticCodelists( returnFormat )

returns all static codelists with only the codelist item names returnFormat = [hash | json] (string)

getStaticCodelist( codeListName, returnFormat )

returns a single static codelist with only the codelist item names codeListName = name of code list to return (string) returnFormat = [hash | json] (string)

##Grunt

Generate JSON verions of the code lists using Grunt.

Note: These instructions assume that npm and Grunt are already installed. The generated files are not tracked by git.

  1. Change to the project's root directory.
  2. Install project dependencies with npm install.
  3. Generate the JSON code lists with grunt.
  4. The JSON is written to the resources/json directory.

Contributing

  1. Fork it (https://github.com/adiwg/mdCodes/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request