~neon/activity-graph

7348511a68f9236fe8f9715f426f77ebac67ef76 — Jens Pitkanen 2 years ago 3cd084a
Update readme
1 files changed, 83 insertions(+), 7 deletions(-)

M README.md
M README.md => README.md +83 -7
@@ 10,13 10,14 @@ This program has 3 general use-cases:
   activity-graph -r <dir-with-your-repos> -s
   ```

2. Generating a html file to be looked at / served via a file server.
2. Generating a html file (and, optionally, a css file instead of a
   `<style>`) to be looked at / served via a file server.

   ```
   activity-graph -r <dir-with-your-repos> -o test.html [-c test.css]
   ```

3. Serving the generated html and css straight from ram via
3. Serving the generated html and css straight from memory via
   [`hyper`][hyper]:

   ```


@@ 30,16 31,91 @@ This program has 3 general use-cases:
  ~4x speedup on my system.

- `server` is *disabled* by default, and can be enabled to allow for
  running with the `--server` flag. This causes the program to stay
  alive until manual termination (Ctrl+C), serving the generated HTML
  on a configurable port and address (`--host`). The responses are
  always from a fast cache, and hits to the cache will cause the html
  to be regenerated depending on the `--cache-lifetime` parameter.
  the third described usecase, via the `server` subcommand. This
  causes the program to stay alive until manual termination (Ctrl+C),
  serving the generated HTML on a configurable port and address
  (`--host`). The responses are always from a fast cache, and hits to
  the cache will cause the html to be regenerated depending on the
  `--cache-lifetime` parameter.

## License
I recommend writing your own, it's a fun little project. But even
though I would not recommend using this code, you may use it under the
terms of the [GNU GPLv3 license][license].

## Usage

You could just use the `--help` flag, but here you go.

```
activity-graph 0.1.0
Jens Pitkanen <jens@neon.moe>
Generates a visualization of your commit activity in a set of git repositories.

USAGE:
    activity-graph.exe [FLAGS] [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -s, --stdout     Prints a visualization into stdout
    -V, --version    Prints version information
    -v, --verbose    Prints verbose information

OPTIONS:
    -a, --author <author>                      Regex that matches the author(s) whose commits are being counted (if not
                                               set, all commits will be accounted for)
    -d, --depth <depth>                        How many subdirectories deep the program should search (if not set, there
                                               is no limit)
        --external-css <external-css>          A css file that will be pasted at the end of the css
        --external-footer <external-footer>    A html file that will be pasted at the end of the <body> element
        --external-head <external-head>        A html file that will be pasted in the <head> element
        --external-header <external-header>    A html file that will be pasted at the beginning of the <body> element
    -r, --repos <repos>...                     Path(s) to the directory (or directories) containing the repositories you
                                               want to include

SUBCOMMANDS:
    generate    Output the generated html into a file
    help        Prints this message or the help of the given subcommand(s)
    server      Run a server that serves the generated activity graph html
```

The `generate` command:

```
activity-graph-generate 0.1.0
Output the generated html into a file

USAGE:
    activity-graph.exe generate [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --css <css>      The file that the stylesheet will be printed out to (if not set, it will be included in the
                         html inside a style-element)
    -o, --html <html>    The file that the resulting html will be printed out to [default: activity-graph.html]
```

The `server` command:

```
activity-graph-server 0.1.0
Run a server that serves the generated activity graph html

USAGE:
    activity-graph.exe server [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --cache-lifetime <cache-lifetime>    The minimum amount of seconds between regenerating the html and css
                                             [default: 1]
        --host <host>                        The address that the server is hosted on [default: 127.0.0.1:80]
```

[hyper]: https://crates.io/crates/hyper "A fast HTTP 1/2 server written in Rust"
[license]: LICENSE.md "The GNU GPLv3 license text in Markdown."