Skip to content

Commit 537fa30

Browse files
author
9FS
committed
updated readme chapter structure
1 parent 6db511a commit 537fa30

File tree

1 file changed

+48
-53
lines changed

1 file changed

+48
-53
lines changed

readme.md

Lines changed: 48 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -24,82 +24,77 @@ I'm happy about anyone who finds my software useful and feedback is also always
2424
1. Execute the program once to create a default `./config/.env`.\
2525
This means that in the directory of the executable, there should now be a directory called "config" containing a file called ".env". You might need to enable seeing hidden files in the file explorer.
2626
1. I recommend setting the `CSRFTOKEN` cookie and `USER_AGENT`. If you start having problems with nHentai's bot protection (error 403), setting these is mandatory. If a `CF_CLEARANCE` cookie is available, it should be set as well.
27-
28-
### Mozilla Firefox
29-
30-
1. Go to https://nhentai.net/. Clear the Cloudflare prompt.
31-
1. Open the developer console with F12.
32-
1. Go to the tab "Storage". On the left side expand "Cookies". Click on "https://nhentai.net".
33-
1. Copy the cookie values into `./config/.env`.
34-
1. Go to https://www.whatismybrowser.com/detect/what-is-my-user-agent/ and copy your user agent into `./config/.env`.
35-
36-
### Google Chrome
37-
38-
1. Go to https://nhentai.net/. Clear the cloudflare prompt.
39-
1. Open the developer console with F12.
40-
1. Go to the tab "Application". On the left side under "Storage", expand "Cookies". Click on "https://nhentai.net".
41-
1. Copy the cookie values into `./config/.env`.
42-
1. Go to https://www.whatismybrowser.com/detect/what-is-my-user-agent/ and copy your user agent into `./config/.env`.
27+
- Mozilla Firefox
28+
1. Go to https://nhentai.net/. Clear the Cloudflare prompt.
29+
1. Open the developer console with F12.
30+
1. Go to the tab "Storage". On the left side expand "Cookies". Click on "https://nhentai.net".
31+
1. Copy the cookie values into `./config/.env`.
32+
1. Go to https://www.whatismybrowser.com/detect/what-is-my-user-agent/ and copy your user agent into `./config/.env`.
33+
- Google Chrome
34+
1. Go to https://nhentai.net/. Clear the cloudflare prompt.
35+
1. Open the developer console with F12.
36+
1. Go to the tab "Application". On the left side under "Storage", expand "Cookies". Click on "https://nhentai.net".
37+
1. Copy the cookie values into `./config/.env`.
38+
1. Go to https://www.whatismybrowser.com/detect/what-is-my-user-agent/ and copy your user agent into `./config/.env`.
4339

4440
> [!NOTE]
4541
> If nHentai has "under attack" mode enabled, clearing the Cloudflare prompt and updating `CF_CLEARANCE` seem to be required daily.
4642
47-
Further settings:
43+
## Further Settings
44+
### `CLEANUP_TEMPORARY_FILES`, optional, defaults to `true`
4845

49-
- `CLEANUP_TEMPORARY_FILES`, optional, defaults to `true`
46+
Setting this to `false` prevents the temporary directory containing the original images from being deleted after the CBZ file has been created. In addition to that it also saves a `ComicBook.xml` in the directory. This can be useful to improve compatibility with third party readers or deduplication software.
5047

51-
Setting this to `false` prevents the temporary directory containing the original images from being deleted after the CBZ file has been created. In addition to that it also saves a `ComicBook.xml` in the directory. This can be useful to improve compatibility with third party readers or deduplication software.
48+
### `DATABASE_URL`
5249

53-
- `DATABASE_URL`
50+
This is the URL to the SQLite database file. If you changed `DATABASE_URL`, confirm the database directory already exists. It is possible that it is not created automatically because the URL could point to a remote directory. The database file will and should be created automatically.
5451

55-
This is the URL to the SQLite database file. If you changed `DATABASE_URL`, confirm the database directory already exists. It is possible that it is not created automatically because the URL could point to a remote directory. The database file will and should be created automatically.
52+
### `DONTDOWNLOADME_FILEPATH`, optional, defaults to `None`
5653

