]> git.lizzy.rs Git - nhentai.git/blobdiff - README.rst
update README for issue #237
[nhentai.git] / README.rst
index add2b634db9d5affc2bd43e063c46c8c97582fe5..bd5b6d0c37f178336328c15c59da1c87eec438c5 100644 (file)
@@ -19,15 +19,30 @@ nhentai
 
 nHentai is a CLI tool for downloading doujinshi from <http://nhentai.net>
 
-============
-Installation
-============
+===================
+Manual Installation
+===================
 .. code-block::
 
     git clone https://github.com/RicterZ/nhentai
     cd nhentai
     python setup.py install
-    
+
+==================
+Installation (pip)
+==================
+Alternatively, install from PyPI with pip:
+
+.. code-block::
+
+           pip install nhentai
+
+For a self-contained installation, use `Pipx <https://github.com/pipxproject/pipx/>`_:
+
+.. code-block::
+
+           pipx install nhentai
+
 =====================
 Installation (Gentoo)
 =====================
@@ -35,7 +50,14 @@ Installation (Gentoo)
 
     layman -fa glicOne
     sudo emerge net-misc/nhentai
+    
+=====================
+Installation (NixOs)
+=====================
+.. code-block::
 
+    nix-env -iA nixos.nhentai
+    
 =====
 Usage
 =====
@@ -50,65 +72,46 @@ Set your nhentai cookie against captcha:
 
     nhentai --cookie "YOUR COOKIE FROM nhentai.net"
 
-Download specified doujinshi:
-
-.. code-block:: bash
-
-    nhentai --id=123855,123866
-
-Download doujinshi with ids specified in a file (doujinshi ids split by line):
-
-.. code-block:: bash
-
-    nhentai --file=doujinshi.txt
-
-Search a keyword and download the first page:
-
-.. code-block:: bash
-
-    nhentai --search="tomori" --page=1 --download
-
-Download by tag name:
+**NOTE**
 
-.. code-block:: bash
+- The format of the cookie is `"csrftoken=TOKEN; sessionid=ID; cf_clearance=CLOUDFLARE"`
+- `cf_clearance` cookie and useragent must be set if you encounter "blocked by cloudflare captcha" error. Make sure you use the same IP and useragent as when you got it
 
-    nhentai --tag lolicon --download --page=2
+| To get csrftoken and sessionid, first login to your nhentai account in web browser, then:
+| (Chrome) |ve| |ld| More tools    |ld| Developer tools     |ld| Application |ld| Storage |ld| Cookies |ld| https://nhentai.net
+| (Firefox) |hv| |ld| Web Developer |ld| Web Developer Tools                  |ld| Storage |ld| Cookies |ld| https://nhentai.net
+| 
 
-Download by language:
+.. |hv| unicode:: U+2630 .. https://www.compart.com/en/unicode/U+2630
+.. |ve| unicode:: U+22EE .. https://www.compart.com/en/unicode/U+22EE
+.. |ld| unicode:: U+2014 .. https://www.compart.com/en/unicode/U+2014
 
-.. code-block:: bash
-
-    nhentai --language english --download --page=2
-
-Download by artist name:
-
-.. code-block:: bash
-
-    nhentai --artist henreader --download
-
-Download by character name:
+Download specified doujinshi:
 
 .. code-block:: bash
 
-    nhentai --character kuro von einsbern --download
+    nhentai --id=123855,123866
 
-Download by parody name:
+Download doujinshi with ids specified in a file (doujinshi ids split by line):
 
 .. code-block:: bash
 
-    nhentai --parody the idolmaster --download
+    nhentai --file=doujinshi.txt
 
-Download by group name:
+Set search default language
 
 .. code-block:: bash
 
-    nhentai --group clesta --download
+    nhentai --language=english
 
-Download using multiple tags (--tag, --character, --paordy and --group supported):
+Search a keyword and download the first page:
 
 .. code-block:: bash
 
