summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock38
-rw-r--r--Cargo.toml10
-rw-r--r--README.md42
-rw-r--r--src/database.rs20
-rw-r--r--src/kona-cli.rs (renamed from src/birka-cli.rs)22
-rw-r--r--src/kona-web.rs (renamed from src/birka-web.rs)22
-rw-r--r--templates/image.hbs4
-rw-r--r--templates/index.hbs4
-rw-r--r--templates/upload.hbs4
9 files changed, 82 insertions, 84 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 27a846a..7cb742b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -88,25 +88,6 @@ 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",
- "image",
- "rand 0.7.3",
- "rocket",
- "rocket-multipart-form-data",
- "rocket_contrib",
- "rusqlite",
- "serde",
- "serde_derive",
- "serde_json",
-]
-
-[[package]]
name = "bitflags"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -646,6 +627,25 @@ dependencies = [
]
[[package]]
+name = "kona"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "base64 0.12.1",
+ "blake2",
+ "dirs",
+ "image",
+ "rand 0.7.3",
+ "rocket",
+ "rocket-multipart-form-data",
+ "rocket_contrib",
+ "rusqlite",
+ "serde",
+ "serde_derive",
+ "serde_json",
+]
+
+[[package]]
name = "language-tags"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index a4a707f..143dca2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "birka"
+name = "kona"
version = "0.1.0"
authors = ["Jakob L. Kreuze <zerodaysfordays@sdf.org>"]
edition = "2018"
@@ -25,9 +25,9 @@ serde_json = "1.0"
serde_derive = "1.0"
[[bin]]
-name = "birka-cli"
-path = "src/birka-cli.rs"
+name = "kona-cli"
+path = "src/kona-cli.rs"
[[bin]]
-name = "birka-web"
-path = "src/birka-web.rs"
+name = "kona-web"
+path = "src/kona-web.rs"
diff --git a/README.md b/README.md
index 9d24c59..f756061 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,11 @@
-# бирка-тян: электронная доска объявлений
+# Kona: An Imageboard Engine
-_В вашем деле нет пометки об этом!_
-
-бирка-тян (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).
+Kona 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).
This is a _very_ early release. Perhaps pre-alpha, if there is no stage earlier
in the software release life cycle. Use at your own risk.
@@ -26,7 +24,7 @@ the general public.
### Command-Line
-There are two ways of interacting with бирка-тян: through the `birka-cli`
+There are two ways of interacting with бирка-тян: through the `kona-cli`
command-line tool (i), and through the web interface (ii).
The inclusion of (i) is in consideration for this being, essentially, a personal
@@ -40,26 +38,26 @@ 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
+$ kona-cli add Cat.jpeg animal cat cute
```
Ah, drat. We should have tagged that image with "photograph", too.
```sh
-$ birka-cli add_tags Cat.jpeg photograph
+$ kona-cli add_tags Cat.jpeg photograph
```
On second thought, that wasn't a particularly cute picture.
```sh
-$ birka-cli remove_tags Cat.jpeg cute
+$ kona-cli remove_tags Cat.jpeg cute
```
Now, let's see all of the photographs in the tag database tagged with
"photograph".
```sh
-$ birka-cli query photograph
+$ kona-cli query photograph
/home/jakob/Camera/Cat.jpeg
```
@@ -70,29 +68,29 @@ convenience, the 'query' command can be invoked without a query string, to list
all paths indexed by the database.
```sh
-$ birka-cli query
+$ kona-cli query
...
```
The tag database is stored in a file, and the path of that file is dependent on
how the program is invoked. If, when parsing the command-line arguments,
-`birka-cli` sees a `-o` or `--output` argument, the path following that argument
+`kona-cli` sees a `-o` or `--output` argument, the path following that argument
will be used. Alternatively, the `TB_PATH` environment variable can be
specified, but `-o` takes a higher precedence. If neither are specified,
-"birka.db" in the current directory is used.
+"kona.db" in the current directory is used.
A few other things that can be done from the command-line:
Removing an image can be done with 'remove'.
```sh
-$ birka-cli remove Cat.jpeg
+$ kona-cli remove Cat.jpeg
```
Getting the tags in the database:
```sh
-$ birka-cli tags
+$ kona-cli tags
...
```
@@ -152,7 +150,7 @@ POST /api/posts/[filename]
There are a few things I'd like to push off 'till later, since this is working
for me right now.
-- [birka-cli] Improve the `birka-cli add` interface, allowing multiple files to
+- [kona-cli] Improve the `kona-cli add` interface, allowing multiple files to
be indexed and tagged in the same invocation.
-- [birka-web js] Implement a dynamic "endless scroll" view.
-- [birka-web js] Implement a mass-tagger tool in the web interface.
+- [kona-web js] Implement a dynamic "endless scroll" view.
+- [kona-web js] Implement a mass-tagger tool in the web interface.
diff --git a/src/database.rs b/src/database.rs
index c7c84a0..0702ed9 100644
--- a/src/database.rs
+++ b/src/database.rs
@@ -1,19 +1,19 @@
// Copyright © 2020 Jakob L. Kreuze <zerodaysfordays@sdf.org>
//
-// This file is part of бирка-тян.
+// This file is part of Kona.
//
-// бирка-тян 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.
+// Kona 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
-// 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.
+// Kona 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 Kona. If not, see <http://www.gnu.org/licenses/>.
use anyhow::Result;
use rusqlite::Connection;
diff --git a/src/birka-cli.rs b/src/kona-cli.rs
index 4a8681f..04adfc8 100644
--- a/src/birka-cli.rs
+++ b/src/kona-cli.rs
@@ -1,19 +1,19 @@
// Copyright © 2020 Jakob L. Kreuze <zerodaysfordays@sdf.org>
//
-// This file is part of бирка-тян.
+// This file is part of Kona.
//
-// бирка-тян 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.
+// Kona 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
-// 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.
+// Kona 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 Kona. If not, see <http://www.gnu.org/licenses/>.
#[macro_use]
extern crate anyhow;
@@ -54,7 +54,7 @@ fn main() {
} else if let Ok(path) = std::env::var("TB_PATH") {
TagDatabase::new(path)
} else {
- TagDatabase::new("./birka.db")
+ TagDatabase::new("./kona.db")
}
.unwrap();
diff --git a/src/birka-web.rs b/src/kona-web.rs
index cd68923..2d63772 100644
--- a/src/birka-web.rs
+++ b/src/kona-web.rs
@@ -1,19 +1,19 @@
// Copyright © 2020 Jakob L. Kreuze <zerodaysfordays@sdf.org>
//
-// This file is part of бирка-тян.
+// This file is part of Kona.
//
-// бирка-тян 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.
+// Kona 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
-// 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.
+// Kona 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 Kona. If not, see <http://www.gnu.org/licenses/>.
#![feature(proc_macro_hygiene, decl_macro)]
@@ -70,7 +70,7 @@ impl DatabaseConnection {
let bin = std::env::current_exe()?.canonicalize()?;
let bin_dir = bin.parent().unwrap();
let file_dir = bin_dir.join("files/").to_str().unwrap().to_string();
- let tb = TagDatabase::new(&bin_dir.join("birka.db"))?;
+ let tb = TagDatabase::new(&bin_dir.join("kona.db"))?;
Ok(DatabaseConnection { tb, file_dir })
}
}
diff --git a/templates/image.hbs b/templates/image.hbs
index 7641820..2cb1708 100644
--- a/templates/image.hbs
+++ b/templates/image.hbs
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
<head>
- <title>бирка-тян - {{ orig_filename }}</title>
+ <title>Kona - {{ orig_filename }}</title>
<link rel="stylesheet" type="text/css" href="/public/css/style.css">
<meta charset="UTF-8">
</head>
<body>
<header>
- <h1><a href="/">бирка-тян</a></h1>
+ <h1><a href="/">Kona</a></h1>
</header>
<main>
<h2>{{ orig_filename }}</h2>
diff --git a/templates/index.hbs b/templates/index.hbs
index e481203..db2202d 100644
--- a/templates/index.hbs
+++ b/templates/index.hbs
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
<head>
- <title>бирка-тян</title>
+ <title>Kona</title>
<link rel="stylesheet" type="text/css" href="/public/css/style.css">
<meta charset="UTF-8">
</head>
<body>
<header>
- <h1><a href="/">бирка-тян</a></h1>
+ <h1><a href="/">Kona</a></h1>
</header>
<main>
{{#each images}}
diff --git a/templates/upload.hbs b/templates/upload.hbs
index ca57d4f..fa6dfb1 100644
--- a/templates/upload.hbs
+++ b/templates/upload.hbs
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
<head>
- <title>бирка-тян - Upload File</title>
+ <title>Kona - Upload File</title>
<link rel="stylesheet" type="text/css" href="/public/css/style.css">
<meta charset="UTF-8">
</head>
<body>
<header>
- <h1><a href="/">бирка-тян</a></h1>
+ <h1><a href="/">Kona</a></h1>
</header>
<main>
<h2>Upload a file</h2>