summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.org>2020-06-14 18:56:22 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.org>2020-06-14 18:56:22 -0400
commit95742615ef31e7751663b0192a882fb7e5a9d718 (patch)
tree42cbddb2ed79f4f5b4ee7a8f167ae1aacf6ce08a /README.md
parent70f13d8277e71191b94443dde0758587e9e56115 (diff)
Don't expose image IDs through the CLI interface.
Diffstat (limited to 'README.md')
-rw-r--r--README.md34
1 files changed, 16 insertions, 18 deletions
diff --git a/README.md b/README.md
index 069f8d9..2476df6 100644
--- a/README.md
+++ b/README.md
@@ -26,18 +26,9 @@ 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-cli 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.
+Images are introduced to the database with the `add` command, which takes zero
+or more tags following the path of an image. The path is automatically
+canonicalized, so relative names are perfectly acceptable.
```sh
$ birka-cli add Cat.jpeg animal cat cute
@@ -46,13 +37,13 @@ $ birka-cli add Cat.jpeg animal cat cute
Ah, drat. We should have tagged that image with "photograph", too.
```sh
-$ birka-cli add_tags $(birka-cli id_for Cat.jpeg) photograph
+$ birka-cli add_tags Cat.jpeg photograph
```
On second thought, that wasn't a particularly cute picture.
```sh
-$ birka-cli remove_tags $(birka-cli id_for Cat.jpeg) cute
+$ birka-cli remove_tags Cat.jpeg cute
```
Now, let's see all of the photographs in the tag database tagged with
@@ -60,12 +51,19 @@ Now, let's see all of the photographs in the tag database tagged with
```sh
$ birka-cli query photograph
-1,Kww+tPLv/BsbU7M7qqW59ph54v6CSEiUPNpW4XbA0cpoyrrAZsAmT5Ptm30M+hATM71mimoo7PTaS8DEAq57cQ==,/home/jakob/Camera/Cat.jpeg
+/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.
+The `query` command outputs a line-separated list of paths to any images
+satisfying the query string. The semantics are similar to that of Danbooru,
+except that the logical disjunction operator ('~') is unsupported. As a
+convenience, the 'query' command can be invoked without a query string, to list
+all paths indexed by the database.
+
+```sh
+$ birka-cli query
+...
+```
### Web-Interface (API)