Skip to content

Commit fe398f7

Browse files
committed
docs: sync 7ba58c83bd56
0 parents  commit fe398f7

82 files changed

Lines changed: 3874 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pages.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
- run: ./build.sh
26+
- uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: public
29+
- id: deployment
30+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public/
2+
resources/
3+
bin/
4+
.hugo_build.lock

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# mondocs
2+
3+
User documentation for **monbooru**, a self-hosted booru for your
4+
local image collection, and its two optional addons:
5+
6+
- **monloader** - a companion downloader and reverse-lookup service
7+
- **monsender** - a browser extension that sends pages to monloader
8+
9+
Start reading at [content/_index.md](content/_index.md), or jump
10+
straight to an addon: [monloader](content/addons/monloader/_index.md),
11+
[monsender](content/addons/monsender/_index.md).
12+
13+
## License
14+
15+
Documentation for AGPL-3.0-or-later projects; same license applies.

REPOSITORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/leqwin/mondocs

build.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
cd "$(dirname "$0")"
5+
6+
HUGO_VERSION=0.148.2
7+
MIN_MINOR=146
8+
BIN_DIR=bin
9+
10+
hugo_ok() {
11+
minor=$("$1" version 2>/dev/null | sed -n 's/^hugo v0\.\([0-9]*\).*/\1/p')
12+
[ -n "$minor" ] && [ "$minor" -ge "$MIN_MINOR" ]
13+
}
14+
15+
download_hugo() {
16+
case "$(uname -s)" in
17+
Linux) os=linux ;;
18+
Darwin) os=darwin ;;
19+
*) echo "build.sh: unsupported OS $(uname -s), install Hugo 0.$MIN_MINOR+ yourself" >&2; exit 1 ;;
20+
esac
21+
case "$(uname -m)" in
22+
x86_64) arch=amd64 ;;
23+
aarch64|arm64) arch=arm64 ;;
24+
*) echo "build.sh: unsupported arch $(uname -m), install Hugo 0.$MIN_MINOR+ yourself" >&2; exit 1 ;;
25+
esac
26+
[ "$os" = darwin ] && arch=universal
27+
url="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_${os}-${arch}.tar.gz"
28+
echo "downloading hugo $HUGO_VERSION ($os-$arch) into $BIN_DIR/"
29+
mkdir -p "$BIN_DIR"
30+
if command -v curl >/dev/null 2>&1; then
31+
curl -fsSL "$url" | tar -xz -C "$BIN_DIR" hugo
32+
else
33+
wget -qO- "$url" | tar -xz -C "$BIN_DIR" hugo
34+
fi
35+
}
36+
37+
if [ -x "$BIN_DIR/hugo" ] && hugo_ok "$BIN_DIR/hugo"; then
38+
HUGO=$BIN_DIR/hugo
39+
elif command -v hugo >/dev/null 2>&1 && hugo_ok hugo; then
40+
HUGO=hugo
41+
else
42+
download_hugo
43+
HUGO=$BIN_DIR/hugo
44+
fi
45+
46+
"$HUGO" --gc --cleanDestinationDir
47+
echo "built into public/"

content/_index.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: monbooru
3+
---
4+
5+
monbooru is a private booru you run on your own machine. A booru is a
6+
tag-based image gallery: instead of sorting pictures into folders you
7+
attach tags to them (`red_hair`, `character:hakurei_reimu`, `rating:general`)
8+
and find things back by combining tags in a search.
9+
10+
![The gallery grid](gallery.png)
11+
12+
It is built for organizing a local media collection: your own photos
13+
and videos, downloaded art, manga archives, and AI-generated images.
14+
Everything runs from a single small binary with one SQLite database
15+
per gallery. Your files stay ordinary files on disk; removing monbooru
16+
leaves them exactly where they were.
17+
18+
monbooru itself never touches the internet. Online features
19+
(downloading from boorus, reverse image lookup) are handled by the
20+
optional [addons](addons/_index.md).
21+
22+
> **Local network only.** monbooru is designed for a trusted home
23+
> network or private VPN. It is not hardened for direct exposure to
24+
> the public internet. If you expose it anyway, the extra hardening
25+
> (TLS, access control...) is on you.
26+
27+
## What it does
28+
29+
- Tag-based gallery with a folder tree, favorites, saved searches,
30+
collections and rating tags with an SFW ceiling. See
31+
[Searching](guides/searching/index.md) and [Tags](guides/tags/index.md).
32+
- A file watcher picks up new, moved and deleted files within seconds,
33+
and new images land in an [inbox](guides/inbox/index.md) for review.
34+
- Reads Stable Diffusion metadata (A1111/Forge and ComfyUI): prompts,
35+
models, seeds, full workflows. See [AI metadata](guides/ai-metadata.md).
36+
- Local [auto-tagging](guides/auto-tagger.md) with ONNX models (WD14
37+
SwinV2, JoyTag, Camie v2) on CPU or GPU.
38+
- Images, video, animated GIFs, plus CBZ/ZIP archives browsed as one
39+
object with a built-in manga reader.
40+
- [Relations](guides/relations/index.md) between images: duplicates,
41+
alternates, version chains, derivatives, with near-duplicate
42+
detection and a side-by-side review session.
43+
- [Multiple galleries](guides/galleries/index.md) in one instance, each with
44+
its own files and database, plus export, import and
45+
[migration](guides/migrating.md) from Hydrus or Blombooru.
46+
- Reverse [lookup](guides/lookup/index.md) of your images against boorus,
47+
IQDB/SauceNAO and the Hydrus PTR, through a paired monloader.
48+
- A REST API with scoped tokens, covered in
49+
[Development](development.md).
50+
51+
## Where to go
52+
53+
- [Install](getting-started/install.md) gets it running with Docker in
54+
a few minutes; [First steps](getting-started/first-steps/index.md) walks
55+
the UI.
56+
- The [guides](guides/_index.md) cover each feature in day-to-day terms.
57+
- [Configuration](configuration.md) has the environment variables,
58+
theming and advanced tagger setup.
59+
60+
## Addons
61+
62+
monbooru works on its own, and nothing in it depends on the other apps
63+
being present. Two optional companions extend it:
64+
65+
- **[monloader](addons/monloader/_index.md)** adds the online half: it
66+
downloads posts from booru sites into your collection with their
67+
tags, and runs reverse lookups on images you already have to
68+
backfill tags and sources. monbooru stays offline; monloader connects to the internet.
69+
- **[monsender](addons/monsender/_index.md)** adds the browser shortcut: an
70+
extension that sends the page you are viewing, or images picked from
71+
it, straight to monloader's download queue. It needs monloader.
72+
73+
The [addons overview](addons/_index.md) explains how the pieces fit,
74+
and the [quick start](addons/quick-start.md) adds both to a running
75+
monbooru.

