ebook liberation script
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thufir 60409a53e7 Update 'README.md' 4 months ago
LICENSE initial commit 5 months ago
README.md Update 'README.md' 4 months ago
ebook_liberator.scala initial commit 5 months ago
liberator.png initial commit 5 months ago

README.md

ebook-liberator

Scala helper script for making a .pdf file from a proprietary ebook reader by scanning through all the pages. Takes over keyboard and mouse input to scroll through pages in an ebook and move the cursor to prevent being logged out for inactivity. Tested with Kindle Cloud Reader, but should work with any e-reader application which is fussy and won’t make a friendly file for you. Essentially all this is doing is moving the mouse cursor downwards a pixel and turning the page with the right arrow key or by clicking a next-page button somewhere, don’t worry, the cursor doesn’t show in the pdf. Intended for personal use only with materials you own the rights to, of course.

Known issues:

  • If there are less than or equal to 30 pages the script will crash
    • I won’t fix this because I am lazy and if it is less than 30 pages what are you even doing.
  • The file size of the resulting .pdf can be very large

Dependencies:

  • maim screenshot tool
  • xdotool
  • Scala 2.12.X

Installing and running:

  • Check the dependencies and make sure you are running a Linux system with X installed.
  • run ‘scala ebook-liberator.scala’ and carefully follow the prompts, some of them are timed.

Having a dual-monitor setup is recommended, so you can watch the progress bar in the terminal while the ebook is scanned on the other monitor. A good solution for adding search and select to your book is to use pdfsandwich to OCR it. It took ~5 hours to complete for a two-sided 700 page ebook and quadrupled the file size, but depending on your use-case it could be worth it.

Todo:

  • Add compression to resulting pdf?

Should work on any linux desktop running X.

liberator