9-FS / nhentai_archivist

downloads hentai from nhentai.net and converts to CBZ
MIT License
92 stars 4 forks source link

Fix `NHENTAI_TAGS` Not Being Settable Via Docker Compose #13

Closed 9-FS closed 6 days ago

9-FS commented 6 days ago

Currently, NHENTAI_TAGS is not settable via docker compose, because docker compose does not seem to support array syntax for its environmental variables. All array entries must be made with 1 string. The usual solution seems to be to pass 1 string with comma separated values and split them manually in the program.

9-FS commented 6 days ago

I've figured it out, and it doesn't even require a patch.

In your docker-compose.yaml you can use a similar syntax to the ./config/.env file:

environment:
    - NHENTAI_TAGS: '[language:"english"]' # all english hentai
    - NHENTAI_TAGS: '[tag:"big breasts"]' # all hentai with the tag "big breasts"
    - NHENTAI_TAGS: '[parody:"kono subarashii sekai ni syukufuku o"]' # all hentai from the anime "Kono Subarashii Sekai ni Syukufuku o"
    - NHENTAI_TAGS: '[artist:"shindol"]' # all hentai by Shindol
    - NHENTAI_TAGS: '[character:"frieren"]' # all hentai with character "Frieren"
    - 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"

I'm adding this to the readme.