🏡 index : ~doyle/rgit.git

author Jordan Doyle <jordan@doyle.la> 2022-07-23 23:34:29.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2022-07-23 23:34:29.0 +01:00:00
commit
815178015856e451808c299df23fb2ad615fb2c6 [patch]
tree
91c722e7ce53c7fcfbd0a47c51eb4624c91889d2
parent
a082415e9c9960483e78096f8bb67934ecd459d7
download
815178015856e451808c299df23fb2ad615fb2c6.tar.gz

Update README



Diff

 README.md   | 43 ++++++++++++++++++++++++++++++++++++++++++-
 src/main.rs |  5 +++++
 2 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 801462c..9225074 100644
--- a/README.md
+++ a/README.md
@@ -1,4 +1,43 @@
# rgit

A gitweb/cgit-like interface for the modern age. Written in Rust using Axum, git2 and
Askama. No more CGI, how exciting.
[See it in action!](https://git.inept.dev/)

A gitweb/cgit-like interface for the modern age. Written in Rust using Axum, git2, Askama and Sled.

Sled is used to store all metadata about a repository including commits, branches, tags. Metadata
will be reindexed every 5 minutes outside of the request path. This leads to up to 97% faster load
times for large repositories.

Files, trees & diffs will be loaded using git2 directly upon request, a small in-memory cache is
included for rendered READMEs and diffs.

Includes a dark mode for late night committing.

Usage:

```

rgit 0.1.0

USAGE:
    rgit --db-store <DB_STORE> <BIND_ADDRESS> <SCAN_PATH>


ARGS:
    <BIND_ADDRESS>

            The socket address to bind to (eg. 0.0.0.0:3333)


    <SCAN_PATH>

            The path in which your bare Git repositories reside (will be scanned recursively)


OPTIONS:
    -d, --db-store <DB_STORE>

            Path to a directory in which the Sled database should be stored, will be created if it

            doesn't already exist


            The Sled database is very quick to generate, so this can be pointed to temporary storage


    -h, --help

            Print help information


    -V, --version

            Print version information

```

diff --git a/src/main.rs b/src/main.rs
index 0de1a0a..bd0d3d7 100644
--- a/src/main.rs
+++ a/src/main.rs
@@ -34,9 +34,14 @@
#[derive(Parser, Debug)]
#[clap(author, version, about)]
pub struct Args {
    /// Path to a directory in which the Sled database should be stored, will be created if it doesn't already exist

    ///

    /// The Sled database is very quick to generate, so this can be pointed to temporary storage

    #[clap(short, long, value_parser)]
    db_store: PathBuf,
    /// The socket address to bind to (eg. 0.0.0.0:3333)

    bind_address: SocketAddr,
    /// The path in which your bare Git repositories reside (will be scanned recursively)

    scan_path: PathBuf,
}