gmnigit

command module
v0.0.0-...-b266bf6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 18 Imported by: 0

README

gmnigit

Static git gemini viewer written in golang. Inspired by stagit.

This repository is available at sourcehut and gemini.

Installation

Unfortunately because of replace directive in go.mod you cannot simply get binary by running go get but you can install it by running

git clone https://git.sr.ht/~kornellapacz/gmnigit
cd gmnigit
task build # or: `go build -o gmnigit`

place gmnigit binary somewhere in your $PATH.

Usage

Usage of gmnigit:
  -dist string
        destination path (if exists will be overwritten)
  -max-commits int
        Max number of commit to export, -1 to export all (default -1)
  -name string
        project name, mandatory if generating the tags page
  -perms
        show files permissions in browsable tree
  -refs
        generate the tags page
  -repo string
        path to repository
  -url string
        clone URL for end user (optional)

Example

gmnigit -repo path/do/repo -dist dist/path

Tips

You can automate building pages on push with git post-receive hook

#!/bin/sh

while read -r _ _ ref; do
	[ "$ref" != "refs/heads/master" ] && continue

	gmnigit --repo . --dist /dest/dir
done

TODO

  • use git2go instead of go-git
  • handle submodules
  • read description and url files from git bare repositories

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL