Skip to content

Commit

Permalink
/run/nudecrawler.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslaff committed Jul 7, 2024
1 parent db1185a commit 3f34955
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ For very impatient, add `-a` (skip nudity detection, print all found pages) and
## Config file
Most of nudecrawler options could be configured from config file [nudecrawler.toml](https://raw.githubusercontent.com/yaroslaff/nudecrawler/master/nudecrawler.toml). Nudecrawler looks for config file in following locations (first found file is used):
- `NUDECRAWLER_CONFIG` environment variable or `-c` / `--config` option
- `/run/nudecrawler.toml` (This used when working inside docker contaner and host directory mounted as /run/)
- `nudecrawler.toml` in current working directory
- `~/nudecrawler.toml`
- `/etc/nudecrawler.toml`
Expand Down
3 changes: 2 additions & 1 deletion nudecrawler/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ def first_file(file_paths):

config_path_list = [
os.getenv('NUDECRAWLER_CONFIG'),
'/run/nudecrawler.toml',
'nudecrawler.toml',
os.path.expanduser('~/nudecrawler.toml'),
'/etc/nudecrawler.toml'
'/etc/nudecrawler.toml',
]

def_config_path = first_file(config_path_list)
Expand Down

0 comments on commit 3f34955

Please sign in to comment.