Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
add Linux platform and packages indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Oct 10, 2016
1 parent 447174d commit 2d6d22b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manuals/en/main/webui.tex
Expand Up @@ -227,7 +227,7 @@ \subsubsection{Configure your Apache Webserver}
Depending on your distribution, it is installed at \file{/etc/apache2/conf.d/bareos-webui.conf}, \file{/etc/httpd/conf.d/bareos-webui.conf} or \file{/etc/apache2/available-conf/bareos-webui.conf}.

The required Apache modules, \argument{setenv}, \argument{rewrite} and \argument{php} are enabled via package postinstall script.
However, after installing the \package{bareos-weui} package, you need to restart your Apache webserver manually.
However, after installing the \package{bareos-webui} package, you need to restart your Apache webserver manually.

\subsubsection{Configure your /etc/bareos-webui/directors.ini}
\index[general]{Configuration!WebUI}
Expand Down
37 changes: 30 additions & 7 deletions manuals/scripts/generate-bareos-package-info.py
Expand Up @@ -22,12 +22,36 @@
import re


class Dist:
def __init__(self, obsname):
self.obsname = obsname
[ self.dist, self.version ] = obsname.split('_',1)
self.dist = self.dist.replace('xUbuntu', 'Ubuntu').replace('SLE','SLES')
self.version = self.version.replace('_', '').replace('Leap', '').replace('SP','sp')
if self.dist == 'Debian':
self.version = self.version.replace('.0', '')

def dist(self):
return self.dist

def version(self):
return self.version

def getList(self):
return [ self.dist, self.version ]


class LatexTable:
def __init__(self, columns, rows):
self.columns = columns
self.rows = rows


def __getIndexes(self):
result = ''
for i in self.columns:
result += '\\index[general]{{Platform!{0}!{1}}}'.format(Dist(i).dist, Dist(i).version)
return result

def __getHeader(self):
result="\\begin{center}\n"
result+="\\begin{longtable}{ l "
Expand All @@ -45,16 +69,15 @@ def __getHeaderColumns(self):
prefix=None
prefixcount=0
for i in self.columns:
prefix_new=i.split('_',1)[0].replace('_', ' ')
prefix_new=Dist(i).dist
if prefix_new != prefix:
if prefixcount:
result+='\\multicolumn{%i}{ c|}{%s} &\n' % (prefixcount, prefix)
prefix = prefix_new
prefixcount=1
else:
prefixcount+=1
version = i.split('_',1)[1]
version_header+=" & " + version.replace('_', '').replace('Leap', '').replace('SP','sp')
version_header+=" & " + Dist(i).version
if prefixcount:
result+='\\multicolumn{%i}{ c }{%s}\n' % (prefixcount, prefix)
result+="\\\\ \n"
Expand All @@ -64,7 +87,7 @@ def __getHeaderColumns(self):
def __getRows(self):
result=''
for desc in sorted(self.rows.keys()):
result+="%-40s & " % (desc)
result+='\\package{{{:s}}} & '.format(desc)
result+=" & ".join(self.rows[desc])
result+=' \\\\ \n'
return result
Expand All @@ -76,12 +99,12 @@ def __getFooter(self):
return result

def get(self):
result = self.__getHeader()
result = self.__getIndexes()
result += self.__getHeader()
result += self.__getRows()
result += self.__getFooter()
return result


class PackageDistReleaseData:
def __init__(self):
self.data = {}
Expand Down

0 comments on commit 2d6d22b

Please sign in to comment.