1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Generates static html view of a git directory.
What git-to-web is:
- a simple way for new people to have a look at the current state of your
project, so they can figure out what it is about and it's basic
source structure.
- a quick guide on how to contribute to your project
by listing:
- git urls
- a readme
- easy to setup, no database required,
you just need guile and some git hook configuration (see below)
What git-to-web is not:
- interactive
- a complete web interface for git and all it's commands
- a generator for persistent links to each revision of your project
- a generator for diffs of all your projects revisions
- a viewer for multiple branches
* How to use
Init example:
mkdir my-git-project
cd my-git-project
git init --bare
git clone . raw/
guile -L ~/git-to-web/ -e main -s ~/git-to-web/main.scm
#-> ./index.html
#-> ./html/file-in-repo.scm.html
#-> ./html/dir-in-repo/index.html
You can use the follwing hook/post-update script:
GIT_TO_WEB=~/git-to-web/
unset GIT_DIR
git update-server-info
cd raw; git pull -f origin master; cd ..
rm -r html/
guile -L "$GIT_TO_WEB" -e main -s "$GIT_TO_WEB/main.scm"
Of course you must replace ~/git-to-web/ with your installation path.
You can create a .sh file that automatically sets up a new git directory
with the hooks using the information above.
Settings files:
You can give a settings file with:
guile -L "." -e main -s "./main.scm" -s settings-example
And eval a scm file and use the result as settings with:
guile -L "." -e main -s "./main.scm" -e example-settings-eval
You can give -s and -e multiple times. Settings from the last file given will
outrule previous ones.
See example files: example-settings
example-settings-eval