57-
- `DONTDOWNLOADME_FILEPATH`, optional, defaults to `None`
54+
This is the path to the file containing the nHentai ID you explicitly do not want to download, separated by line breaks. It has priority over all input methods. If you want to systematically exclude hentai by tag, use the `-` operator in the tag search instead.
5855

59-
This is the path to the file containing the nHentai ID you explicitly do not want to download, separated by line breaks. It has priority over all input methods. If you want to systematically exclude hentai by tag, use the `-` operator in the tag search instead.
56+
### `DOWNLOADME_FILEPATH`, optional, defaults to `None`
6057

61-
- `DOWNLOADME_FILEPATH`, optional, defaults to `None`
58+
This is the path to the file containing the nHentai ID you want to download, separated by line breaks. If this file exists, it has priority over tag search and console input.
6259

63-
This is the path to the file containing the nHentai ID you want to download, separated by line breaks. If this file exists, it has priority over tag search and console input.
60+
### `LIBRARY_PATH`
6461

65-
- `LIBRARY_PATH`
62+
This is the directory temporary images and finished CBZ files are download to. By default, it will download to `./hentai/`.
6663

67-
This is the directory temporary images and finished CBZ files are download to. By default, it will download to `./hentai/`.
64+
### `LIBRARY_SPLIT`, optional, defaults to `0`
6865

69-
- `LIBRARY_SPLIT`, optional, defaults to `0`
66+
Setting this to a value other than 0 splits the library at `LIBRARY_PATH` into sub-directories with a maximum number of `LIBRARY_SPLIT` hentai allowed per sub-directory. It is recommended if the number of hentai in 1 directory starts to affect file explorer performance. This _should_ not affect you if you plan to keep less than 10.000 files in your `LIBRARY_PATH` directory, otherwise the recommended setting is `LIBRARY_SPLIT = 10000`.
7067

71-
Setting this to a value other than 0 splits the library at `LIBRARY_PATH` into sub-directories with a maximum number of `LIBRARY_SPLIT` hentai allowed per sub-directory. It is recommended if the number of hentai in 1 directory starts to affect file explorer performance. This _should_ not affect you if you plan to keep less than 10.000 files in your `LIBRARY_PATH` directory, otherwise the recommended setting is `LIBRARY_SPLIT = 10000`.
68+
### `NHENTAI_TAGS`, optional, defaults to `None` (client mode)
7269

73-
- `NHENTAI_TAGS`, optional, defaults to `None` (client mode)
70+
Setting this will trigger "server mode". If no file at `DOWNLOADME_FILEPATH` is found, it will generate one by searching for the tags specified. After all hentai on the downloadme have been downloaded, it will wait for `SLEEP_INTERVAL` seconds and restart the search. This is useful to keep a self-hosted library up-to-date with the latest releases from the specified tag search. Multiple tags and tag exclusions can be specified and are connected via logical AND. This means results must fullfill all criteria specified.
7471

75-
Setting this will trigger "server mode". If no file at `DOWNLOADME_FILEPATH` is found, it will generate one by searching for the tags specified. After all hentai on the downloadme have been downloaded, it will wait for `SLEEP_INTERVAL` seconds and restart the search. This is useful to keep a self-hosted library up-to-date with the latest releases from the specified tag search. Multiple tags and tag exclusions can be specified and are connected via logical AND. This means results must fullfill all criteria specified.
72+
`./config/.env` examples:
7673

