Coder Social home page Coder Social logo

elypsiarecords / grid-number Goto Github PK

View Code? Open in Web Editor NEW

This project forked from screenstaring/grid-number

0.0 1.0 0.0 13 KB

Ruby class for managing Global Release Identifiers (GRid numbers). GRid numbers are used to identify electronic music releases.

License: MIT License

Ruby 100.00%

grid-number's Introduction

GRid

Build Status

Class for managing Global Release Identifiers (GRid numbers). GRid numbers are used to identify electronic music releases.

Installation

Add this line to your application's Gemfile:

gem "grid-number"

And then execute:

$ bundle

Or install it yourself as:

$ gem install grid-number

Usage

require "grid"

grid = GRid.parse("A12425GABC1234011K")
grid = GRid.parse("A1-2425G-ABC1234011-K")
grid = GRid.parse("  grid:A1-2425G-ABC1234011-K  ")
grid.valid?          # true
grid.id_scheme       # A1
grid.issuer_code     # 2425G
grid.release_number  # ABC1234011
grid.check_character # K

grid = GRid.new(:issuer_code => "2425G", :release_number => "ABC1234002")
grid.check_character # M
grid.release_number = "X999150000"
grid.check_character # 3

grid = GRid.parse("A12425GABC1234011X") # Wrong check character
grid.valid?                   # false
grid.errors[:check_character] # ["verification failed"]

GRid.default_issuer_code = "2425G"
grid = GRid.new(:release_number => "ABC1234002")
grid.to_s           # A12425GABC1234002M
grid.formatted      # A1-2425G-ABC1234002-M

Links

See Also

  • DDEX - DDEX metadata serialization
  • istwox - Classes for ISBN, ISSN, ISRC, ISMN and ISAN numbers
  • iTunes Store Transporter: GUI - GUI and workflow automation for the iTunes Store’s Transporter (iTMSTransporter)

License

The gem is available as open source under the terms of the MIT License.


Made by ScreenStaring

grid-number's People

Contributors

sshaw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.