{"id":13616981,"url":"https://github.com/bogdal/freepacktbook","last_synced_at":"2025-07-02T17:07:34.611Z","repository":{"id":57432206,"uuid":"47519456","full_name":"bogdal/freepacktbook","owner":"bogdal","description":"Claim Your Free PacktPub eBook automatically","archived":false,"fork":false,"pushed_at":"2019-02-08T19:27:04.000Z","size":243,"stargazers_count":74,"open_issues_count":1,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-21T22:03:55.814Z","etag":null,"topics":["backup","docker","ebooks","library","packtpub","python","tools"],"latest_commit_sha":null,"homepage":"","language":"Python","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/bogdal.png","metadata":{"files":{"readme":"README.rst","changelog":null,"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":"2015-12-07T00:11:09.000Z","updated_at":"2024-11-13T22:17:15.000Z","dependencies_parsed_at":"2022-09-17T03:50:18.795Z","dependency_job_id":null,"html_url":"https://github.com/bogdal/freepacktbook","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/bogdal/freepacktbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdal%2Ffreepacktbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdal%2Ffreepacktbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdal%2Ffreepacktbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdal%2Ffreepacktbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bogdal","download_url":"https://codeload.github.com/bogdal/freepacktbook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bogdal%2Ffreepacktbook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263182185,"owners_count":23426633,"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":["backup","docker","ebooks","library","packtpub","python","tools"],"created_at":"2024-08-01T20:01:35.522Z","updated_at":"2025-07-02T17:07:34.587Z","avatar_url":"https://github.com/bogdal.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"freepacktbook\n=============\n\n.. image:: https://img.shields.io/circleci/project/bogdal/freepacktbook/master.svg\n    :target: https://circleci.com/gh/bogdal/freepacktbook/tree/master\n    \n.. image:: https://img.shields.io/pypi/v/freepacktbook.svg   \n     :target: https://pypi.python.org/pypi/freepacktbook\n  \n\nClaim Your `Free PacktPub eBook \u003chttps://www.packtpub.com/packt/offers/free-learning\u003e`_ automatically.\n\n**Quickstart:**\n\n.. code-block:: bash\n\n  $ pip install freepacktbook\n\n  $ export PACKTPUB_EMAIL=my@email.com\n  $ export PACKTPUB_PASSWORD=my_password\n  $ export ANTICAPTCHA_KEY=api_key\n\n  $ claim_free_ebook\n\n``Freepacktbook`` uses paid captcha solving service `Anti-Captcha \u003chttp://getcaptchasolution.com/pfiufdwhhv\u003e`_ (referral link), which costs $2 for 1k captchas.\n\nClaim your daily free PacktPub ebook and download it:\n\n.. code-block:: bash\n\n    $ export PACKTPUB_BOOKS_DIR=/path/to/my/books\n\n    $ claim_free_ebook --download\n\n**Download all your ebooks:**\n\n``freepacktbook`` allows you to backup all your ebooks and code files.\n\n.. code-block:: bash\n\n    $ download_ebooks --formats mobi pdf --with-code-files\n\n\nTo see more information:\n\n.. code-block:: bash\n\n    $ download_ebooks -h\n\n**Cron configuration:**\n\nEdit the current crontab:\n\n.. code-block:: bash\n\n    $ crontab -e\n\nAdd the following lines:\n\n.. code-block:: bash\n\n    #!/bin/bash\n    SHELL=/bin/bash\n    PACKTPUB_EMAIL='my@email.com'\n    PACKTPUB_PASSWORD='my_password'\n    ANTICAPTCHA_KEY='api_key'\n\n    0 8 * * * /path/to/claim_free_ebook \u003e\u003e /tmp/claim_free_ebook.log 2\u003e\u00261\n\nThis command shows the direct path to ``claim_free_ebook``:\n\n.. code-block:: bash\n\n    which claim_free_ebook\n\n\nNotifications (optional)\n------------------------\n\n``Slack`` **integration**\n\nSet additionally the following environment variables:\n\n.. code-block:: bash\n\n  export SLACK_URL=https://hooks.slack.com/services/...\n  export SLACK_CHANNEL=random\n\n  $ claim_free_ebook --slack\n\n.. image:: https://github-bogdal.s3.amazonaws.com/freepacktbook/slack.png\n\n``Pushover`` **integration**\n\nSet additionally the following environment variables:\n\n.. code-block:: bash\n\n  export PUSHOVER_USER=random\n  export PUSHOVER_TOKEN=random\n\n  $ claim_free_ebook --pushover\n\n..\n\n..\n\nDocker image\n------------\n\nYou can build your own docker image containing configured cron service. By default, the ``claim_free_ebook`` command is run daily at 8:00am CEST. See `Dockerfile \u003chttps://github.com/bogdal/freepacktbook/blob/master/Dockerfile\u003e`_.\n\nBuild an image:\n\n.. code-block:: bash\n\n    $ docker build -t freepacktbook .\n\nIf you want to change the default time zone, use the ``TZ`` build argument:\n\n.. code-block:: bash\n\n    $ docker build --build-arg TZ=UTC -t freepacktbook .\n\nRun a new container:\n\n.. code-block:: bash\n\n    $ docker run -d \\\n        --name freepacktbook \\\n        -e PACKTPUB_EMAIL=\u003cmy-packtpub-email\u003e \\\n        -e PACKTPUB_PASSWORD=\u003cmy-packtpub-password\u003e \\\n        -e ANTICAPTCHA_KEY=\u003capi_key\u003e \\\n      freepacktbook\n\nThe ``PACKTPUB_ARGS`` env variable passes the additional arguments to the ``claim_free_ebook`` command:\n\n.. code-block:: bash\n\n    $ docker run -d \\\n        --name freepacktbook \\\n        --restart=always \\\n        -e PACKTPUB_EMAIL=\u003cmy-packtpub-email\u003e \\\n        -e PACKTPUB_PASSWORD=\u003cmy-packtpub-password\u003e \\\n        -e ANTICAPTCHA_KEY=\u003capi_key\u003e \\\n        -e PACKTPUB_ARGS='--download' \\\n        -v \u003cpath-to-books-dir\u003e:/data \\\n      freepacktbook\n      \nAlso available on **Docker Hub**\n`bogdal/freepacktbook:latest \u003chttps://hub.docker.com/r/bogdal/freepacktbook/\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdal%2Ffreepacktbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbogdal%2Ffreepacktbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdal%2Ffreepacktbook/lists"}