Static Git Webpage generator
git clone https://www.aktsbot.in/git-web/sgw/sgw.git
sgw - Static Git Webpage generator
==================================
sgw is a **python3** script to generate a set of static html pages for your git repo.
It's modeled after Dave Gauer's wonderful reporat.rb script which is waaay cooler!
sgw's output,
- includes a bare repo and allows dumb http cloning
- has an index page, a commits page, a file list page and each plain-text
source file gets its own html file with line numbers.
This script has **only** been tested on linux, so it may not work on other
operating systems.
The top of the script has variables that you can edit.
Dependencies
------------
the git binary to be in your $PATH
Installation
------------
$ ln -s sgw.py ~/bin/sgw
$ mkdir -p /tmp/sgw/git-web
How to use?
-----------
Assuming we have a project called spb. Here's how one would use the script.
$ cd ~/Projects/spb
$ sgw
sgw.py is generating site for
spb
A simple pastebin for easy access from the terminal.
f: .gitignore
plain-text - .gitignore
f: config.js
plain-text - config.js
f: db.js
plain-text - db.js
-- 8< ------ 8< -------
site has been generated
output: /tmp/sgw/git-web/spb
$
Testing out the generated site
------------------------------
$ cd /tmp/sgw
$ python3 -m http.server
Open http://localhost:8000/git-web/spb/ in a web browser.
Clone the repo with
$ git clone http://localhost:8000/git-web/spb/spb.git
Thanks
------
https://ratfactor.com/repos/reporat/