home
readme
diff
tree
note
docs
0commit e44768b35187692b9803cc250afcd4c651854907
1Author: Mason Wright <mason@lakefox.net>
2Date: Wed Nov 26 20:14:25 2025 -0700
3
4 Swapped to git.ws
5
6diff --git a/README.txt b/README.txt
7index 29fb45f..637e4a4 100644
8--- a/README.txt
9+++ b/README.txt
10@@ -1,13 +1,31 @@
11-Decode
12+git.ws
13
14 This is the git repo for this website. It includes the git.awk and the mailto.awk files.
15-They are very easy to setup if you are using pighttpd or apache.
16+They are very easy to setup if you are using lighttpd or apache.
17
18 Git
19 ---------------------------------------
20
21 Add all git repos to /var/git
22
23+Lighttpd Setup
24+-------------------
25+Setup git http backend like this:
26+alias.url += ( "/repo" => "/usr/lib/git-core/git-http-backend" )
27+ $HTTP["url"] =~ "^/repo" {
28+ cgi.assign = ("" => "")
29+ setenv.add-environment = (
30+ "GIT_PROJECT_ROOT" => "/var/git",
31+ "GIT_HTTP_EXPORT_ALL" => ""
32+ )
33+ }
34+
35+If you want to have a wildcard DNS record that redirects all subdomains to the correct git
36+repo README page add this:
37+$HTTP["host"] =~ "^([^.]+)\.git\.ws$" {
38+ url.redirect = ( "^/(.*)" => "http://git.ws/cgi-bin/git.awk?name=%1&action=readme" )
39+}
40+
41 Mailto
42 --------------------------------------
43
44diff --git a/cgi-bin/git.awk b/cgi-bin/git.awk
45index e769cd4..09edefc 100755
46--- a/cgi-bin/git.awk
47+++ b/cgi-bin/git.awk
48@@ -39,11 +39,9 @@ BEGIN {
49 print "<a href='?name=" name "&hash=" hash "&action=readme'>readme</a>"
50 print "<a href='?name=" name "&hash=" hash "&action=diff'>diff</a>"
51 print "<a href='?name=" name "&hash=" hash "&action=tree'>tree</a>"
52+ print "<a href='?name=" name "&hash=" hash "&action=notes'>note</a>"
53 }
54
55- print "<a href='" clone "'>Clone</a>"
56-
57-
58 if (action == "") {
59 if (name == "all") {
60 cmd = "ls /var/git/"
61@@ -94,7 +92,7 @@ BEGIN {
62 cmd = "git --git-dir=/var/git/" name ".git/ show " hash
63 print "<pre><code>"
64 while (cmd | getline line) {
65- print line
66+ print escape_html(line)
67 }
68 close(cmd)
69 print "</code></pre>"
70@@ -110,14 +108,20 @@ BEGIN {
71 cmd = "git --git-dir=/var/git/" name ".git show " hash ":" fn
72 print "<pre><code>"
73 while ((cmd | getline line) > 0) {
74- gsub(/&/,"\\&", line)
75- gsub(/</,"\\<", line)
76- gsub(/>/,"\\>", line)
77- print line
78+ print escape_html(line)
79 }
80 close(cmd)
81 print "</code></pre>"
82- }
83+ } else if (action == "notes") {
84+ cmd = "git --git-dir=/var/git/" name ".git/ notes show " hash
85+
86+ print "<pre><code>"
87+ while (cmd | getline line) {
88+ print escape_html(line)
89+ }
90+ close(cmd)
91+ print "</code></pre>"
92+ }
93
94 print "</body>"
95 print "</html>"
96diff --git a/index.html b/index.html
97index 342bc36..f16df0c 100644
98--- a/index.html
99+++ b/index.html
100@@ -2,7 +2,7 @@
101 <html>
102 <head>
103 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
104- <title>DECODE</title>
105+ <title>git.ws</title>
106 <meta name="viewport" content="width=device-width, initial-scale=1">
107 <style>
108 table,
109@@ -16,10 +16,10 @@
110 </style>
111 </head>
112 <body style="max-width: 900px;">
113- <h1>DECODE</h1>
114- <a href="irc.decode.sh">#IRC</a> <a href="/cgi-bin/mailto.awk">Mailing Lists</a> <a href="/cgi-bin/git.awk">Git</a>
115+ <h1>git.ws</h1>
116+ <a href="/cgi-bin/mailto.awk">Mailing Lists</a> <a href="/cgi-bin/git.awk">Git</a>
117 <p>
118- Decode is a project sharing website.
119+ git.ws is a project sharing website.
120 </p>
121
122 <h2>Projects</h2>
123@@ -34,21 +34,22 @@
124 </thead>
125 <tbody>
126 <tr>
127- <td><a href="/cgi-bin/git.awk?name=grim&action=readme">grim/</a></td>
128+ <td><a href="http://grim.git.ws/">grim/</a></td>
129 <td>HTML/CSS renderer with a C++ DOM API</td>
130- <td><a href="irc.decode.sh/#grim">#grim</a></td>
131- <td><a href="http://decode.sh/git/grim.git">http://decode.sh/git/grim.git</a></td>
132+ <td><a target="_blank" href="https://web.libera.chat/gamja/?autojoin=#grim">#grim</a></td>
133+ <td><a href="http://git.ws/repo/grim.git">http://git.ws/repo/grim.git</a></td>
134 </tr>
135 <tr>
136- <td><a href="/cgi-bin/git.awk?name=decode&action=readme">decode/</a></td>
137- <td>All the scripts that run decode.sh (mailto.awk/git.awk)</td>
138- <td><a href="irc.decode.sh/#decode">#decode</a></td>
139- <td></td>
140+ <td><a href="http://gitws.git.ws/">git.ws/</a></td>
141+ <td>All the scripts that run git.ws (mailto.awk/git.awk)</td>
142+ <td><a target="_blank" href="https://web.libera.chat/gamja/?autojoin=#gitws">#gitws</a></td>
143+ <td><a href="http://git.ws/repo/gitws.git">http://git.ws/repo/gitws.git</a></td>
144 </tr>
145 </tbody>
146 </table>
147 <hr>
148 <p>This site is HTML 2.0 compliant.</p>
149- <a href="http://validator.w3.org/check?uri=decode.sh"><img src="valid-html20.png" alt="Valid HTML 2.0"></a>
150- </body>
151+ <a href="http://validator.w3.org/check?uri=git.ws"><img src="valid-html20.png" alt="Valid HTML 2.0"></a>
152+ <img src="solar-button.gif" alt="This site is ran on 100% solar power.">
153+ </body>
154 </html>
155diff --git a/solar-button.gif b/solar-button.gif
156new file mode 100644
157index 0000000..66d2dfc
158Binary files /dev/null and b/solar-button.gif differ