]> git.lizzy.rs Git - nhentai.git/blob - README.rst
updated README.rst
[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 Search a keyword and download the first page:
83
84 .. code-block:: bash
85
86     nhentai --search="tomori" --page=1 --download
87
88 Download by tag name:
89
90 .. code-block:: bash
91
92     nhentai --tag lolicon --download --page=2
93
94 Download by language:
95
96 .. code-block:: bash
97
98     nhentai --language english --download --page=2
99
100 Download by artist name:
101
102 .. code-block:: bash
103
104     nhentai --artist henreader --download
105
106 Download by character name:
107
108 .. code-block:: bash
109
110     nhentai --character "kuro von einsbern" --download
111
112 Download by parody name:
113
114 .. code-block:: bash
115
116     nhentai --parody "the idolmaster" --download
117
118 Download by group name:
119
120 .. code-block:: bash
121
122     nhentai --group clesta --download
123
124 Download using multiple tags (--tag, --character, --paordy and --group supported):
125
126 .. code-block:: bash
127
128     nhentai --tag "lolicon, teasing" --artist "tamano kedama, atte nanakusa"
129
130 Download your favorites with delay:
131
132 .. code-block:: bash
133
134     nhentai --favorites --download --delay 1
135
136 Format output doujinshi folder name:
137
138 .. code-block:: bash
139
140     nhentai --id 261100 --format '[%i]%s'
141
142 Supported doujinshi folder formatter:
143
144 - %i: Doujinshi id
145 - %t: Doujinshi name
146 - %s: Doujinshi subtitle (translated name)
147 - %a: Doujinshi authors' name
148
149
150 Other options:
151
152 .. code-block::
153
154     Options:
155       # Operation options
156       -h, --help            show this help message and exit
157       -D, --download        download doujinshi (for search results)
158       -S, --show            just show the doujinshi information
159
160       # Doujinshi options
161       --id=ID               doujinshi ids set, e.g. 1,2,3
162       -s KEYWORD, --search=KEYWORD
163                             search doujinshi by keyword
164       --tag=TAG             download doujinshi by tag
165       -F, --favorites       list or download your favorites.
166
167       # Multi-page options
168       --page=PAGE           page number of search results
169       --max-page=MAX_PAGE   The max page when recursive download tagged doujinshi
170
171       # Download options
172       -o OUTPUT_DIR, --output=OUTPUT_DIR
173                             output dir
174       -t THREADS, --threads=THREADS
175                             thread count for downloading doujinshi
176       -T TIMEOUT, --timeout=TIMEOUT
177                             timeout for downloading doujinshi
178       -d DELAY, --delay=DELAY
179                             slow down between downloading every doujinshi
180       -p PROXY, --proxy=PROXY
181                             uses a proxy, for example: http://127.0.0.1:1080
182       -f FILE, --file=FILE  read gallery IDs from file.
183       --format=NAME_FORMAT  format the saved folder name
184
185       # Generating options
186       --html                generate a html viewer at current directory
187       --no-html             don't generate HTML after downloading
188       --gen-main            generate a main viewer contain all the doujin in the folder
189       -C, --cbz             generate Comic Book CBZ File
190       --rm-origin-dir       remove downloaded doujinshi dir when generated CBZ
191                             file.
192
193       # nHentai options
194       --cookie=COOKIE       set cookie of nhentai to bypass Google recaptcha
195
196
197 ==============
198 nHentai Mirror
199 ==============
200 If you want to use a mirror, you should set up a reverse proxy of `nhentai.net` and `i.nhentai.net`.
201 For example:
202
203 .. code-block::
204
205     i.h.loli.club -> i.nhentai.net
206     h.loli.club -> nhentai.net
207
208 Set `NHENTAI` env var to your nhentai mirror.
209
210 .. code-block:: bash
211
212     NHENTAI=http://h.loli.club nhentai --id 123456
213
214
215 .. image:: ./images/search.png?raw=true
216     :alt: nhentai
217     :align: center
218 .. image:: ./images/download.png?raw=true
219     :alt: nhentai
220     :align: center
221 .. image:: ./images/viewer.png?raw=true
222     :alt: nhentai
223     :align: center
224
225 ============
226 あなたも変態
227 ============
228 .. image:: ./images/image.jpg?raw=true
229     :alt: nhentai
230     :align: center
231
232
233
234 .. |travis| image:: https://travis-ci.org/RicterZ/nhentai.svg?branch=master
235    :target: https://travis-ci.org/RicterZ/nhentai
236
237 .. |pypi| image:: https://img.shields.io/pypi/dm/nhentai.svg
238    :target: https://pypi.org/project/nhentai/
239
240 .. |license| image:: https://img.shields.io/github/license/ricterz/nhentai.svg
241    :target: https://github.com/RicterZ/nhentai/blob/master/LICENSE