https://github.com/katagaki/sortnao-py
Illustration sorting in Python using SauceNAO.
https://github.com/katagaki/sortnao-py
playwright python saucenao saucenao-api
Last synced: 3 months ago
JSON representation
Illustration sorting in Python using SauceNAO.
- Host: GitHub
- URL: https://github.com/katagaki/sortnao-py
- Owner: katagaki
- License: cc0-1.0
- Created: 2025-03-09T06:30:42.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-09T09:15:38.000Z (3 months ago)
- Last Synced: 2025-03-16T12:29:49.051Z (3 months ago)
- Topics: playwright, python, saucenao, saucenao-api
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SortNAO
Simple illustration sorting using SauceNAO.
## Setup
1. Using [uv](https://docs.astral.sh/uv/getting-started/installation/),
create a virtual environment and sync the project's dependencies.```zsh
uv venv
source ./.venv/bin/activate
uv sync
```2. Place your files in a folder named "inputs" in the project root folder.
3. Prepare your `.env` file if you are using the official API implementation.
4. Execute `app.py` within the virtual environment to begin the process.
## Using the official API
Obtain an API key from your [SauceNAO account page](https://saucenao.com/user.php),
and place it in the .env file like this:```dotenv
SAUCENAO_API_KEY=xxxxx
```Once you have done that, you can use the Sorter class like this:
```python
with Sorter("api") as sorter:
sorter.lookup_files()
```## Using Playwright web automation
The Playwright web automation implemention is only implemented as a proof-of-concept, and should not be used.
Do note that unregistered account API rate limits apply.```python
with Sorter("web") as sorter:
sorter.lookup_files()
```