No description
Find a file
Filip Vybihal aa81f224fd Readme
2026-01-03 20:09:10 +01:00
src Rule34Paheal 2026-01-03 20:01:30 +01:00
tests Rule34Paheal 2026-01-03 20:01:30 +01:00
.gitignore Zerochan 2026-01-03 17:29:50 +01:00
example.nim Rule34Paheal 2026-01-03 20:01:30 +01:00
LICENSE Add files via upload 2023-08-30 16:57:03 +02:00
nimbooru.nimble Readme 2026-01-03 20:09:10 +01:00
README.md Readme 2026-01-03 20:09:10 +01:00

Nimbooru

A Nim library for searching and retrieving posts from multiple boorus.

Supported Sites

Gelbooru, Safebooru, Danbooru, Yandere, Konachan, E621, Sankaku, IdolComplex, Zerochan, Rule34Paheal

Installation

nimble install nimbooru

Usage

import nimbooru
import std/options

var client = initBooruClient(Safebooru)

# Search posts
let posts = client.searchPosts(limit = 20)
for post in posts:
  echo post.file_url

# Search with tags
let filtered = client.searchPosts(
  tags = some @["green eyes"],
  exclude_tags = some @["hat"]
)

# Get single post
let post = client.getPost("12345")

Async

import std/asyncdispatch

let posts = waitFor client.asyncSearchPosts(limit = 50)
let post = waitFor client.asyncGetPost("12345")

Authentication

var client = initBooruClient(
  Gelbooru,
  apiKey = some "key",
  userId = some "id"
)

Custom URL

var client = initBooruClient(
  "https://safebooru.donmai.us/",
  Danbooru
)

License

LGPL-3.0-or-later