GithubHelp home page GithubHelp logo

extract_kindle's Introduction

extract_kindle

Highlights

  • Basically a CLI wrapper to use DeDRM_tools by apprenticeharper without using Calibre GUI
  • Support extract HDImage from .res file
  • Key will be placed at ./kindlekey1.k4i after extracted for the first time.

Installation

  1. Download newest release and uncompress.
  2. Install calibre, and edit config.json's calibre key to your calibre-debug.exe path.
  3. (Optional) create some post-prosssing command and put into config.json's postprocessing key. Remember to add quotes and escape special characters if needed! You can check the sample config.json to get an idea.
  4. Install Python3, and then pycryptodome (pip install pycryptodome)

From source

  1. Clone the repo.
  2. Install calibre and edit config.json's calibre key to your calibre-debug.exe path.
  3. (Optional) create some post-prosssing command and put into config.json's postprocessing key. Remember to add quotes and escape special characters if needed! You can check the sample config.json to get an idea.
  4. Clone https://github.com/apprenticeharper/DeDRM_tools repo and place "DeDRM_plugin" folder and its content directly into this repo's root folder.
  5. Install pycryptodome (pip install pycryptodome)

Usage

usage: extract_kindle.py [-h] [-k] [-p] [-o OUTPUT] dir

positional arguments:
  dir                   choose the folder contains DRMed azw file(s)

optional arguments:
  -h, --help            show this help message and exit
  -k, --keep            keep temp and useless files
  -p, --postprocessing  do some postprocessing with the file.
  -o OUTPUT, --output OUTPUT
                        output folder (default: same as dir)

Examples:

extract_kindle.py "G:\_temp\My Kindle Content\B00KYFFDV2_EBOK" -o "D:\output" -p
extract_kindle.py "G:\_temp\My Kindle Content\B00KYFFDV2_EBOK"

You can also use it as a module by something like

extract_kindle.main(R"G:\_temp\My Kindle Content\B00KYFFDV2_EBOK", "-o", "D:\\output", "-p")

Post-processing template string substitution

Remember to add quotes around them if needed!

  • $o: output root path (i.e. -o parameter)
  • $f: book name string (path-safe, extracted from Kindle info)
  • $p: full path of the folder contains the image files (basically, $o/$f)

extract_kindle's People

Contributors

fireattack avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.