{"id":15446300,"url":"https://github.com/neume/chordproko","last_synced_at":"2026-04-28T22:33:26.897Z","repository":{"id":56843469,"uuid":"100506748","full_name":"neume/chordproko","owner":"neume","description":"Parse Chordpro formatted song.","archived":false,"fork":false,"pushed_at":"2017-08-21T13:08:46.000Z","size":14,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-30T09:17:46.233Z","etag":null,"topics":["chordpro","chordpro-format","chordpro-rails","parser","rails","ruby","song-sheet"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neume.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-16T15:53:18.000Z","updated_at":"2020-04-29T20:18:14.000Z","dependencies_parsed_at":"2022-09-07T07:11:17.713Z","dependency_job_id":null,"html_url":"https://github.com/neume/chordproko","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/neume/chordproko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neume%2Fchordproko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neume%2Fchordproko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neume%2Fchordproko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neume%2Fchordproko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neume","download_url":"https://codeload.github.com/neume/chordproko/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neume%2Fchordproko/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32402668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chordpro","chordpro-format","chordpro-rails","parser","rails","ruby","song-sheet"],"created_at":"2024-10-01T20:00:41.048Z","updated_at":"2026-04-28T22:33:26.880Z","avatar_url":"https://github.com/neume.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/chordproko.svg)](https://badge.fury.io/rb/chordproko)\n# Chordproko\n\nChordproko is a parser for ruby. It converts chordpro format to a readable text format.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'chordproko'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install chordproko\n\n## Usage\n\nSuppose you have a song sheet written in ChordPro format:\n\n```ruby\nsheet = \"Th[C]is is a sam[G]ple lyr[Em]ic with ch[D]ord\"\nreadable_sheet = Chordproko.text(sheet)\n```\n\nOr load from file\n\n```ruby\nfile = File.new(\"file_location\")\nreadable_sheet = Chordproko.text(file.read)\n```\n### Transposing\n\nYou can transpose a song by adding ```transpose``` option.\n\n```ruby\nreadable_sheet = Chordproko.text(file.read, transpose: 2)\n``` \nNegative value means transpose down, otherwise, transpose up.\n\n### Using raw data\n\nCreate your own algorithm using the result of Chordproko **Parser**. It uses parslet so you have to learn parslet first. You can check the source code for rules.\n```ruby\nparsed = Chordproko::Parser.new.parse(file.read)\n```\nThen, create your own **Transform** class.\n\n### Extending PlainSong Formatter\n```ruby\nclass MyPlainSong \u003c Chordproko::PlainSong\n  def initialize transformed, options={}\n    super(transformed, options)\n  end\n  def chord_group_format str\n    \"\u003cspan\u003e#{str}\u003c/span\u003e\"\n  end\n  def lyric_line_format str\n    \"\u003cdiv\u003e#{str}\u003c/div\u003e\"\n  end\nend\n```\n\nSet the Chordproko formatter class. This will globally set our formatter.\n\n```ruby\nChordproko.set_formatter_class(\"MyPlainSong\")\n```\n\nThen use the Chordproko ```.text``` method\n\nAside from those two methods, you can override these to modify your song sheet.\n\n```ruby\ndef chord_line_format str\n  ...\nend\ndef comment_format str\n  ...\nend\ndef directive_format str\n  ...\nend\ndef lyric_format str\n  ...\nend\n```\n## TODO\n\n+ Improve specs\n+ Improve documentations\n+ Improve source (so many unnecessary lines. It works, so it's fine for now.)\n+ Support ```b``` flat sign \n+ Implement PlainSong methods with block (Might help a lot in customizing contents.)\n+ Add settings and customization\n+ Learns sheet key.\n\n## Contributing\n\nI'm certain that you have reached this section haha. This is my first gem, I still have a lot to learn. You can report errors, suggest features and create pull requests here, https://github.com/neume/chordproko.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneume%2Fchordproko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneume%2Fchordproko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneume%2Fchordproko/lists"}