sgw/README

1sgw - Static Git Webpage generator 2================================== 3sgw is a **python3** script to generate a set of static html pages for your git repo. 4It's modeled after Dave Gauer's wonderful reporat.rb script which is waaay cooler! 5 6sgw's output, 7- includes a bare repo and allows dumb http cloning 8- has an index page, a commits page, a file list page and each plain-text 9source file gets its own html file with line numbers. 10 11This script has **only** been tested on linux, so it may not work on other 12operating systems. 13 14The top of the script has variables that you can edit. 15 16Dependencies 17------------ 18the git binary to be in your $PATH 19 20Installation 21------------ 22$ ln -s sgw.py ~/bin/sgw 23$ mkdir -p /tmp/sgw/git-web 24 25How to use? 26----------- 27Assuming we have a project called spb. Here's how one would use the script. 28 29$ cd ~/Projects/spb 30$ sgw 31sgw.py is generating site for 32 spb 33 A simple pastebin for easy access from the terminal. 34 35f: .gitignore 36 plain-text - .gitignore 37f: config.js 38 plain-text - config.js 39f: db.js 40 plain-text - db.js 41-- 8< ------ 8< ------- 42site has been generated 43output: /tmp/sgw/git-web/spb 44$ 45 46Testing out the generated site 47------------------------------ 48$ cd /tmp/sgw 49$ python3 -m http.server 50 51Open http://localhost:8000/git-web/spb/ in a web browser. 52 53Clone the repo with 54 55$ git clone http://localhost:8000/git-web/spb/spb.git 56 57Thanks 58------ 59https://ratfactor.com/repos/reporat/ 60