Code Monkey home page Code Monkey logo

chordtojson's Introduction

ChordToJson

Build Status

ChordPro to JSON converter

Usage

./ChordToJson file [options]
Option name Description
--pretty Output pretty JSON

Build

$ export GOPATH=$PWD
$ go get github.com/lnalex/ChordToJson

Demo

test.chorpro

{t: Hello world}
{st: Foo Bar}

{c: © 2015 FooBar Ltd}

[G]Lorem ipsum dolor sit amet, [D/F#]consectetur adipiscing elit. Don[Em]ec a diam lectus.
Sed s[G]it amet ipsum mauris.
Maecenas con[G]gue ligula ac[D/F#] quam viverra nec consectetur [G]ante hendrerit.
Donec e[Bm7]t mollis dolor.[D/F#]

Output (Pretty option)

{
 "lines": [
  {
   "type": {
    "t": "title"
   },
   "content": " Hello world"
  },
  {
   "type": {
    "st": "subtitle"
   },
   "content": " Foo Bar"
  },
  {
   "type": {
    "b": "blank"
   }
  },
  {
   "type": {
    "c": "comment"
   },
   "content": " © 2015 FooBar Ltd"
  },
  {
   "type": {
    "b": "blank"
   }
  },
  {
   "type": {
    "v": "verse"
   },
   "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.",
   "chords": {
    "0": "[G]",
    "31": "[D/F#]",
    "69": "[Em]"
   }
  },
  {
   "type": {
    "v": "verse"
   },
   "content": "Sed sit amet ipsum mauris.",
   "chords": {
    "5": "[G]"
   }
  },
  {
   "type": {
    "v": "verse"
   },
   "content": "Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.",
   "chords": {
    "12": "[G]",
    "28": "[D/F#]",
    "64": "[G]"
   }
  },
  {
   "type": {
    "v": "verse"
   },
   "content": "Donec et mollis dolor.",
   "chords": {
    "27": "[D/F#]",
    "7": "[Bm7]"
   }
  }
 ]
}

License

MIT License

chordtojson's People

Watchers

Alexandre Lion avatar  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.