{"id":21116401,"url":"https://github.com/b1anca/kindle-notebook","last_synced_at":"2026-05-18T06:13:20.958Z","repository":{"id":162729846,"uuid":"637220094","full_name":"b1anca/kindle-notebook","owner":"b1anca","description":"Fetch your Kindle Highlights along with their context using the Selenium Webdriver","archived":false,"fork":false,"pushed_at":"2023-07-02T20:26:54.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T22:00:30.863Z","etag":null,"topics":["kindle","ruby","ruby-gem","selenium-webdriver"],"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/b1anca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-05-06T21:57:02.000Z","updated_at":"2023-07-12T16:18:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff1ff3f6-2cf3-42b7-b036-8a43a7c322a3","html_url":"https://github.com/b1anca/kindle-notebook","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/b1anca/kindle-notebook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1anca%2Fkindle-notebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1anca%2Fkindle-notebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1anca%2Fkindle-notebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1anca%2Fkindle-notebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b1anca","download_url":"https://codeload.github.com/b1anca/kindle-notebook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1anca%2Fkindle-notebook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277764748,"owners_count":25873208,"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-30T02:00:09.208Z","response_time":75,"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":["kindle","ruby","ruby-gem","selenium-webdriver"],"created_at":"2024-11-20T02:28:57.778Z","updated_at":"2025-10-03T23:02:46.517Z","avatar_url":"https://github.com/b1anca.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kindle Notebook\n\nFetch your Kindle Highlights along with their context using the Selenium Webdriver\n\n[![Gem Version](https://badge.fury.io/rb/kindle-notebook.svg)](https://badge.fury.io/rb/kindle-notebook)\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```sh\n$ bundle add kindle-notebook\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n```sh\n$ gem install kindle-notebook\n```\n\n## Configuration\n\nYou can either create a `.env` file and add your credentials, the default values will be fetched from this file, or configure the gem, for example in an initializer file.\n\n```rb\nKindleNotebook.configure do |config|\n  config.url = \"https://read.amazon.com/\"\n  config.login = ENV[\"AMAZON_EMAIL\"]\n  config.password = ENV[\"AMAZON_PASSWORD\"]\n  config.selenium_driver = :firefox\n  config.headless_mode = false\n  config.min_highlight_words = 1\n  config.max_highlight_words = 3\nend\n```\n\nThe configuration options `min_highlight_words` and `max_highlight_words` determine the range for a highlight's word count. Highlights with a word count outside this range will not be considered will be filtered out.\n\n## Usage\n\nSign in:\n```rb\nclient = KindleNotebook::Client.new\nclient.sign_in\n```\n\nGet the highlights from a book:\n```rb\nbooks = client.books\nbook = books.first\nbook.fetch_highlights\nbook.highlights\n```\n\nTo write to a CSV file:\n```rb\nbook.to_csv_file # =\u003e \"Docker: A Project-Based Approach to Learning - Cannon, Jason.csv\"\n```\n\n## Examples\n\nBook:\n```rb\n#\u003cKindleNotebook::Book:0x00007f0847c4e388\n  @asin=\"B09FJ3411G\",\n  @author=\"Cannon, Jason\",\n  @highlights=[#\u003cKindleNotebook::Highlight:0x00007f46959d61f0 @book_asin=\"B09FJ3411G\", ...],\n  @highlights_count=13,\n  @title=\"Docker: A Project-Based Approach to Learning\"\u003e\n```\n\n\u003c!-- TODO: create highligh class --\u003e\nHighlight:\n```rb\n#\u003cKindleNotebook::Highlight:0x00007f46959d61f0\n  @book_asin=\"B09FJ3411G\",\n  @context=\"If you get stuck, the logging component of systemd, called journald, can also help.\",\n  @page=\"120\",\n  @raw_context=\"used, for example. If you get stuck, the logging component of systemd, called journald, can also help. This journald command displays the last 20 entries in the\",\n  @raw_text=\"journald,\",\n  @text=\"journald\"\u003e\n```\n\nBook CSV:\n```csv\ntext,page,context,book_asin,raw_text,raw_context\njournald,120,\"If you get stuck, the logging component of systemd, called journald, can also help.\",B09FJ3411G,\"journald,\",\"used, for example. If you get stuck, the logging component of systemd, called journald, can also help. This journald command displays the last 20 entries in the\"\nswarm,225,\"Docker Swarm In this chapter, you're going to learn how to create and use a Docker\",B09FJ3411G,swarm.,\"Docker Swarm In this chapter, you're going to learn how to create and use a Docker\"\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n### Testing\n\nThis gem is using [puffing-billy](https://github.com/oesmith/puffing-billy) for testing which needs the geckodriver executable.  It can be installed with:\n```sh\n$ sudo apt-get install firefox-geckodriver # or\n$ brew install geckodriver\n```\n\nThe executable should be in your `PATH`, if it is not you can run the following command (please adapt the location of the geckodriver executable with yours):\n```sh\n$ echo 'export PATH=$PATH:/home/user/.cache/selenium/geckodriver/linux64/0.33.0' \u003e\u003e ~/.zshrc\n ```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/b1anca/kindle-notebook. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/b1anca/kindle-notebook/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the KindleNotebook project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/b1anca/kindle-notebook/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb1anca%2Fkindle-notebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb1anca%2Fkindle-notebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb1anca%2Fkindle-notebook/lists"}