]> git.lizzy.rs Git - nhentai.git/blob - README.rst
0.4.9
[nhentai.git] / README.rst
1 nhentai
2 =======
3
4 .. code-block::
5
6            _   _            _        _
7      _ __ | | | | ___ _ __ | |_ __ _(_)
8     | '_ \| |_| |/ _ \ '_ \| __/ _` | |
9     | | | |  _  |  __/ | | | || (_| | |
10     |_| |_|_| |_|\___|_| |_|\__\__,_|_|
11
12
13 あなたも変態。 いいね?
14
15 |travis|
16 |pypi|
17 |license|
18
19
20 nHentai is a CLI tool for downloading doujinshi from <http://nhentai.net>
21
22 ===================
23 Manual Installation
24 ===================
25 .. code-block::
26
27     git clone https://github.com/RicterZ/nhentai
28     cd nhentai
29     python setup.py install
30
31 ==================
32 Installation (pip)
33 ==================
34 Alternatively, install from PyPI with pip:
35
36 .. code-block::
37
38            pip install nhentai
39
40 For a self-contained installation, use `Pipx <https://github.com/pipxproject/pipx/>`_:
41
42 .. code-block::
43
44            pipx install nhentai
45
46 =====================
47 Installation (Gentoo)
48 =====================
49 .. code-block::
50
51     layman -fa glicOne
52     sudo emerge net-misc/nhentai
53
54 =====
55 Usage
56 =====
57 **IMPORTANT**: To bypass the nhentai frequency limit, you should use `--cookie` option to store your cookie.
58
59 *The default download folder will be the path where you run the command (CLI path).*
60
61
62 Set your nhentai cookie against captcha:
63
64 .. code-block:: bash
65
66     nhentai --cookie "YOUR COOKIE FROM nhentai.net"
67
68 **NOTE**: The format of the cookie is `"csrftoken=TOKEN; sessionid=ID"`
69
70 Download specified doujinshi:
71
72 .. code-block:: bash
73
74     nhentai --id=123855,123866
75
76 Download doujinshi with ids specified in a file (doujinshi ids split by line):
77
78 .. code-block:: bash
79
80     nhentai --file=doujinshi.txt
81
82 Set search default language
83
84 .. code-block:: bash
85
86     nhentai --language=english
87
88 Search a keyword and download the first page:
89
90 .. code-block:: bash
91
92     nhentai --search="tomori" --page=1 --download
93     # you also can download by tags and multiple keywords
94     nhentai --search="tag:lolicon, artist:henreader, tag:full color"
95     nhentai --search="lolicon, henreader, full color"
96
97 Download your favorites with delay:
98
99 .. code-block:: bash
100
101     nhentai --favorites --download --delay 1
102
103 Format output doujinshi folder name:
104
105 .. code-block:: bash
106
107     nhentai --id 261100 --format '[%i]%s'
108
109 Supported doujinshi folder formatter:
110
111 - %i: Doujinshi id
112 - %t: Doujinshi name
113 - %s: Doujinshi subtitle (translated name)
114 - %a: Doujinshi authors' name
115
116
117 Other options:
118
119 .. code-block::
120
121     Options:
122       # Operation options
123       -h, --help            show this help message and exit
124       -D, --download        download doujinshi (for search results)
125       -S, --show            just show the doujinshi information
126
127       # Doujinshi options
128       --id=ID               doujinshi ids set, e.g. 1,2,3
129       -s KEYWORD, --search=KEYWORD
130                             search doujinshi by keyword
131       --tag=TAG             download doujinshi by tag
132       -F, --favorites       list or download your favorites.
133
134       # Multi-page options
135       --page=PAGE           page number of search results
136       --max-page=MAX_PAGE   The max page when recursive download tagged doujinshi
137
138       # Download options
139       -o OUTPUT_DIR, --output=OUTPUT_DIR
140                             output dir
141       -t THREADS, --threads=THREADS
142                             thread count for downloading doujinshi
143       -T TIMEOUT, --timeout=TIMEOUT
144                             timeout for downloading doujinshi
145       -d DELAY, --delay=DELAY
146                             slow down between downloading every doujinshi
147       -p PROXY, --proxy=PROXY
148                             uses a proxy, for example: http://127.0.0.1:1080
149       -f FILE, --file=FILE  read gallery IDs from file.
150       --format=NAME_FORMAT  format the saved folder name
151
152       # Generating options
153       --html                generate a html viewer at current directory
154       --no-html             don't generate HTML after downloading
155       --gen-main            generate a main viewer contain all the doujin in the folder
156       -C, --cbz             generate Comic Book CBZ File
157       -P --pdf              generate PDF file
158       --rm-origin-dir       remove downloaded doujinshi dir when generated CBZ
159                             or PDF file.
160
161       # nHentai options
162       --cookie=COOKIE       set cookie of nhentai to bypass Google recaptcha
163
164
165 ==============
166 nHentai Mirror
167 ==============
168 If you want to use a mirror, you should set up a reverse proxy of `nhentai.net` and `i.nhentai.net`.
169 For example:
170
171 .. code-block::
172
173     i.h.loli.club -> i.nhentai.net
174     h.loli.club -> nhentai.net
175
176 Set `NHENTAI` env var to your nhentai mirror.
177
178 .. code-block:: bash
179
180     NHENTAI=http://h.loli.club nhentai --id 123456
181
182
183 .. image:: ./images/search.png?raw=true
184     :alt: nhentai
185     :align: center
186 .. image:: ./images/download.png?raw=true
187     :alt: nhentai
188     :align: center
189 .. image:: ./images/viewer.png?raw=true
190     :alt: nhentai
191     :align: center
192
193 ============
194 あなたも変態
195 ============
196 .. image:: ./images/image.jpg?raw=true
197     :alt: nhentai
198     :align: center
199
200
201
202 .. |travis| image:: https://travis-ci.org/RicterZ/nhentai.svg?branch=master
203    :target: https://travis-ci.org/RicterZ/nhentai
204
205 .. |pypi| image:: https://img.shields.io/pypi/dm/nhentai.svg
206    :target: https://pypi.org/project/nhentai/
207
208 .. |license| image:: https://img.shields.io/github/license/ricterz/nhentai.svg
209    :target: https://github.com/RicterZ/nhentai/blob/master/LICENSE