content/addons/_index.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Addons
3+
weight: 95
4+
---
5+
6+
monbooru is the main application: it owns your images and their tags, on your
7+
disk, in one SQLite file per gallery. By design it makes no network
8+
requests of its own, so your collection and your browsing stay
9+
entirely local. You can run it alone forever: nothing in monbooru
10+
depends on the other apps being present.
11+
12+
The addons exist so monbooru can stay offline while you still get
13+
online features. You add them when you want them:
14+
15+
**[monloader](monloader/_index.md)** connects to the internet on monbooru's behalf. When you want
16+
something from the web - download a post from a booru site, look up
17+
where an image came from, pull tags for a file you already have -
18+
monbooru asks monloader, and monloader does the online part. It
19+
downloads with gallery-dl, translates each site's metadata into
20+
monbooru's tags and ratings, and pushes the result into a gallery.
21+
Features in monbooru that need it (lookups, refreshing sources) stay
22+
hidden until a monloader is connected.
23+
24+
**[monsender](monsender/_index.md)** adds a send button to your
25+
browser, once monloader is in place. You are looking at a page; you
26+
press the toolbar button; the page lands in monloader's queue and,
27+
once downloaded and mapped, appears in monbooru with its tags.
28+
29+
In one line: monbooru holds, monloader loads, monsender sends.
30+
31+
The apps connect by [pairing](pairing.md): each link is approved once
32+
in the receiving app's settings, and the apps exchange scoped API
33+
tokens on their own. The [quick start](quick-start.md) walks through
34+
adding both addons to a running monbooru.

content/addons/monloader/_index.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: monloader
3+
weight: 30
4+
---
5+
6+
monloader is the downloader that feeds [monbooru](../../_index.md).
7+
Paste the URL of a booru post, a pool, a tag search, an artist page, or a
8+
direct image link; monloader fetches the files and their per-post metadata,
9+
maps that metadata onto monbooru's data model, and pushes each file into a
10+
monbooru gallery over its API.
11+
12+
![The monloader add page](add.png)
13+
14+
The actual scraping is done by
15+
[gallery-dl](https://github.com/mikf/gallery-dl), so any site gallery-dl
16+
supports works. monloader adds the download queue, the metadata mapping, and
17+
the push into monbooru, with curated profiles that sharpen the result for
18+
50-plus known sites.
19+
20+
It also runs in reverse: for a file monbooru already holds, monloader can
21+
find tags by file hash and by image similarity (IQDB, SauceNAO) across the
22+
boorus, and optionally from a local copy of the Hydrus Public Tag
23+
Repository, then fold them back into the image. See
24+
[reverse lookup](guides/lookup/index.md).
25+
26+
The two apps stay separate on purpose: monbooru holds your files and needs
27+
no internet access, while monloader has internet access but never touches
28+
the gallery files - everything flows through monbooru's API. monloader is
29+
intended for your local network; its UI is not designed to be exposed to the
30+
public internet.
31+
32+
- [Install](getting-started/install.md) - run it in Docker or Podman next to monbooru.
33+
- [Pairing](getting-started/pairing/index.md) - connect it to monbooru and to the monsender extension.
34+
- [Downloading](guides/downloading/index.md) - the queue, outcomes, retries, pools and manga.
35+
- [Sites and credentials](guides/sites/index.md) - site profiles, logins, cookies files.
36+
- [Metadata mapping](guides/mapping.md) - how tags, ratings, and sources land in monbooru.
37+
- [Reverse lookup](guides/lookup/index.md) - find tags for files you already have.
38+
- [Hydrus PTR](guides/ptr/index.md) - the optional offline tag database.
39+
- [Configuration](configuration.md) - the TOML file, environment variables, theming.
40+
- [API and development](development.md) - tokens, error codes, building from source.

content/addons/monloader/add.png

45.7 KB
Loading

0 commit comments

Comments
 (0)