{"id":13878293,"url":"https://github.com/slonopotamus/dyck","last_synced_at":"2025-06-14T04:38:36.378Z","repository":{"id":43454829,"uuid":"292071956","full_name":"slonopotamus/dyck","owner":"slonopotamus","description":"Mobi parser/generator library in Ruby","archived":false,"fork":false,"pushed_at":"2024-04-03T07:12:12.000Z","size":507,"stargazers_count":17,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T23:05:10.789Z","etag":null,"topics":["ebook","mobi","ruby"],"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/slonopotamus.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.adoc","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-01T18:07:13.000Z","updated_at":"2025-04-09T10:16:45.000Z","dependencies_parsed_at":"2024-02-06T07:43:33.434Z","dependency_job_id":null,"html_url":"https://github.com/slonopotamus/dyck","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slonopotamus%2Fdyck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slonopotamus%2Fdyck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slonopotamus%2Fdyck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slonopotamus%2Fdyck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slonopotamus","download_url":"https://codeload.github.com/slonopotamus/dyck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125627,"owners_count":21051770,"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":["ebook","mobi","ruby"],"created_at":"2024-08-06T08:01:45.416Z","updated_at":"2025-06-14T04:38:36.371Z","avatar_url":"https://github.com/slonopotamus.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"= {project-name}\nMarat Radchenko \u003cmarat@slonopotamus.org\u003e\n:project-name: Dyck\n:project-handle: dyck\n:slug: slonopotamus/{project-handle}\n:uri-project: https://github.com/{slug}\n:uri-ci: {uri-project}/actions?query=branch%3Amaster\n:uri-gem: https://rubygems.org/gems/{project-handle}\n\nimage:https://img.shields.io/gem/v/{project-handle}.svg[Latest Release,link={uri-gem}]\nimage:{uri-project}/actions/workflows/ci.yml/badge.svg?branch=master[Build Status,link={uri-ci}]\n\n{project-name} is a Mobi parser/generator library written in Ruby.\n\n== Installation\n\nAdd this line to your application's Gemfile:\n\n[source,ruby]\n----\ngem 'dyck'\n----\n\nAnd then execute:\n\n[source,shell script]\n----\n$ bundle install\n----\n\nOr install it yourself as:\n\n[source,shell script]\n----\n$ gem install dyck\n----\n\n== Usage\n\nReading existing Mobi file:\n\n[source,ruby]\n----\nrequire 'dyck'\n\nf = File.open('book.mobi')\nmobi = Dyck::Mobi::read(f)\n\n# Access Mobi data\nmobi.title\nmobi.publishing_date\nmobi.author\nmobi.mobi6.parts # Document text in MOBI6 format\nmobi.kf8.parts # Document text in KF8 format\nmobi.resources # Images, fonts, audio, video\n\n----\n\nWriting new Mobi file:\n\n[source,ruby]\n----\nrequire 'dyck'\n\nmobi = Dyck::Mobi.new\n\n# Fill file metadata\nmobi.title = 'Moby Dick'\nmobi.publishing_date = Time.parse('October 18, 1851')\nmobi.author = 'Herman Melville'\nmobi.subjects = %w[whale sea]\nmobi.description = \"The book is the sailor Ishmael's narrative of the obsessive quest of Ahab,\" \\\n  \" captain of the whaling ship Pequod, for revenge on Moby Dick, the giant white sperm whale \" \\\n  \"that on the ship's previous voyage bit off Ahab's leg at the knee.\"\n\n# Add MOBI6 data\nmobi.mobi6 = Dyck::MobiData.new\nmobi.mobi6.parts \u003c\u003c '\u003chtml\u003e\u003cbody\u003eBook text in MOBI6 format\u003c/body\u003e\u003c/html\u003e'\n\n# And/or, add KF8 data\nmobi.kf8 = Dyck::MobiData.new\nmobi.kf8.parts \u003c\u003c '\u003chtml\u003e\u003cbody\u003eBook text in KF8 format\u003c/body\u003e\u003c/html\u003e'\n\n# Write to file\nFile.open('moby-dick.mobi', 'wb') do |f|\n  mobi.write(f)\nend\n----\n\n== Development\n\nAfter checking out the repo, run `bundle install` to install dependencies.\nThen, run `bundle exec rake spec` to run the tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslonopotamus%2Fdyck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslonopotamus%2Fdyck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslonopotamus%2Fdyck/lists"}