summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.org>2020-05-25 12:29:38 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.org>2020-05-25 12:29:38 -0400
commita403cebd830d12b89376727d12ab9c679acb8db7 (patch)
tree0812c5e596e87a31255451e7669bf53a94df87b2
parent83b99f00dedae6c82100b6820b18e414fec2525e (diff)
Rebrand as бирка-тян.
-rw-r--r--Cargo.lock22
-rw-r--r--Cargo.toml2
-rw-r--r--README.md67
-rw-r--r--src/main.rs8
4 files changed, 82 insertions, 17 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 9aca2b6..f3bcb88 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -37,6 +37,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53d1ccbaf7d9ec9537465a97bf19edc1a4e158ecb49fc16178202238c569cc42"
[[package]]
+name = "birka"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "base64 0.12.1",
+ "blake2",
+ "dirs",
+ "rusqlite",
+]
+
+[[package]]
name = "bitflags"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -240,17 +251,6 @@ dependencies = [
]
[[package]]
-name = "roru"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "base64 0.12.1",
- "blake2",
- "dirs",
- "rusqlite",
-]
-
-[[package]]
name = "rusqlite"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index e939dda..0b4073b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "roru"
+name = "birka"
version = "0.1.0"
authors = ["Jakob L. Kreuze <zerodaysfordays@sdf.org>"]
edition = "2018"
diff --git a/README.md b/README.md
index f317ee6..6adbfe0 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,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.
diff --git a/src/main.rs b/src/main.rs
index a11d185..a061f5d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,19 +1,19 @@
// Copyright © 2020 Jakob L. Kreuze <zerodaysfordays@sdf.org>
//
-// This file is part of пометка.
+// This file is part of бирка-тян.
//
-// пометка is free software; you can redistribute it and/or modify it
+// бирка-тян is free software; you can redistribute it and/or modify it
// under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
-// пометка is distributed in the hope that it will be useful, but
+// бирка-тян is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public
-// License along with пометка. If not, see <http://www.gnu.org/licenses/>.
+// License along with бирка-тян. If not, see <http://www.gnu.org/licenses/>.
#[macro_use]
extern crate anyhow;