]> git.lizzy.rs Git - nhentai.git/blob - README.rst
Merge pull request #53 from symant233/master
[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 your favorites with delay:
78
79 .. code-block:: bash
80
81     nhentai --favorites --download --delay 1
82
83 Format output doujinshi folder name:
84
85 .. code-block:: bash
86
87     nhentai --id 261100 --format '[%i]%s'
88
89 Supported doujinshi folder formatter:
90
91 - %i: Doujinshi id
92 - %t: Doujinshi name
93 - %s: Doujinshi subtitle (translated name)
94 - %a: Doujinshi authors' name
95
96
97 Other options:
98
99 .. code-block::
100
101     Options:
102       # Operation options
103       -h, --help            show this help message and exit
104       -D, --download        download doujinshi (for search results)
105       -S, --show            just show the doujinshi information
106
107       # Doujinshi options
108       --id=ID               doujinshi ids set, e.g. 1,2,3
109       -s KEYWORD, --search=KEYWORD
110                             search doujinshi by keyword
111       --tag=TAG             download doujinshi by tag
112       -F, --favorites       list or download your favorites.
113
114       # Multi-page options
115       --page=PAGE           page number of search results
116       --max-page=MAX_PAGE   The max page when recursive download tagged doujinshi
117
118       # Download options
119       -o OUTPUT_DIR, --output=OUTPUT_DIR
120                             output dir
121       -t THREADS, --threads=THREADS
122                             thread count for downloading doujinshi
123       -T TIMEOUT, --timeout=TIMEOUT
124                             timeout for downloading doujinshi
125       -d DELAY, --delay=DELAY
126                             slow down between downloading every doujinshi
127       -p PROXY, --proxy=PROXY
128                             uses a proxy, for example: http://127.0.0.1:1080
129       -f FILE, --file=FILE  read gallery IDs from file.
130       --format=NAME_FORMAT  format the saved folder name
131
132       # Generating options
133       --html                generate a html viewer at current directory
134       --no-html             don't generate HTML after downloading
135       -C, --cbz             generate Comic Book CBZ File
136       --rm-origin-dir       remove downloaded doujinshi dir when generated CBZ
137                             file.
138
139       # nHentai options
140       --cookie=COOKIE       set cookie of nhentai to bypass Google recaptcha
141
142
143 ==============
144 nHentai Mirror
145 ==============
146 If you want to use a mirror, you should set up a reverse proxy of `nhentai.net` and `i.nhentai.net`.
147 For example:
148
149 .. code-block:: 
150
151     i.h.loli.club -> i.nhentai.net
152     h.loli.club -> nhentai.net
153
154 Set `NHENTAI` env var to your nhentai mirror.
155
156 .. code-block:: bash
157
158     NHENTAI=http://h.loli.club nhentai --id 123456
159
160
161 .. image:: ./images/search.png?raw=true
162     :alt: nhentai
163     :align: center
164 .. image:: ./images/download.png?raw=true
165     :alt: nhentai
166     :align: center
167 .. image:: ./images/viewer.png?raw=true
168     :alt: nhentai
169     :align: center
170
171 ============
172 あなたも変態
173 ============
174 .. image:: ./images/image.jpg?raw=true
175     :alt: nhentai
176     :align: center
177
178
179
180 .. |travis| image:: https://travis-ci.org/RicterZ/nhentai.svg?branch=master
181    :target: https://travis-ci.org/RicterZ/nhentai
182
183 .. |pypi| image:: https://img.shields.io/pypi/dm/nhentai.svg
184    :target: https://pypi.org/project/nhentai/
185
186 .. |license| image:: https://img.shields.io/github/license/ricterz/nhentai.svg
187    :target: https://github.com/RicterZ/nhentai/blob/master/LICENSE