Merge branch 'master' into process_markdown_in_sqlite
This commit is contained in:
commit
a582d3a627
9 changed files with 593 additions and 321 deletions
|
@ -14,8 +14,8 @@ before_install:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- rustup target add x86_64-unknown-linux-musl
|
- rustup target add x86_64-unknown-linux-musl
|
||||||
|
- cargo test --target=x86_64-unknown-linux-musl
|
||||||
- cargo build --release --target=x86_64-unknown-linux-musl
|
- cargo build --release --target=x86_64-unknown-linux-musl
|
||||||
- cargo test --release --target=x86_64-unknown-linux-musl
|
|
||||||
- strip -s target/x86_64-unknown-linux-musl/release/sausagewiki
|
- strip -s target/x86_64-unknown-linux-musl/release/sausagewiki
|
||||||
- XZ_OPT=-9 tar Jcf sausagewiki.tar.xz -C target/x86_64-unknown-linux-musl/release/ sausagewiki
|
- XZ_OPT=-9 tar Jcf sausagewiki.tar.xz -C target/x86_64-unknown-linux-musl/release/ sausagewiki
|
||||||
|
|
||||||
|
|
4
CONTRIBUTING.md
Normal file
4
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Thank you for your interest in contributing to Sausagewiki!
|
||||||
|
|
||||||
|
The high level design of Sausagewiki is described in [DESIGN.md](DESIGN.md).
|
||||||
|
Please consider your contribution in light of this document.
|
821
Cargo.lock
generated
821
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
27
Cargo.toml
27
Cargo.toml
|
@ -16,21 +16,21 @@ matches = "0.1"
|
||||||
bart = "0.1.4"
|
bart = "0.1.4"
|
||||||
bart_derive = "0.1.4"
|
bart_derive = "0.1.4"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
clap = "2.26"
|
clap = "2.31"
|
||||||
diff = "0.1.10"
|
diff = "0.1"
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
futures-cpupool = "0.1"
|
futures-cpupool = "0.1"
|
||||||
hyper = "0.11"
|
hyper = "0.11"
|
||||||
lazy_static = "0.2"
|
lazy_static = "0.2"
|
||||||
maplit = "1"
|
maplit = "1"
|
||||||
percent-encoding = "1.0.0"
|
percent-encoding = "1.0"
|
||||||
r2d2 = "0.8"
|
r2d2 = "0.8"
|
||||||
r2d2-diesel = "1.0.0"
|
r2d2-diesel = "1.0.0"
|
||||||
regex = "0.2"
|
regex = "0.2"
|
||||||
serde = "1.0.0"
|
serde = "1.0.0"
|
||||||
serde_derive = "1.0.0"
|
serde_derive = "1.0.0"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde_urlencoded = "0.5.0"
|
serde_urlencoded = "0.5"
|
||||||
slug = "0.1"
|
slug = "0.1"
|
||||||
titlecase = "0.10"
|
titlecase = "0.10"
|
||||||
tokio-io = "0.1"
|
tokio-io = "0.1"
|
||||||
|
@ -39,22 +39,22 @@ tokio-service = "0.1"
|
||||||
|
|
||||||
[dependencies.libsqlite3-sys]
|
[dependencies.libsqlite3-sys]
|
||||||
features = ["bundled"]
|
features = ["bundled"]
|
||||||
version = "0.9"
|
version = "0.9.1"
|
||||||
|
|
||||||
[dependencies.diesel]
|
[dependencies.diesel]
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["sqlite", "chrono"]
|
features = ["sqlite", "chrono"]
|
||||||
version = "1.0.0"
|
version = "1.3.0"
|
||||||
|
|
||||||
[dependencies.diesel_migrations]
|
[dependencies.diesel_migrations]
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["sqlite"]
|
features = ["sqlite"]
|
||||||
version = "1.0.0"
|
version = "1.3.0"
|
||||||
|
|
||||||
[dependencies.diesel_infer_schema]
|
[dependencies.diesel_infer_schema]
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["sqlite"]
|
features = ["sqlite"]
|
||||||
version = "1.0.0"
|
version = "1.3.0"
|
||||||
|
|
||||||
[dependencies.num]
|
[dependencies.num]
|
||||||
default-features = false
|
default-features = false
|
||||||
|
@ -74,18 +74,11 @@ walkdir = "1"
|
||||||
[build-dependencies.diesel]
|
[build-dependencies.diesel]
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["sqlite", "chrono"]
|
features = ["sqlite", "chrono"]
|
||||||
version = "1.0.0"
|
version = "1.3.0"
|
||||||
|
|
||||||
[build-dependencies.diesel_migrations]
|
[build-dependencies.diesel_migrations]
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["sqlite"]
|
features = ["sqlite"]
|
||||||
version = "1.0.0"
|
version = "1.3.0"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
diesel = { git = 'https://github.com/maghoff/diesel', branch = 'sqlite_custom_function' }
|
|
||||||
diesel_migrations = { git = 'https://github.com/maghoff/diesel', branch = 'sqlite_custom_function' }
|
|
||||||
diesel_infer_schema = { git = 'https://github.com/maghoff/diesel', branch = 'sqlite_custom_function' }
|
|
||||||
infer_schema_macros = { git = 'https://github.com/maghoff/diesel', branch = 'sqlite_custom_function' }
|
|
||||||
migrations_internals = { git = 'https://github.com/maghoff/diesel', branch = 'sqlite_custom_function' }
|
|
||||||
|
|
42
DESIGN.md
Normal file
42
DESIGN.md
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
Sausagewiki is a simple, self-contained wiki engine. This is not merely a
|
||||||
|
description, but in fact design goals. Let's look closer at them.
|
||||||
|
|
||||||
|
Sausagewiki is simple
|
||||||
|
=====================
|
||||||
|
Sausagewiki is somewhat feature sparse. Of course, implementing features takes
|
||||||
|
time and effort, but that is not all. Sausagewiki attempts to attain
|
||||||
|
simplicity in part by being very restrictive with which features to add. Which
|
||||||
|
features belong in Sausagewiki? That is hard to pin down. There are many
|
||||||
|
features that could be included in a simple wiki engine, but it is probably
|
||||||
|
true that including _all_ those features would make the engine no longer
|
||||||
|
simple. Because of this, Sausagewiki is extremely restrictive with which
|
||||||
|
features to add.
|
||||||
|
|
||||||
|
Sausagewiki is simple to use. The user interface is clean and simple. The wiki
|
||||||
|
language is small and easy to fully grasp. For example: In order to keep the
|
||||||
|
wiki syntax small and easy, the inline HTML feature of Markdown has been
|
||||||
|
excluded. It would make the wiki syntax too large.
|
||||||
|
|
||||||
|
The executable has few command line options. It is easy for the system
|
||||||
|
administrator to get up and running correctly. As a user you can also be sure
|
||||||
|
that Sausagewiki is the same when using it in different places.
|
||||||
|
|
||||||
|
Sausagewiki is self-contained
|
||||||
|
=============================
|
||||||
|
The binary does not have runtime dependencies. It does not dynamically link
|
||||||
|
with any library. (This is true for Linux. For other systems it needs to link
|
||||||
|
to the C standard library) It does not require any other program during
|
||||||
|
run time, and it does not require any resource file external to the
|
||||||
|
Sausagewiki binary.
|
||||||
|
|
||||||
|
Sausagewiki has no configuration file. This is sensible only as long as it
|
||||||
|
also has very few command line options.
|
||||||
|
|
||||||
|
The data for a given wiki instance is contained in one file only. This makes
|
||||||
|
a wiki instance easy to back up, copy and move.
|
||||||
|
|
||||||
|
Sausagewiki is a wiki engine
|
||||||
|
============================
|
||||||
|
The user experience is geared towards collaborative editing rather than a
|
||||||
|
division between editors and readers. Sausagewiki aims for a low barrier to
|
||||||
|
entry; new readers should feel invited to edit the text if appropriate.
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#[macro_use] extern crate bart_derive;
|
#[macro_use] extern crate bart_derive;
|
||||||
#[macro_use] extern crate codegen;
|
#[macro_use] extern crate codegen;
|
||||||
#[macro_use] extern crate diesel_infer_schema;
|
#[macro_use] #[allow(deprecated)] extern crate diesel_infer_schema;
|
||||||
#[macro_use] extern crate diesel_migrations;
|
#[macro_use] extern crate diesel_migrations;
|
||||||
#[macro_use] extern crate diesel;
|
#[macro_use] extern crate diesel;
|
||||||
#[macro_use] extern crate hyper;
|
#[macro_use] extern crate hyper;
|
||||||
|
|
12
src/main.rs
12
src/main.rs
|
@ -49,7 +49,7 @@ fn args<'a>() -> clap::ArgMatches<'a> {
|
||||||
.get_matches()
|
.get_matches()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn core_main() -> Result<(), Box<std::error::Error>> {
|
fn main() -> Result<(), Box<std::error::Error>> {
|
||||||
let args = args();
|
let args = args();
|
||||||
|
|
||||||
const CLAP: &str = "Guaranteed by clap";
|
const CLAP: &str = "Guaranteed by clap";
|
||||||
|
@ -67,13 +67,3 @@ fn core_main() -> Result<(), Box<std::error::Error>> {
|
||||||
trust_identity,
|
trust_identity,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
|
||||||
match core_main() {
|
|
||||||
Ok(()) => (),
|
|
||||||
Err(err) => {
|
|
||||||
eprintln!("{:#?}", err);
|
|
||||||
std::process::exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ impl<'a> SyncState<'a> {
|
||||||
Ok(article_revisions::table
|
Ok(article_revisions::table
|
||||||
.filter(article_revisions::article_id.eq(article_id))
|
.filter(article_revisions::article_id.eq(article_id))
|
||||||
.filter(article_revisions::latest.eq(true))
|
.filter(article_revisions::latest.eq(true))
|
||||||
.select((article_revisions::slug))
|
.select(article_revisions::slug)
|
||||||
.first::<String>(self.db_connection)
|
.first::<String>(self.db_connection)
|
||||||
.optional()?)
|
.optional()?)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>{{title}}</title>
|
<title>{{title}}</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
{{#base}}<base href="{{.}}">{{/base}}
|
{{#base}}<base href="{{.}}">{{/base}}
|
||||||
<link rel=preload href="_assets/amatic-sc-v9-latin-regular.woff" as=font crossorigin>
|
<link rel=preload href="_assets/amatic-sc-v9-latin-regular.woff" as=font type="font/woff" crossorigin=anonymous>
|
||||||
<link href="_assets/style-{{style_css_checksum()}}.css" rel="stylesheet">
|
<link href="_assets/style-{{style_css_checksum()}}.css" rel="stylesheet">
|
||||||
<meta name="generator" content="{{project_name()}} {{version()}}" />
|
<meta name="generator" content="{{project_name()}} {{version()}}" />
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue