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