Quellcode durchsuchen

Fix the borg(1) man page creation

Now the date is updated every time the page is regenerated.
Rémi Oudin vor 5 Jahren
Ursprung
Commit
5bdf998a21
2 geänderte Dateien mit 7 neuen und 15 gelöschten Zeilen
  1. 1 14
      docs/man_intro.rst
  2. 6 1
      setup_docs.py

+ 1 - 14
docs/man_intro.rst

@@ -1,16 +1,3 @@
-====
-borg
-====
-
-----------------------------------------
-deduplicating and encrypting backup tool
-----------------------------------------
-
-:Author: The Borg Collective
-:Date: 2017-02-05
-:Manual section: 1
-:Manual group: borg backup tool
-
 SYNOPSIS
 --------
 
@@ -65,4 +52,4 @@ SEE ALSO
 * Releases https://github.com/borgbackup/borg/releases
 * Changelog https://github.com/borgbackup/borg/blob/master/docs/changes.rst
 * GitHub https://github.com/borgbackup/borg
-* Security contact https://borgbackup.readthedocs.io/en/latest/support.html#security-contact
+* Security contact https://borgbackup.readthedocs.io/en/latest/support.html#security-contact

+ 6 - 1
setup_docs.py

@@ -424,10 +424,15 @@ class build_man(Command):
             self.gen_man_page(man_title, doc.getvalue())
 
     def build_intro_page(self):
+        doc, write = self.new_doc()
+        man_title = 'borg'
         print('building man page borg(1)', file=sys.stderr)
+
         with open('docs/man_intro.rst') as fd:
             man_intro = fd.read()
-        self.gen_man_page('borg', self.rst_prelude + man_intro)
+
+        self.write_man_header(write, man_title, "deduplicating and encrypting backup tool")
+        self.gen_man_page(man_title, doc.getvalue() + man_intro)
 
     def new_doc(self):
         doc = io.StringIO(self.rst_prelude)