{"id":16681590,"url":"https://github.com/slonopotamus/fb2rb","last_synced_at":"2025-04-09T23:06:30.493Z","repository":{"id":43443169,"uuid":"277642098","full_name":"slonopotamus/fb2rb","owner":"slonopotamus","description":"Fiction Book 2 parser/generator library in Ruby","archived":false,"fork":false,"pushed_at":"2025-03-27T07:04:07.000Z","size":111,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T23:06:04.621Z","etag":null,"topics":["ebook","fb2","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,"publiccode":null,"codemeta":null}},"created_at":"2020-07-06T20:28:44.000Z","updated_at":"2025-03-27T07:04:09.000Z","dependencies_parsed_at":"2023-02-09T14:15:50.186Z","dependency_job_id":"c42235b0-20a5-442b-a4a5-0267d5448c17","html_url":"https://github.com/slonopotamus/fb2rb","commit_stats":{"total_commits":75,"total_committers":2,"mean_commits":37.5,"dds":"0.41333333333333333","last_synced_commit":"7a57a5d7fb8385533a67830e6d3766ab4a11c414"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slonopotamus%2Ffb2rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slonopotamus%2Ffb2rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slonopotamus%2Ffb2rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slonopotamus%2Ffb2rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slonopotamus","download_url":"https://codeload.github.com/slonopotamus/fb2rb/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","fb2","ruby"],"created_at":"2024-10-12T14:04:44.704Z","updated_at":"2025-04-09T23:06:30.449Z","avatar_url":"https://github.com/slonopotamus.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= {project-name}\nMarat Radchenko \u003cmarat@slonopotamus.org\u003e\n:project-name: FB2rb\n:project-handle: fb2rb\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-handle} is a http://gribuser.ru/xml/fictionbook/index.html.en[Fiction Book 2] parser/generator library written in Ruby.\n\n== Installation\n\nAdd this line to your application's Gemfile:\n\n[source,ruby]\n----\ngem 'fb2rb'\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 fb2rb\n----\n\n== Usage\n\nYou can create FB2 book in memory and write it to file:\n\n[source,ruby]\n----\nrequire 'fb2rb'\n\nbook = FB2rb::Book.new\nbook.description.title_info.book_title = 'Book title'\n\nbody = FB2rb::Body.new(nil, '\u003cp\u003eBook text\u003c/p\u003e')\nbook.bodies \u003c\u003c body\n\nbook.write_compressed('/path/to/book.fb2.zip')\n# or\nbook.write_uncompressed('/path/to/book.fb2')\n----\n\nAlso, you can read existing FB2 file:\n\n[source,ruby]\n----\nrequire 'fb2rb'\n\nbook = FB2rb::Book.read_compressed('/path/to/book.fb2.zip')\n# or\nbook = FB2rb::Book.read_uncompressed('/path/to/book.fb2')\n\nputs book.description.title_info.book_title\nputs book.bodies[0].content\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%2Ffb2rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslonopotamus%2Ffb2rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslonopotamus%2Ffb2rb/lists"}