-    nhentai --tag lolicon, teasing --artist tamano kedama, atte nanakusa
+    nhentai --search="tomori" --page=1 --download
+    # you also can download by tags and multiple keywords
+    nhentai --search="tag:lolicon, artist:henreader, tag:full color"
+    nhentai --search="lolicon, henreader, full color"
 
 Download your favorites with delay:
 
@@ -128,30 +131,34 @@ Supported doujinshi folder formatter:
 - %t: Doujinshi name
 - %s: Doujinshi subtitle (translated name)
 - %a: Doujinshi authors' name
+- %p: Doujinshi pretty name
 
 
 Other options:
 
 .. code-block::
 
+    Usage:
+      nhentai --search [keyword] --download
+      NHENTAI=http://h.loli.club nhentai --id [ID ...]
+      nhentai --file [filename]
+
+    Environment Variable:
+      NHENTAI                 nhentai mirror url
+
     Options:
-      # Operation options
       -h, --help            show this help message and exit
       -D, --download        download doujinshi (for search results)
       -S, --show            just show the doujinshi information
-
-      # Doujinshi options
       --id=ID               doujinshi ids set, e.g. 1,2,3
       -s KEYWORD, --search=KEYWORD
                             search doujinshi by keyword
-      --tag=TAG             download doujinshi by tag
       -F, --favorites       list or download your favorites.
-
-      # Multi-page options
-      --page=PAGE           page number of search results
-      --max-page=MAX_PAGE   The max page when recursive download tagged doujinshi
-
-      # Download options
+      --page-all            all search results
+      --page=PAGE, --page-range=PAGE
+                            page number of search results. e.g. 1,2-5,14
+      --sorting=SORTING     sorting of doujinshi (recent / popular /
+                            popular-[today|week])
       -o OUTPUT_DIR, --output=OUTPUT_DIR
                             output dir
       -t THREADS, --threads=THREADS
@@ -160,21 +167,32 @@ Other options:
                             timeout for downloading doujinshi
       -d DELAY, --delay=DELAY
                             slow down between downloading every doujinshi
-      -p PROXY, --proxy=PROXY
-                            uses a proxy, for example: http://127.0.0.1:1080
+      --proxy=PROXY         store a proxy, for example: -p 'http://127.0.0.1:1080'
       -f FILE, --file=FILE  read gallery IDs from file.
       --format=NAME_FORMAT  format the saved folder name
-
-      # Generating options
+      -r, --dry-run         Dry run, skip file download.
       --html                generate a html viewer at current directory
       --no-html             don't generate HTML after downloading
+      --gen-main            generate a main viewer contain all the doujin in the
+                            folder
       -C, --cbz             generate Comic Book CBZ File
-      --rm-origin-dir       remove downloaded doujinshi dir when generated CBZ
-                            file.
-
-      # nHentai options
-      --cookie=COOKIE       set cookie of nhentai to bypass Google recaptcha
-
+      -P, --pdf             generate PDF file
+      --rm-origin-dir       remove downloaded doujinshi dir when generated CBZ or
+                            PDF file.
+      --meta                generate a metadata file in doujinshi format
+      --regenerate-cbz      regenerate the cbz file if exists
+      --cookie=COOKIE       set cookie of nhentai to bypass Cloudflare captcha
+      --useragent=USERAGENT
+                            set useragent to bypass Cloudflare captcha
+      --language=LANGUAGE   set default language to parse doujinshis
+      --clean-language      set DEFAULT as language to parse doujinshis
+      --save-download-history
+                            save downloaded doujinshis, whose will be skipped if
+                            you re-download them
+      --clean-download-history
+                            clean download history
+      --template=VIEWER_TEMPLATE
+                            set viewer template
 
 ==============
 nHentai Mirror
@@ -182,7 +200,7 @@ nHentai Mirror
 If you want to use a mirror, you should set up a reverse proxy of `nhentai.net` and `i.nhentai.net`.
 For example:
 
-.. code-block:: 
+.. code-block::
 
     i.h.loli.club -> i.nhentai.net
     h.loli.club -> nhentai.net