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

Commit

Permalink
fix generating package tables
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Nov 24, 2015
1 parent 7e664df commit 8f26769
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions manuals/en/main/Makefile
Expand Up @@ -35,7 +35,6 @@ GENERATED = autogenerated/bareos-dir-*.tex \
autogenerated/bareos-tray-monitor-*.tex \
autogenerated/bareos-15.2-packages-table-*.tex


LOG = bareos-manual-main-reference.log

all: pdf html
Expand Down Expand Up @@ -141,9 +140,8 @@ autogenerated/bareos-tray-monitor-*.tex: autogenerated/bareos-tray-monitor-confi
# generates all tray-monitor resource files
$(GENERATED_RESOURCE_DESCRIPTIONS) autogenerated/bareos-tray-monitor-config-schema.json

autogenerated/bareos-15.2-packages-table-*.tex: autogenerated/bareos-15.2-packages.json
$(GENERATED_PACKAGE_INFO) autogenerated/bareos-15.2-packages.json

autogenerated/bareos-15.2-packages-table-*.tex:
$(GENERATED_PACKAGE_INFO) -o autogenerated/ data/bareos-15.2-packages.json

check: bareos-manual-main-reference.pdf
@# hyperlink: multiline: pdfTeX warning .* has been reference$d but does not exist
Expand Down
9 changes: 6 additions & 3 deletions manuals/scripts/generate-bareos-package-info.py
Expand Up @@ -140,6 +140,7 @@ def generate_overview_table(data, dist_include):
parser = argparse.ArgumentParser(description='Generate information about packages in distributions.')

parser.add_argument('--debug', '-d', action='store_true', help="enable debugging output")
parser.add_argument('--out', '-o', help="output directory", default=".")
parser.add_argument('filename', help="JSON file containing package information")

args = parser.parse_args()
Expand All @@ -151,15 +152,17 @@ def generate_overview_table(data, dist_include):
json_data = json.load(json_file)
#print(json_data)

filename = args.filename.replace('.json','-table-redhat.tex')
basename = os.path.basename(args.filename)
dest = args.out + '/' + basename
filename = dest.replace('.json','-table-redhat.tex')
with open(filename, "w") as file:
file.write(generate_overview_table(json_data, re.compile('CentOS.*|RHEL.*|Fedora.*')))
file.close()
filename = args.filename.replace('.json','-table-suse.tex')
filename = dest.replace('.json','-table-suse.tex')
with open(filename, "w") as file:
file.write(generate_overview_table(json_data, re.compile('openSUSE.*|SLE.*')))
file.close()
filename = args.filename.replace('.json','-table-debian.tex')
filename = dest.replace('.json','-table-debian.tex')
with open(filename, "w") as file:
file.write(generate_overview_table(json_data, re.compile('Debian.*|xUbuntu.*|Univention.*')))
file.close()

0 comments on commit 8f26769

Please sign in to comment.