X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=make-man-index.py;h=56f38ce413e5e7fc6057e2cd1ffa3ac324adc1fd;hp=1e67287c08482b5f01899ae9bccf6fc3fba5331b;hb=924ee2cb0caa0c116ff6cf8c16f54588c4d4a4d8;hpb=7653b3c29adbad9d299fe9ff09ed30fbcc606acc diff --git a/make-man-index.py b/make-man-index.py index 1e67287c0..56f38ce41 100755 --- a/make-man-index.py +++ b/make-man-index.py @@ -1,4 +1,22 @@ #!/usr/bin/env python +# -*- Mode: python; indent-tabs-mode: nil -*- */ +# +# This file is part of systemd. +# +# Copyright 2012 Lennart Poettering +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see . from xml.etree.ElementTree import parse, Element, SubElement, tostring from sys import argv, stdout @@ -72,5 +90,7 @@ hr = SubElement(body, 'hr') p = SubElement(body, 'p') p.text = "This index contains %s entries, referring to %i individual manual pages." % (len(index), len(argv)-1) +if hasattr(stdout, "buffer"): + stdout = stdout.buffer prettify(html) stdout.write(tostring(html))