{"id":50732767,"url":"https://github.com/naoigcat/thor-applebooks","last_synced_at":"2026-06-10T10:31:05.806Z","repository":{"id":360048213,"uuid":"1245595790","full_name":"naoigcat/thor-applebooks","owner":"naoigcat","description":"Apple Books CLI","archived":false,"fork":false,"pushed_at":"2026-05-24T18:12:03.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T20:15:32.101Z","etag":null,"topics":["ruby","thor"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naoigcat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T11:20:24.000Z","updated_at":"2026-05-24T18:12:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/naoigcat/thor-applebooks","commit_stats":null,"previous_names":["naoigcat/thor-applebooks"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/naoigcat/thor-applebooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoigcat%2Fthor-applebooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoigcat%2Fthor-applebooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoigcat%2Fthor-applebooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoigcat%2Fthor-applebooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naoigcat","download_url":"https://codeload.github.com/naoigcat/thor-applebooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naoigcat%2Fthor-applebooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34149132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":["ruby","thor"],"created_at":"2026-06-10T10:31:05.739Z","updated_at":"2026-06-10T10:31:05.797Z","avatar_url":"https://github.com/naoigcat.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thor Apple Books\n\nThis Thor script reads My Collections from the local Apple Books SQLite database and prints each collection's contents to standard output.\n\n## Setup\n\nRuby 3.1 or later is required. When using mise, this repository uses Ruby 3.4.9 as defined in `mise.toml`.\n\n```sh\nbundle install\n```\n\n## Usage\n\n```sh\nthor books:export\n```\n\nBy default, the command outputs a readable text format. Specify `--json` to output JSON.\n\n```sh\nthor books:export --json\nthor books:export --database ~/Library/Containers/com.apple.iBooksX/Data/Documents/BKLibrary/BKLibrary-1-091020131601.sqlite\n```\n\nTo run the command without `bundle exec`, the `thor` command and the gems listed in the Gemfile must be available from the current Ruby environment. If `thor` is not found after running `bundle install`, install the Thor executable with `gem install thor`.\n\n`export` does not query the Apple Books database directly. It first copies the database to a consistent temporary file that includes the WAL contents, then opens that copy in read-only mode.\n\n## Add to Queue\n\nAdds purchased books that are not in any My Collections collection to a newly created `Queue_yyyymmddHHMMSS` collection. Books that are only in automatic collections such as `Books`, `Downloaded`, `Library`, and `Want to Read` are treated as uncategorized.\n\n```sh\nthor books:enqueue_uncategorized\n```\n\nSpecify `--dry-run` to check only the number of target books before making changes.\n\n```sh\nthor books:enqueue_uncategorized --dry-run\n```\n\nBy default, the database file is backed up before it is updated. The destination `Queue_yyyymmddHHMMSS` collection is created when the command runs.\n\n```sh\nthor books:enqueue_uncategorized --no-backup\n```\n\n`enqueue_uncategorized` updates the Apple Books database. Run it only when Apple Books-related processes are not writing to the database. Backups are created as SQLite files that include the WAL contents.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaoigcat%2Fthor-applebooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaoigcat%2Fthor-applebooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaoigcat%2Fthor-applebooks/lists"}