From 5eb5cf085dd796a2556ac365408b60ca72a54e4f Mon Sep 17 00:00:00 2001 From: Lorenzo Di Fuccia Date: Mon, 11 Dec 2017 19:22:12 +0100 Subject: [PATCH] Update README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index c7ad817..710cb60 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,35 @@ # SafariBooks +Download and read in EPUB your favorites books from [Safari Books Online](https://www.safaribooksonline.com). + +## Usage: +```bash +~$ python3 safaribooks.py --cred "account_mail@mail.com:password01" XXXXXXXXXXXXX +``` +The book ID (the X-es) are the digits that you can find in the URL. +Ex: `https://www.safaribooksonline.com/library/view/book-name/XXXXXXXXXXXXX/ch01.html` + +The first time you use the program, you have to specify your SafariBooksOnline account credentials. +Next times you want to download a book, before session expires, you can omit the credential because the program save your session cookies in a file called `cookies.json`. +Pay attention if you use a shared PC, because everyone that has access to your files can steal your session. +If you don't want to cache the cookies, just use the `--no-cookies` option and provide all the time your `--cred`. + +#### List of program option: +```text +usage: safaribooks.py [--cred ] [--no-cookies] [--preserve-log] [--help] + Download and read in EPUB your favorites books from Safari Books Online. + +positional arguments: + Book digits ID that you want to download. You can find it in the URL (X-es): + `https://www.safaribooksonline.com/library/view/book-name/XXXXXXXXXXXXX/cover.html` + +optional arguments: + --cred Credentials used to perform the login on SafariBooksOnline. + Es. ` --cred "account_mail@mail.com:password01" `. + --no-cookies Prevent your session data to be saved into `cookies.json` file. + --preserve-log Leave the `info.log` file even if there isn't any error. + --help Show this help message. +``` + +## Example: +\# TODO