-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
319 lines (261 loc) · 9.48 KB
/
index.html
File metadata and controls
319 lines (261 loc) · 9.48 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Postsai - The Commit Database</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html, body {
margin: 0;
padding: 0;
font-family: sans-serif;
background-color: #EEE;
}
header {
background-color: #003;
color: #FFF;
padding: 3em 0em;
box-shadow: 0px 3px 3px 0px #333;
}
a.button {
margin-top: 2em;
margin-right: 1em;
display: inline-block;
border: 2px solid #FFF;
border-radius: 10px;
padding: 1em;
width: 9em;
font-size: 24px;
color: #FFF;
text-decoration: none;
box-shadow: 3px 3px 3px 0px #333;
text-align: center;
}
a.button:hover {
background-color: #333;
}
.screenshot {
max-width: 850px;
}
.content {
margin: 0 auto;
max-width: 900px;
}
@media screen and (max-width: 920px) {
.content {
max-width: 600px
}
.screenshot {
max-width: 550px;
}
a.button {
width: 5em;
padding: 0.5em 1em;
}
}
@media screen and (max-width: 620px) {
.content {
margin-left: 1em;
margin-right: 1em;
}
.screenshot {
width: 100%;
}
a.button {
width: auto;
padding: 0.5em 1em;
}
a.download {
display: none;
}
}
h1, h2 {
font-weight: normal;
margin: 0;
padding: 0;
}
h1 {
font-size: 72px;
}
h3 {
font-weight: normal;
font-size: 30px;
margin: 0;
}
h4 {
margin-bottom: 0;
}
section {
background-color: #FFF;
padding: 1em;
margin-top: 2em;
border-radius:5px;
box-shadow: 3px 3px 3px 0px #AAA;
}
div.highlight {
margin-left: 1em;
padding: 0.2em 1em ;
background-color: #EEE;
border-radius: 3px;
border: 1px dashed #AAA;
}
footer {
margin: 2em 0;
font-size: 12px;
}
ul {
padding: 0;
margin: 0 0 0 1em;
}
li {
margin-top: 0.5em;
}
pre {
white-space: pre-wrap;
}
</style>
</head>
<body>
<header>
<div class="content">
<h1>Postsai</h1>
<h2>The Commit Database</h2>
<a class="button" href="https://github.com/postsai/postsai">GitHub</a>
<a class="button" href="https://arianne-project.org/postsai/query.html?date=month">Demo</a>
<a class="button download" href="https://github.com/postsai/postsai/releases/download/v1.0.0/postsai-1.0.0.zip">Download</a>
</div>
</header>
<div class="content">
<section id="screenshot">
<h3>Screenshot</h3>
<p>Postsai in action</p>
<img class="screenshot" src="screenshot.png" title="Screenshot" alt="A screenshot of Postsai showing the table of recent commits"></img>
</section>
<section id="features">
<h3>Features</h3>
<ul>
<li> Queryable commit database
<li> Supports dynamic links (e. g. from continuous integration systems)
<li> Integrates with GitHub, Gitlab and Sourceforge
<li> Integrates with self hosted Git and CVS servers
<li> Database upgrade from Bonsai or ViewVC-query possible
<li> Mobile friendly view
<li> Multi repository support
<li> Git push accountability
<li> Optional support for Gravatar
</ul>
</section>
<section id="installation">
<h3>Installation</h3>
<ul>
<li>Install dependencies</li>
</ul>
<div class="highlight highlight-source-shell"><pre>apt-get install python-mysqldb</pre></div>
<ul>
<li>Optionally install dependencies for CVS commit view</li>
</ul>
<div class="highlight highlight-source-shell"><pre>apt-get install cvs</pre></div>
<ul>
<li>Configure Apache in /etc/apache/sites/enabled/* to execute cgi-scripts:</li>
</ul>
<div class="highlight">
<pre lang="config"><code><Directory /var/www/html>
AddHandler cgi-script .py
Options +ExecCGI
</Directory>
</code></pre>
</div>
<ul>
<li>Enable cgi in Apache: <code>a2enmod cgi</code> and restart Apache
<li>Create an empty postsai database in MySQL.</li>
<li>Unzip postsai to your web server directory</li>
<li>Execute <code>./install.py</code> and follow instructions</li>
</ul>
</section>
<section id="integration">
<h3>Integration</h3>
<p>Postsai integrates with various hosted and local repositories:</p>
<img src="integration.png" class="screenshot" usemap="#integrationmap">
<map name="integrationmap" id="integrationmap">
<area alt="" title="GitHub" href="https://developer.github.com/webhooks/creating/" shape="rect" coords="2,4,120,99" />
<area alt="" title="GitLab" href="https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/web_hooks/web_hooks.md" shape="rect" coords="3,122,116,218" />
<area alt="" title="SourceForge" href="https://sourceforge.net/blog/how-to-use-webhooks-for-git-mercurial-and-svn-repositories/" shape="rect" coords="3,248,116,347" />
<area alt="" title="Git" href="https://github.com/nhnb/notify-webhook" shape="rect" coords="613,1,717,96" />
<area alt="" title="CVS" href="https://github.com/postsai/notify-cvs-webhook" shape="rect" coords="609,122,717,231" />
<area alt="" title="History" href="https://github.com/postsai/replay-webhook" shape="rect" coords="607,247,716,347" />
<area alt="" title="JSON" href="http://www.json.org/" shape="rect" coords="203,313,291,401" />
<area alt="" title="Bonsai" href="http://www-archive.mozilla.org/projects/bonsai/" shape="rect" coords="202,409,292,485" />
</map>
<h4>GitHub, Gitlab and SourceForge</h4>
<ul>
<li>Just add a Webhook to https://example.com/postsai/api.py and you are done.</li>
</ul>
<h4> Self hosted Git (including Gitolite)</h4>
<ul>
<li>Use <a href="https://github.com/nhnb/notify-webhook">notify-webhook</a> to setup a webhook with the following configuration<br>
meta.url=http://git.example.com:1234<br>
hooks.webhookurl=https://example.com/postsai/api.py<br>
hooks.webhook-contenttype=application/json</li>
<li>Edit the database table "repositories" to configure links, if you are not using instaweb</li>
</ul>
<h4> Self hosted CVS</h4>
<ul>
<li>Define a CVS Webhook <a href="https://github.com/postsai/notify-cvs-webhook">notify-cvs-webhook</a> in CVSROOT/loginfo with<br>--url=https://example.com/postsai/api.py</li>
<li>You might want to edit the database table "repositories" to configure an icon.</li>
</ul>
<h4>Global issue tracker</h4>
<p>A global issue tracker is supported as fallback by adding the following configuration to config.py</p>
<div class="highlight highlight-source-python"><pre>ui <span class="pl-k">=</span> {
<span class="pl-s"><span class="pl-pds">"</span>tracker<span class="pl-pds">"</span></span> : <span class="pl-s"><span class="pl-pds">"</span>https://hiszilla.his.de/hiszilla/show_bug.cgi?id=$1<span class="pl-pds">"</span></span>,
}</pre></div>
</section>
<section id="authentication">
<h3>Authentication</h3>
<p>Access to Postsai installations may be regulated using webserver authentication mechanisms.</p>
<p>On the simple level, access to the complete installation may be limited. But Postsai is also able to pick up authentication information
provided by Apache or nginx to allow access on a per repository level.</p>
<p>There are two functions, which may be defined in config.py for this purpose. The following example allows read access to all repositories (.*),
but limits write access to the regular expression set by the webserver as environment variable AUTHENTICATE_POSTSAI_WRITE_PATTERN. This
variable may be the result of a LDAP query performed by the webserver authorization module, for example.</p>
<pre>
def get_read_permission_pattern():
"""return a regular expression of repository names that may be read"""
return ".*"
def get_write_permission_pattern():
"""return a regular expression of repository names that may be written to"""
return os.environ.get("AUTHENTICATE_POSTSAI_WRITE_PATTERN", "^$")
</pre>
<p>For simplicity, it is also possible to do the authorization within those methods itself, for example by comparing REMOTE_USER to a hardcoded list.
<p><b>Important</b>: If you use HTTP Basic Authentication to grant read access by browsers, you will need to set <code>"service_worker": False</code> in
config.py, section ui. (<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=623464">Chrome Bug</a>,
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1291893">Firefox Bug</a>).</p>
</section>
<section id="privacy">
<h3>Privacy</h3>
<p><b>Hide email domain</b>
<p>By default the full email address of the author is displayed. This can be disabled:
<div class="highlight highlight-source-python"><pre>ui <span class="pl-k">=</span> {
<span class="pl-s"><span class="pl-pds">"</span>trim_email<span class="pl-pds">"</span></span> : <span class="pl-c1">True</span>
}</pre>
</div>
<p><b>Profile icons</b>
<p>Postsai can display Gravatar icons next to author names.
<div class="highlight highlight-source-python"><pre>ui <span class="pl-k">=</span> {
<span class="pl-s"><span class="pl-pds">"</span>avatar<span class="pl-pds">"</span></span> : <span class="pl-s"><span class="pl-pds">"</span>https://gravatar.com<span class="pl-pds">"</span></span>,
}</pre>
</div>
<p>Please note that Gravatar is an external service that might log user activities.</p>
<p><b>Search criteria filter</b>
<p>Postsai can enforce filters on query parameters. For example it may be desirable to disallow queries on the changes of human beings but allow such queries for bot accounts.
<p>This example limits queries on the who-column to the value "cvsscript".</p>
<div class="highlight highlight-source-python"><pre><span class="pl-c1">filter</span> <span class="pl-k">=</span> {
<span class="pl-s"><span class="pl-pds">"</span>who<span class="pl-pds">"</span></span> : <span class="pl-s"><span class="pl-pds">"</span>^cvsscript$<span class="pl-pds">"</span></span>
}</pre></div>
<p>Please note that it is relatively easy to postprocess query results. Therefore the effect of such filter is limited.</p>
</section>
<footer>
(C) Copyright 2016-2017 Postsai. Postsai is released as Free and Open Source Software under MIT license.
</footer>
</div>
</body>
</html>