gout

A static git page generator
git clone https://git.bracken.jp/gout.git
Log | Files | Refs | README | LICENSE

README.md (2259B)


      1 gout
      2 ====
      3 
      4 `gout` is a static git repository builder designed to be output-compatible with
      5 the excellent `stagit` tool, but adds support for multiple output formats in the
      6 same binary: html (-H) and gopher (-G).
      7 
      8 Early support for Gemini is available on the `gemini` branch.
      9 
     10 Prerequisites
     11 -------------
     12 
     13 To build, the following tooling must be installed on the system:
     14 * [gn](https://gn.googlesource.com/gn)
     15 * [ninja](https://github.com/ninja-build/ninja)
     16 * A [clang](http://clang.llvm.org) toolchain
     17 
     18 To build and run, the following libraries must be installed on the system:
     19 * [libgit2](https://libgit2.org)
     20 
     21 
     22 Building and running
     23 --------------------
     24 
     25 First, edit `.gn` as necessary to set the `system_include_dirs` and
     26 `system_lib_dirs` for your system.
     27 
     28 Next, generate the ninja build files under the `out` directory:
     29 
     30     gn gen --args=is_debug=true out/debug
     31     gn gen --args=is_debug=false out/release
     32 
     33 
     34 ### Unit tests
     35 
     36 To build and run the unit tests, run:
     37 
     38     gn gen --args=is_debug=true out/debug
     39     ninja -C out/debug :gout_tests
     40     ./out/debug/gout_tests
     41 
     42 or
     43 
     44     make test
     45 
     46 
     47 ### Executable release-mode binary
     48 
     49 To build and run the binary:
     50 
     51     gn gen --args=is_debug=false out/release
     52     ninja -C out/release :gout :gout_index
     53     ./out/release/gout
     54     ./out/release/gout_index
     55 
     56 or
     57 
     58     make release
     59     ./out/release/gout
     60     ./out/release/gout_index
     61 
     62 
     63 Background
     64 ----------
     65 
     66 `gout` started as a set of small refactorings of `stagit` written primarily to
     67 separate git logic from formatting logic in order to experiment with merging
     68 gopher support into the same tool, and eventually add gemini support. Things got
     69 a bit out of hand and I'm embarrassed to say the code now reads a bit more like
     70 Enterprise Stagit.
     71 
     72 In my defence, the final compiled binary size is still small; under 60 kB on
     73 FreeBSD. It would be worthwhile trying to simplify the code a bit, now that
     74 things are separated out and the formatters are now effectively pluggable.
     75 
     76 
     77 Patches welcome
     78 ---------------
     79 
     80 Patches are more than welcome via [`git send-email`](https://git-send-email.io):
     81 ```
     82  $ git config sendemail.to "Chris Bracken <chris@bracken.jp>"
     83  $ git send-email ...
     84 ```
     85 or alternatively, generate the patches via `git format-patch` and email them
     86 manually.