77-
`./config/.env` examples:
78-
79-
```TOML
80-
NHENTAI_TAGS = ['language:"english"'] # all english hentai
81-
NHENTAI_TAGS = ['tag:"big breasts"'] # all hentai with the tag "big breasts"
82-
NHENTAI_TAGS = ['parody:"kono subarashii sekai ni syukufuku o"'] # all hentai from the anime "Kono Subarashii Sekai ni Syukufuku o"
83-
NHENTAI_TAGS = ['artist:"shindol"'] # all hentai by Shindol
84-
NHENTAI_TAGS = ['character:"frieren"'] # all hentai with character "Frieren"
85-
NHENTAI_TAGS = ['tag:"ffm threesome"', 'tag:"sister"', '-tag:"full censorship"', '-tag:"mind control"'] # all hentai with the tags "ffm threesome" and "sister" but without the tags "full censorship" and "mind control"
86-
```
74+
```TOML
75+
NHENTAI_TAGS = ['language:"english"'] # all english hentai
76+
NHENTAI_TAGS = ['tag:"big breasts"'] # all hentai with the tag "big breasts"
77+
NHENTAI_TAGS = ['parody:"kono subarashii sekai ni syukufuku o"'] # all hentai from the anime "Kono Subarashii Sekai ni Syukufuku o"
78+
NHENTAI_TAGS = ['artist:"shindol"'] # all hentai by Shindol
79+
NHENTAI_TAGS = ['character:"frieren"'] # all hentai with character "Frieren"
80+
NHENTAI_TAGS = ['tag:"ffm threesome"', 'tag:"sister"', '-tag:"full censorship"', '-tag:"mind control"'] # all hentai with the tags "ffm threesome" and "sister" but without the tags "full censorship" and "mind control"
81+
```
8782

88-
`docker-compose.yaml` examples:
83+
`docker-compose.yaml` examples:
8984

90-
```YAML
91-
environment:
92-
- NHENTAI_TAGS: '[language:"english"]' # all english hentai
93-
- NHENTAI_TAGS: '[tag:"big breasts"]' # all hentai with the tag "big breasts"
94-
- NHENTAI_TAGS: '[parody:"kono subarashii sekai ni syukufuku o"]' # all hentai from the anime "Kono Subarashii Sekai ni Syukufuku o"
95-
- NHENTAI_TAGS: '[artist:"shindol"]' # all hentai by Shindol
96-
- NHENTAI_TAGS: '[character:"frieren"]' # all hentai with character "Frieren"
97-
- NHENTAI_TAGS: '[tag:"ffm threesome", tag:"sister", -tag:"full censorship", -tag:"mind control"]' # all hentai with the tags "ffm threesome" and "sister" but without the tags "full censorship" and "mind control"
98-
```
85+
```YAML
86+
environment:
87+
- NHENTAI_TAGS: '[language:"english"]' # all english hentai
88+
- NHENTAI_TAGS: '[tag:"big breasts"]' # all hentai with the tag "big breasts"
89+
- NHENTAI_TAGS: '[parody:"kono subarashii sekai ni syukufuku o"]' # all hentai from the anime "Kono Subarashii Sekai ni Syukufuku o"
90+
- NHENTAI_TAGS: '[artist:"shindol"]' # all hentai by Shindol
91+
- NHENTAI_TAGS: '[character:"frieren"]' # all hentai with character "Frieren"
92+
- NHENTAI_TAGS: '[tag:"ffm threesome", tag:"sister", -tag:"full censorship", -tag:"mind control"]' # all hentai with the tags "ffm threesome" and "sister" but without the tags "full censorship" and "mind control"
93+
```
9994
100-
Pay attention to copy the format exactly as shown in the examples. That includes the usage of single quotation marks outside and double quotation marks inside. If the format is not being copied exactly, at least searching by tags that contain a space leads to erroneous API responses. More information can be found [here](https://nhentai.net/info/).
95+
Pay attention to copy the format exactly as shown in the examples. That includes the usage of single quotation marks outside and double quotation marks inside. If the format is not being copied exactly, at least searching by tags that contain a space leads to erroneous API responses. More information can be found [here](https://nhentai.net/info/).
10196
102-
The docker compose method can be especially useful if altering quickly between searches, or configs in general, is desired. Just define a `docker-compose.yaml` for each config and then simply spinning down and up stacks is all that is needed to switch between them.
97+
The docker compose method can be especially useful if altering quickly between searches, or configs in general, is desired. Just define a `docker-compose.yaml` for each config and then simply spinning down and up stacks is all that is needed to switch between them.
10398

10499
> [!WARNING]
105100
> I advise against running multiple instances of nHentai Archivist at the same time.

0 commit comments

Comments
 (0)