summaryrefslogtreecommitdiff
path: root/README.md
blob: 6adbfe0282b45100c960c89e83589abfee3c5f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# бирка-тян: электронная доска объявлений

_В вашем деле нет пометки об этом!_

бирка-тян (birka-tyan) is a lightweight Danbooru-style imageboard engine for the
purposes of self-hosting a tagged image gallery. It lacks many of the features
one would expect of such an application (particularly use rauthentication), so
if you have a use case other than being able to search through your pictures
when you are not at home, you would be better off looking at an established
solution such as [Danbooru](https://github.com/danbooru/danbooru).

## Features

- A command-line tool for interacting with the tag database.

## Usage

There are two ways of interacting with бирка-тян: through the `birka`
command-line tool (i), and through the web interface (ii).

The inclusion of (i) is in consideration for this being, essentially, a personal
image gallery. One likely has a loosely-organized collection of images already;
the command-line tool enables her to import images en masse with the full
capabilities of the Unix shell at her fingertips. A brief summary of the
command-line interface follows.

In бирка-тян's tag database, every image is identified by a signed 64-bit
integer. The command-line tool operates on these internal identifiers, so it is
often helpful to obtain the identifier for an image in the filesystem.

```sh
$ birka id_for Cat.jpeg
2
```

But, of course, the tag database must be populated with this "Cat.jpeg" before
this command is to work. Images are introduced to the database with the `add`
command, which takes zero or more tags.

```sh
$ birka add Cat.jpeg animal cat cute
```

Ah, drat. We should have tagged that image with "photograph", too.

```sh
$ birka add_tags $(birka id_for Cat.jpeg) photograph
```

On second thought, that wasn't a particularly cute picture.

```sh
$ birka remove_tags $(birka id_for Cat.jpeg) cute
```

Now, let's see all of the photographs in the tag database tagged with
"photograph".

```sh
$ birka query photograph
1,Kww+tPLv/BsbU7M7qqW59ph54v6CSEiUPNpW4XbA0cpoyrrAZsAmT5Ptm30M+hATM71mimoo7PTaS8DEAq57cQ==,/home/jakob/Camera/Cat.jpeg
```

The `query` command outputs CSV; the first field is the internal identifier you
would see from `id_for`, the second is a base64-encoded BLAKE2b hash for the
image, and the third is the absolute path of the image.