thewhodidthis / gtx

Go git to HTML generator

Home Page:https://thewhodidthis.github.io/gtx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about

Go based git2html remake with custom templating support to help when using git(1) as an archival tool basically. Because an HTML copy of your commit history is just enough in many cases, such as if aiming to simply publish solo projects for example.

setup

Download from GitHub directly:

go install github.com/thewhodidthis/gtx

usage

What flags and options are available?

$ gtx --help
usage: gtx [<options>] <path>
  -b value
    	Target branches
  -f	Force rebuild
  -n string
    	Project title (default "Jimbo")
  -q	Be quiet
  -s string
    	Source repository
  -t string
    	Page template
  -u string
    	Source URL (default "https://host.net/project.git")

Calling without any arguments prints out the default settings. At the very least pass it a repo to be parsing through:

# NOTE: Will save output in the current directory.
gtx -r https://github.com/thewhodidthis/gtx.git

Silence the logger:

gtx -r https://github.com/thewhodidthis/gtx.git -q

Templates can reference external files in the target directory. These are left intact across script runs making it easier to theme the output by linking in stylesheets and other assets as required. Use the -t flag to specify a custom template:

gtx -r https://github.com/thewhodidthis/gtx.git -t page.html.tmpl

Export a copy of the default HTML page template and quit:

gtx -r https://github.com/thewhodidthis/gtx.git -e

Only process select branches in order of appearance:

gtx -r https://github.com/thewhodidthis/gtx.git -b main -b develop

requirements

  • git(1)

see also

About

Go git to HTML generator

https://thewhodidthis.github.io/gtx/

License:GNU Affero General Public License v3.0


Languages

Language:Go 100.0%