Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
9FS committed Sep 10, 2024
1 parent e18359c commit 8495c90
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# nhentai_archivist
## Introduction

NHentai Archivist is a tool to download hentai from https://nhentai.net and convert them to CBZ files. It can be used from quickly downloading a few hentai specified in the console, downloading a few hundred hentai specified in a downloadme.txt, up to automatically keeping a massive self hosted library up-to-date by automatically generating a downloadme.txt from a search by tag. (For that use-case it has been optimised to tag the CBZ files in a way that [Komga](https://komga.org/) in [oneshot mode](https://komga.org/docs/guides/oneshots) interprets everything correctly.)
NHentai Archivist is a tool to download hentai from https://nhentai.net and convert them to CBZ files. From quickly downloading a few hentai specified in the console, downloading a few hundred hentai specified in a downloadme.txt, up to automatically keeping a massive self-hosted library up-to-date by automatically generating a downloadme.txt from a search by tag. (For that use-case it has been optimised to tag the CBZ files in a way that [Komga](https://komga.org/) in [oneshot mode](https://komga.org/docs/guides/oneshots) interprets everything correctly.)

Why CBZ? CBZ is a widespread standard and basically just a ZIP file containing images and a metadata file. This enables NHentai Archivist to **keep the tags** which wouldn't be possible with PDF as far as I know.
Why CBZ? CBZ is a widespread standard and basically just a ZIP file containing the images and a metadata file. This enables NHentai Archivist to **keep the tags** which wouldn't be possible with PDF as far as I know.

Big thanks go out to [h3nTa1m4st3r_xx69](https://github.com/sam-k0), who helped me using nhentai's completely undocumented API. Without him this project could not have been reactivated.
Big thanks go out to [h3nTa1m4st3r_xx69](https://github.com/sam-k0), who helped me with using nhentai's completely undocumented API. Without him this project could not have been reactivated.
I'm happy about anyone who finds my software useful and feedback is also always welcome. Happy downloading~

## Installation

1. Execute the program once and create a default `./config/.env`.
1. Confirm the database directory in `DATABASE_URL` exists already, which is `./db/` by default. It is not created automatically because remote URL are supported. The database file will be created automatically.
1. If you have problems with nhentai's bot protection (error 403), set `CF_CLEARANCE`, `CSRFTOKEN`, and `USER_AGENT`.
1. Confirm the database directory in `DATABASE_URL` exists already, which is `./db/` by default. It is not created automatically because the URL could point to a remote directory, though I am open to suggestions here. The database file will and should be created automatically.
1. If you have problems with nhentai's bot protection (error 403), set `CF_CLEARANCE`, `CSRFTOKEN`, and `USER_AGENT`. Though I recommend setting the latter 2 in any case.

### Firefox
### Mozilla Firefox

1. Go to https://nhentai.net/. Clear the cloudflare prompt.
1. Go to https://nhentai.net/. Clear the Cloudflare prompt.
1. Open the developer console with F12.
1. Go to the tab "Storage". On the left side expand "Cookies". Click on "https://nhentai.net".
1. Copy the cookie values into `./config/.env`.
Expand All @@ -31,7 +31,7 @@ I'm happy about anyone who finds my software useful and feedback is also always
1. Go to https://www.whatismybrowser.com/detect/what-is-my-user-agent/ and copy your user agent into `./config/.env`.

> [!NOTE]
> If nhentai has "under attack" mode enabled, setting `CF_CLEARANCE` seems to be required daily.
> If nhentai has "under attack" mode enabled, clearing the Cloudflare prompt and updating `CF_CLEARANCE` seem to be required daily.
Further settings:

Expand Down Expand Up @@ -60,12 +60,12 @@ Further settings:
### Download a Few Quickly

1. Run the program as is. Do not set `NHENTAI_TAG` and make sure there is no file at `DOWNLOADME_FILEPATH`.
1. Enter the nhentai id you want to download separated by spaces.
1. Enter the nhentai ID you want to download separated by spaces.

### Download a Bit More From a File

1. Do not set `NHENTAI_TAG`.
1. Create a file at `DOWNLOADME_FILEPATH` and enter the nhentai id you want to download separated by linebreaks.
1. Create a file at `DOWNLOADME_FILEPATH` and enter the nhentai ID you want to download separated by linebreaks.

### Ich mein's ernst: Keeping a Self-Hosted Library Up-to-Date

Expand Down

0 comments on commit 8495c90

Please sign in to comment.