{"id":16017289,"url":"https://github.com/njh/ruby-playlist","last_synced_at":"2025-03-17T16:30:33.085Z","repository":{"id":56888253,"uuid":"140395855","full_name":"njh/ruby-playlist","owner":"njh","description":"A ruby gem to convert playlists between different formats","archived":false,"fork":false,"pushed_at":"2021-03-16T01:01:12.000Z","size":74,"stargazers_count":7,"open_issues_count":8,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-25T21:45:41.716Z","etag":null,"topics":["cue-sheet","jspf","m3u","playlist","ruby","xspf"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/playlist","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/njh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-10T07:43:28.000Z","updated_at":"2023-10-04T07:35:18.000Z","dependencies_parsed_at":"2022-08-21T00:50:49.372Z","dependency_job_id":null,"html_url":"https://github.com/njh/ruby-playlist","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Fruby-playlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Fruby-playlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Fruby-playlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njh%2Fruby-playlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/njh","download_url":"https://codeload.github.com/njh/ruby-playlist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243871268,"owners_count":20361321,"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":["cue-sheet","jspf","m3u","playlist","ruby","xspf"],"created_at":"2024-10-08T16:04:52.635Z","updated_at":"2025-03-17T16:30:32.792Z","avatar_url":"https://github.com/njh.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/njh/ruby-playlist.svg)](https://travis-ci.org/njh/ruby-playlist)\n\n# Playlist\n\nThis ruby gem allows you to create and manipulate playlists of musical tracks.\n\nIt supports parsing and generating playlists in the following formats:\n\n* Cue Sheet\n* JSPF\n* M3U\n* PLS\n* XSPF\n* A simple human readable format\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'playlist'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install playlist\n\n## Usage\n\nFor full details, please see the [API Documentation](https://www.rubydoc.info/gems/playlist/).\n\n### Creating a Playlist\n\nThe `playlist` gem provides data model classes for creating and manipulating \nplaylists and music metadata in ruby.\n\nPlaylists can be constructed by passing a list of attributes to the constructor or by setting the attributes directly:\n\n```ruby\nplaylist = Playlist.new(:title =\u003e \"My awesome playlist\")\nplaylist.description = \"Each week I add best tracks I can think of.\"\nplaylist.add_track(\n  :performer =\u003e \"Jon Hopkins\",\n  :title =\u003e \"Everything Connected\"\n)\n\ntrack = Playlist::Track.new(:title =\u003e \"Get Your Shirt\")\ntrack.add_contributor(:name =\u003e \"Underworld\", :role =\u003e :performer)\ntrack.add_contributor(:name =\u003e \"Iggy Pop\", :role =\u003e :performer)\nplaylist.add_track(track)\n```\n\n### Parsing a playlist file\n\nThe `playlist` gem supports a number of different playlist file formats.\nHere is an example of parsing a M3U file:\n\n```ruby\nFile.open(\"playlist.m3u\") do |file|\n  playlist = Playlist::Format::M3U.parse(file)\n  puts \"The playlist contains #{playlist.tracks.count} tracks\"\nend\n```\n\n### Generating a playlist file\n\nHaving created a `Playlist` object, it can be converted to a playlist file using:\n\n```ruby\nFile.open(\"playlist.m3u\", \"wb\") do |file|\n  file.write Playlist::Format::M3U.generate(playlist)\nend\n```\n\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/njh/ruby-playlist.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjh%2Fruby-playlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnjh%2Fruby-playlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjh%2Fruby-playlist/lists"}