Package: kobodl
Alternatives to kobodlI used to preferkobodlbecause it'sstandalone, which means you don't need other proprietary software like Adobe Digial Editions or Kindle for PC (that I can't use on Linux). However, I have since discoverd a way to do this withCalibreand 2 plugins:Leseratte10/acsm-calibre-plugin- A plugin that can read Adobe Digital Editions files that Kobo web download produces.noDRM/DeDRM_tools- The popular DRM removal plugin.Now you can just download the.acmfile from your book list on Kobo.com and load it into Calibre desktop!It doesn't work with audiobooks and is a little harder to set up, but I think it's overall a better solution and I am not using kobodl personally much anymore. If anyone is interested in becoming a new maintainer of kobodl please let me know by opening adiscussion.  I will still try to keep it functioning as long as I can, and bug reports are still appreciated.kobodlThis is a hard fork ofkobo-book-downloader, a command line tool to download and remove Digital Rights Management (DRM) protection from media legally purchased fromRakuten Kobo. The resultingEPUBfiles can be read with, amongst others,KOReader.NOTE:You must have a kobo email login for this tool to work (you can't use an external provider like Google or Facebook). However, you can create a NEW kobo account and link it with your existing account on the user profile page. Go toMy Account -> Account Settingsto link your new kobo login.Featureskobodl preserves the features fromTnS-hun/kobo-book-downloader.stand-alone; no need to run other software or pre-download through an e-reader.downloads.epubformatted booksIt adds several new features.audiobook support; command-line only for now.Usekobodl book get. There will not be a download button in the webpage for audiobooks because they consist of many large files.multi-user support; fetch books for multiple accounts.web interface; adds new browser gui (with flask)CalibreWeb Integration; send books directly to CalibreWeb from the web interface.docker imagepypi packagepyinstaller bundlesWeb UIWebUI provides most of the same functions of the CLI. It was added to allow other members of a household to add their accounts to kobodl and access their books without having to set up python.User pageBook list pageInstallationpipxpipxinstallkobodlpippipinstallkobodlPre-built bundlesNo python installation necessary.  Simply download the appropriate executable fromthe latest release assetsand run it from the command line.  Pre-built bundles are CLI-only (no web server) so use a different install option if you want that feature.# Linuxwgethttps://github.com/subdavis/kobo-book-downloader/releases/latest/download/kobodl-ubuntu
chmod+xkobodl-ubuntu
./kobodl-ubuntu# MacOS (Catalina 10.15 or newer required.  For older versions, use the pip or docker install option)wgethttps://github.com/subdavis/kobo-book-downloader/releases/latest/download/kobodl-macos
chmod+xkobodl-macos
./kobodl-macos# Windows Powershell examplewget"https://github.com/subdavis/kobo-book-downloader/releases/latest/download/kobodl-windows.exe"-outfile"kobodl.exe"./kobodl.exedockerNote: for rootless docker installations (uncommon), omit the--userargument.# list usersdockerrun--rm-it--user$(id-u):$(id-g)\-v${HOME}/.config:/home/config\ghcr.io/subdavis/kobodl\--config/home/config/kobodl.jsonuserlist# run http serverdockerrun--rm-it--user$(id-u):$(id-g)\-p5000:5000\-v${HOME}/.config:/home/config\-v${PWD}:/home/downloads\ghcr.io/subdavis/kobodl\--config/home/config/kobodl.json\serve\--host0.0.0.0\--output-dir/home/downloads/kobodl_downloadsAlso see thedocker-composeexample file.UsageGeneral usage documentation.Note: These are commands you type into a shell prompt like Terminal (Ubuntu, MacOS) or Powershell or CMD (Windows).  You may need to replacekobodlwith./kobodl.exe,./kobodl-macos-latest, or something else, depending on which installation method you chose.# Get started by adding one or more users# See `Getting a reCAPTCHA code` below for more helpkobodluseradd# List userskobodluserlist# Remove a userkobodluserrmemail@domain.com# List bookskobodlbooklist# List books for a single userkobodlbooklist--useremail@domain.com# List all books, including those marked as readkobodlbooklist--read# Show book list helpkobodlbooklist--help# Download a single book with default options when only 1 user exists# default output directory is `./kobo_downloads`kobodlbookgetc1db3f5c-82da-4dda-9d81-fa718d5d1d16# Download a single book with advanced optionskobodlbookget\--useremail@domain.com\--output-dir/path/to/download_directory\--format-str'{Title}'\c1db3f5c-82da-4dda-9d81-fa718d5d1d16# Download ALL books with default options when only 1 user existskobodlbookget--get-all# Download ALL books with advanced optionskobodlbookget\--useremail@domain.com\--output-dir/path/to/download_directory\--format-str'{Title}'\--get-allRunning the web UIkobodlserve*ServingFlaskapp"kobodl.app"(lazyloading)*Environment:productionWARNING:Thisisadevelopmentserver.Donotuseitinaproductiondeployment.UseaproductionWSGIserverinstead.*Debugmode:off*Runningonhttp://127.0.0.1:5000/(PressCTRL+Ctoquit)Global options# argument formatkobodl[OPTIONS]COMMAND[ARGS]...# set python tabulate formatting style.kobodl--fmt"pretty"COMMAND[ARGS]...# set config path if different than ~/.config/kobodl.jsonkobodl--config/path/to/kobodl.jsonCOMMAND[ARGS]...# get versionkobodl--version# enable debugging, prints to "debug.log"kobodl--debug[OPTIONS]COMMAND[ARGS]...Getting a reCAPTCHA codeAdding a user requires a bit of hackery to get a reCAPTCHA code from Kobo's website. This GIF helps to explain how to do that.CalibreWeb Integration:ExperimentalKobodl's web interface can send books directly to your calibre web server.  Only supported from web client.You must add your CalibreWeb server and user details directly in kobodl.json.  Make sure to include/uploadin the url.  If you don't have CalibreWeb authentication on, leave these fields blank ("").{"users":[/* ... */],"calibre_web":{"enabled":true,"url":"https://calibre.domain.com/upload","username":"CHANGEME","password":"CHANGEME"}}NOTE: you may need to add escape characters if your password contains a\,", or others that require JSON escaping.TroubleshootingSome of my books are missing!Trykobodl book list --readto show all "finished" and "archived" books.  You can manage your book status onthe library page.  Try changing the status using the "..." button.I see a mesage about "skipping _____" when I download all.Try to download the book individually usingkobodl book get <revision-id>, replacingrevision-idwith the UUID from the list table.I can't log in.  I get a message saying "The page format might have changed"This happens from time to time, maybe once or twice a year.  Kobo changes their login page and makes it hard for the tool to parse out the necessary information.  Please open an issue.Something else is going wrong!Try enabling debugging.  Runkobodl --debug book get(for example), which will dump a lot of data into a file calleddebug.log. Email me this file. Do not post it in public on an issue because it will contain information about your account.  My email address can be found on mygithub profile page.DevelopmentThis project usesPython Poetry.pipinstallpoetry
gitclonehttps://github.com/subdavis/kobo-book-downloader
poetryinstall# Run command line apppoetryrunkobodl# Run lintingpoetryruntox-elint# Run standalone bundle generationpoetryruntox-ebuildcli# Run type checkspoetryruntox-etypeNoteskobo-book-downloader will prompt for yourKoboe-mail address and password. Once it has successfully logged in, it won't ask for them again. Your password will not be stored on disk; Kobodl uses access tokens after the initial login.Credit recursively tokobo-book-downloaderand the projects that lead to it.FAQHow does this work?kobodl works by pretending to be an Android Kobo e-reader.  It initializes a device, fetches your library, and downloads books as a "fake" Android app.Why does this download KEPUB formatted books?Kobo has different formats that it serves to different platforms.  For example, Desktop users generally getEPUB3books withAdobeDrmDRM.  Android users typically getKEPUBbooks withKDRMDRM, which is fairly easy to remove, so that's what you get when you use this tool.Is this tool safe and okay to use?I'm not a lawyer, and the discussion below is strictly academic.The author(s) ofkobodldon't collect any information about you or your account aside from what is made available through metrics from GitHub, PyPi, Docker Hub, etc.  SeeLICENSE.mdfor further info.Kobo would probably claim that this tool violates itsTerms of Usebut I'm not able to conclusively determine that it does so.  Some relevant sections are reproduced here.The download of, and access to any Digital Content is available only to Customers and is intended only for such Customers’ personal and non-commercial use. Any other use of Digital Content downloaded or accessed from the Service is strictly prohibitedThis tool should only be used to download books for personal use.You may not obscure or misrepresent your geographical location, forge headers, use proxies, use IP spoofing or otherwise manipulate identifiers in order to disguise the origin of any message or transmittal you send on or through the Service. You may not pretend that you are, or that you represent, someone else, or impersonate any other individual or entity.This might be a violation.  This client announces itself to Kobo servers as an Android device, which can safely be construed as "manipulating identifiers", but whether or not the purpose is to "disguise the origin" is unclear.Kobo may also take steps to prevent fraud, such as restricting the number of titles that may be accessed at one time, and monitoring Customer accounts for any activity that may violate these Terms. If Kobo discovers any type of fraud, Kobo reserves the right to take enforcement action including the termination or suspension of a User’s account.In other words, you could have your account suspended for usingkobodl.Please open an issue on the issue tracker if this happens to you.