/[qa]/trunk/pts/www/README
ViewVC logotype

Contents of /trunk/pts/www/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2926 - (show annotations) (download)
Thu Jan 31 14:36:36 2013 UTC (4 months, 2 weeks ago) by obergix
File size: 3064 byte(s)
Migrate to generation of Turtle by the XSL stylesheet, and later RDF/XML conversion
1 This is the code of the PTS web interface.
2
3 Principle :
4 -----------
5
6 The system gathers data in 'incoming/' from various sources (this is
7 done by bin/update_incoming.sh). Those data are merged in a set of XML
8 file in the 'base/' directory (this is done by bin/*_to_xml.py). Those
9 XML files are then transformed in HTML files (and other RDF formats,
10 put in the 'web/' directory) with xsltproc and the stylesheets inside
11 xsl/.
12
13 See the bin/do_all.sh script for more details (the one run by the
14 crontab).
15
16 You may as well check http://wiki.debian.org/qa.debian.org/pts for
17 some more documentation.
18
19 Dependencies :
20 --------------
21
22 - xsltproc
23 - mhonarc
24 - python
25 - python-lxml
26 - python-soappy (for SOAP access to the BTS)
27 - python-zsi (SOAP interface offered by the PTS)
28 - python-debian
29 - python-yaml
30 - raptor-utils (conversion between Turtle and RDF/XML)
31
32 Installation :
33 --------------
34
35 The "web" directory should be set as DocumentRoot of your VirtualHost.
36
37 Example of apache config (adapt it to your case)
38 <VirtualHost master>
39 ServerName packages.qa.debian.org
40 DocumentRoot /srv/packages.qa.debian.org/www/web
41 ErrorLog /var/log/apache2/packages.qa.debian.org-error.log
42 CustomLog /var/log/apache2/packages.qa.debian.org-access.log combined
43
44 # All our html pages are UTF-8
45 AddType "text/html; charset=UTF-8" html
46
47 ScriptAlias /cgi-bin /srv/packages.qa.debian.org/www/cgi-bin
48 ErrorDocument 404 /cgi-bin/error404.cgi
49
50 RewriteEngine on
51
52 # Distinguish between RDF or HTML serving
53 RewriteCond %{HTTP_ACCEPT} !(application/rdf\+xml)
54 # If the Accept header doesn't request RDF+XML, then skip the following 2 lines
55 RewriteRule .* - [S=2]
56 RewriteRule ^/\s*lib([^/\s])([^/\s]+)\s*$ /lib$1/lib$1$2.rdf [L,R]
57 RewriteRule ^/\s*([^/\s])([^/\s]+)\s*$ /$1/$1$2.rdf [L,R]
58
59 RewriteCond %{HTTP_ACCEPT} !(text/turtle)
60 # If the Accept header doesn't request Turtle, then skip the following 2 lines
61 RewriteRule .* - [S=2]
62 RewriteRule ^/\s*lib([^/\s])([^/\s]+)\s*$ /lib$1/lib$1$2.ttl [L,R]
63 RewriteRule ^/\s*([^/\s])([^/\s]+)\s*$ /$1/$1$2.ttl [L,R]
64
65 RewriteRule ^/$ /common/index.html [L,R]
66 RewriteRule ^/favicon\.ico$ http://www.debian.org/favicon.ico [L,R]
67 RewriteRule ^/\s*lib([^/\s])([^/\s]+)\s*$ /lib$1/lib$1$2.html [L,R]
68 RewriteRule ^/\s*([^/\s])([^/\s]+)\s*$ /$1/$1$2.html [L,R]
69
70 RewriteCond %{QUERY_STRING} ^src=\s*lib([^\s])([^\s]+)\s*$
71 RewriteRule ^/common/index.html$ /lib%1/lib%1%2.html? [L,R,NE]
72 RewriteCond %{QUERY_STRING} ^src=\s*([^\s])([^\s]+)\s*$
73 RewriteRule ^/common/index.html$ /%1/%1%2.html? [L,R,NE]
74
75 RewriteCond %{QUERY_STRING} ^srcrdf=\s*lib([^\s])([^\s]+)\s*$
76 RewriteRule ^/common/RDF.html$ /lib%1/lib%1%2.ttl? [L,R,NE]
77 RewriteCond %{QUERY_STRING} ^srcrdf=\s*([^\s])([^\s]+)\s*$
78 RewriteRule ^/common/RDF.html$ /%1/%1%2.ttl? [L,R,NE]
79
80 </VirtualHost>
81
82 Create these directories if they're not yet present :
83 $ mkdir incoming
84 $ mkdir base

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5