{"id":23284219,"url":"https://github.com/agilecreativity/ebooks_renamer","last_synced_at":"2025-09-09T08:45:39.768Z","repository":{"id":16667153,"uuid":"19422835","full_name":"agilecreativity/ebooks_renamer","owner":"agilecreativity","description":"Rename multiple ebook files based on available embedded metadata (pure ruby implementation version)","archived":false,"fork":false,"pushed_at":"2018-03-17T14:29:33.000Z","size":33,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-21T17:13:42.280Z","etag":null,"topics":["automation","command-line","epub","pdf","rename-files","ruby"],"latest_commit_sha":null,"homepage":null,"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/agilecreativity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-04T09:06:38.000Z","updated_at":"2025-08-08T09:19:26.000Z","dependencies_parsed_at":"2022-09-09T02:23:02.012Z","dependency_job_id":null,"html_url":"https://github.com/agilecreativity/ebooks_renamer","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/agilecreativity/ebooks_renamer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Febooks_renamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Febooks_renamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Febooks_renamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Febooks_renamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agilecreativity","download_url":"https://codeload.github.com/agilecreativity/ebooks_renamer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Febooks_renamer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274268373,"owners_count":25253390,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["automation","command-line","epub","pdf","rename-files","ruby"],"created_at":"2024-12-20T01:38:45.592Z","updated_at":"2025-09-09T08:45:39.715Z","avatar_url":"https://github.com/agilecreativity.png","language":"Ruby","readme":"## ebooks_renamer\n\n[![Gem Version](https://badge.fury.io/rb/ebooks_renamer.svg)][gem]\n[![Dependency Status](https://gemnasium.com/agilecreativity/ebooks_renamer.png)][gemnasium]\n[![Code Climate](https://codeclimate.com/github/agilecreativity/ebooks_renamer.png)][codeclimate]\n\n[gem]: http://badge.fury.io/rb/ebooks_renamer\n[gemnasium]: https://gemnasium.com/agilecreativity/ebooks_renamer\n[codeclimate]: https://codeclimate.com/github/agilecreativity/ebooks_renamer\n\nRename multiple ebook files using the power of ruby.\nThis is the alternate version of my [ebook_renamer][] gem that implemented in\npure ruby using the power of other gems for metadata extraction.\n\nThe original [ebook_renamer][] gem requires the [Calibre Meta][] to be installed,\nbut this gem does not need any third party software to be installed.\n\n### Features\n\n- Rename multiple ebooks at once currently `epub`, `mobi` and `pdf` are supported.\n\n- Use of the following information as part of the file\n\n  * title  - common for (epub, pdf, mobi)\n  * author - common for (epub, pdf, mobi)\n  * total pages - currently only pdf file will have this metadata information\n  * publisher   - common for (mobi, epub)\n\nThe output file will be something like (if all of the metadata are available)\n\n```\n# if '_' is the `--sep-string` is '_'\n\u003ctitle\u003e_by_\u003cauthor\u003e_\u003cpublisher\u003e_\u003ctotal_pages\u003e_pages.extension\n\n# The minimal possible final file name will be\n\u003ctitle\u003e.extension\n```\n\nIf the title is not available then no action will be performed.\n\n- Use feature of other ruby gems to extract metadata\n  * [pdf-reader][] gem to extract pdf metadata\n  * [mobi][] gem to extract mobi metadata\n  * [epubinfo][] gem to extract epub metadat\n\n- Sanitized file name if the metadata contain invalid/special characters.\n\n- If the metadata is not available then the rename will not be performed\n\n- If the result name is the same as the original name then no rename is performed.\n\n### Installation\n\nOr install it yourself as:\n\n    $ gem install ebooks_renamer\n\n### Usage\n- For help and usage just type `ebooks_renamer` without any options\n\n```\nUsage:\n  ebooks_renamer\n\nOptions:\n  -b, [--base-dir=BASE_DIR]                # Base directory\n                                           # Default: . (current directory)\n  -r, [--recursive], [--no-recursive]      # Search for files recursively\n                                           # Default: true\n  -v, [--version], [--no-version]          # Display version information\n  -s, [--sep-string=SEP_STRING]            # Separator string between words in filename\n                                           # Default: .\n  -c, [--commit], [--no-commit]            # Make change permanent\n\nRename ebooks based on given criteria\n```\n\n### Usage Example:\n\nHere is your typical usage of the gem\n\n```shell\n# change to the directory that contain your ebook files\ncd ~/Dropbox/ebooks\n\n# set version of your ruby to a recent version\nrbenv local 2.1.2 # or any version after 1.9+\n\n# install the gem\ngem install ebooks_renamer\n\n# run the command without making any changes\nebooks_renamer --base-dir . --recursive\n\n# If you are happy with what will be changed then you can make your change permanent\n\nebooks_renamer --base-dir . --recursive --commit\n\n# To change the default separator string `sep_string` (default to '.' - dot string)\n# e.g. this will use the '_' (underscore) to separate each word in the output\nebooks_renamer rename --base-dir . --sep-string '_' --recursive --commit\n```\n\n### Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n[ebook_renamer]: https://github.com/agilecreativity/filename_cleaner\n[mobi]: https://rubygems.org/gems/mobi\n[pdf-reader]: https://rubygems.org/gems/pdf-reader\n[epubinfo]: https://rubygems.org/gems/epubinfo\n[Calibre Meta]: http://manual.calibre-ebook.com/cli/ebook-meta.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Febooks_renamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagilecreativity%2Febooks_renamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Febooks_renamer/lists"}