{"id":16838092,"url":"https://github.com/phw/ruby-discid","last_synced_at":"2025-10-03T12:37:54.571Z","repository":{"id":6987525,"uuid":"8250279","full_name":"phw/ruby-discid","owner":"phw","description":"Ruby bindings for MusicBrainz libdiscid","archived":false,"fork":false,"pushed_at":"2023-12-27T09:49:05.000Z","size":240,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-25T03:22:52.974Z","etag":null,"topics":["audio","cd","discid","ffi-bindings","libdiscid","library","musicbrainz","ruby","ruby-bindings","rubygems"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["phw"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2013-02-17T12:25:47.000Z","updated_at":"2023-01-09T14:11:26.000Z","dependencies_parsed_at":"2023-12-26T18:52:10.740Z","dependency_job_id":null,"html_url":"https://github.com/phw/ruby-discid","commit_stats":{"total_commits":201,"total_committers":4,"mean_commits":50.25,"dds":0.4129353233830846,"last_synced_commit":"f539710dec117a3da505813b6ff0b03595f5706f"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phw%2Fruby-discid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phw%2Fruby-discid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phw%2Fruby-discid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phw%2Fruby-discid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phw","download_url":"https://codeload.github.com/phw/ruby-discid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065286,"owners_count":21041871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["audio","cd","discid","ffi-bindings","libdiscid","library","musicbrainz","ruby","ruby-bindings","rubygems"],"created_at":"2024-10-13T12:20:49.347Z","updated_at":"2025-10-03T12:37:54.564Z","avatar_url":"https://github.com/phw.png","language":"Ruby","funding_links":["https://github.com/sponsors/phw"],"categories":[],"sub_categories":[],"readme":"# Ruby bindings for MusicBrainz libdiscid\n[![Gem Version](https://badge.fury.io/rb/discid.svg)](http://badge.fury.io/rb/discid)\n[![Test Coverage](https://phw.srht.site/ruby-discid/coverage/coverage_badge_total.svg)](https://phw.srht.site/ruby-discid/coverage/)\n\n\u003e [!NOTE]\n\u003e **This project has moved to https://git.sr.ht/~phw/ruby-discid**\n\n## About\nruby-discid provides Ruby bindings for the MusicBrainz DiscID library [libdiscid](http://musicbrainz.org/doc/libdiscid).\nIt allows calculating DiscIDs (MusicBrainz and freedb) for Audio CDs. Additionally\nthe library can extract the MCN/UPC/EAN and the ISRCs from disc.\n\nruby-discid supports all features from libdiscid 0.6, but will also work with\nany earlier version. If a feature is unsupported in the libdiscid version used\nruby-discid will just return a default value. The version required for a feature\nis documented in the [API documentation](https://www.rubydoc.info/gems/discid/).\n\n## Requirements\n* Ruby \u003e= 2.1\n* RubyGems \u003e= 1.3.6\n* Ruby-FFI \u003e= 1.6.0\n* libdiscid \u003e= 0.1.0\n\n## Installation\nBefore installing ruby-discid make sure you have libdiscid installed. See\nhttp://musicbrainz.org/doc/libdiscid for more information on how to do this.\nFor Windows see also the notes below.\n\n### Installing with RubyGems\nInstalling ruby-discid is best done using RubyGems:\n\n    gem install discid\n\n### Installing from package repository\nFor some Linux distributions packages are available:\n\n* [Arch Linux AUR package](https://aur.archlinux.org/packages/ruby-discid/)\n* [Ubuntu PPA](https://launchpad.net/~musicbrainz-developers/+archive/ubuntu/stable)\n\n### Install from source\nYou can also install from source. This requires RubyGems and Bundler installed.\nFirst make sure you have installed bundler:\n\n    gem install bundler\n\nThen inside the ruby-discid source directory run:\n\n    bundle install\n    rake install\n\n`bundle install` will install additional development dependencies (Rake,\nYard etc.). `rake install` will build the discid gem and install it.\n\n### Windows installation notes\nOn Windows you will need `discid.dll` available in a place where Windows can\nfind it, see [Search Path Used by Windows to Locate a DLL](https://msdn.microsoft.com/en-us/library/7d83bc18.aspx).\nYou can install the `discid.dll` system wide, but it is recommended to place\nit in the local working directory of your application.\n\nAlso the architecture (32 or 64 bit) of the DLL must match your Ruby version.\nSince libdiscid 0.6.3 the [official Windows builds](https://musicbrainz.org/doc/libdiscid)\nof libdiscid contain both the 32 and 64 bit DLLs.\n\nYou can also compile libdiscid yourself. Refer to the\n[libdiscid install instructions](https://github.com/metabrainz/libdiscid/blob/master/INSTALL)\nfor further details.\n\n## Usage\n\n### Read only the TOC\n\n```ruby\nrequire 'discid'\n\n# Specifying the device is optional. If omitted a platform\n# specific default will be used.\ndevice = \"/dev/cdrom\"\ndisc = DiscId.read(device)\nputs disc.id\n```\n\n### Read the TOC, MCN and ISRCs\n\n```ruby\nrequire 'discid'\n\ndevice = \"/dev/cdrom\"\ndisc = DiscId.read(device, :mcn, :isrc)\n\n# Print information about the disc:\nputs \"DiscID      : #{disc.id}\"\nputs \"FreeDB ID   : #{disc.freedb_id}\"\nputs \"Total length: #{disc.seconds} seconds\"\nputs \"MCN         : #{disc.mcn}\"\n\n# Print information about individual tracks:\ndisc.tracks do |track|\n  puts \"Track ##{track.number}\"\n  puts \"  Length: %02d:%02d (%i sectors)\" %\n      [track.seconds / 60, track.seconds % 60, track.sectors]\n  puts \"  ISRC  : %s\" % track.isrc\nend\n```\n\nSee the [API documentation](https://www.rubydoc.info/gems/discid/)\nof {DiscId} or the files in the `examples` directory for more usage information.\n\n## Contribute\nThe source code for ruby-discid is available on\n[SourceHut](https://git.sr.ht/~phw/ruby-discid).\n\nPlease report any issues on the\n[issue tracker](https://todo.sr.ht/~phw/discid-bindings).\n\n## License\nruby-discid Copyright (c) 2007-2025 by Philipp Wolfer \u003cph.wolfer@gmail.com\u003e\n\nruby-discid is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nSee LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphw%2Fruby-discid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphw%2Fruby-discid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphw%2Fruby-discid/lists"}