]> git.proxmox.com Git - pve-docs.git/commitdiff
generate default output file mappings automatically
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 14 Oct 2016 05:18:04 +0000 (07:18 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 14 Oct 2016 05:18:04 +0000 (07:18 +0200)
15 files changed:
datacenter.cfg.adoc
ha-manager.adoc
pct.adoc
pmxcfs.adoc
pve-bibliography.adoc
pve-faq.adoc
pve-firewall.adoc
pve-installation.adoc
pvecm.adoc
pvesm.adoc
pveum.adoc
qm.adoc
scan-adoc-refs
sysadmin.adoc
vzdump.adoc

index 5fa943ae99e4aab9cf46a2221a8933ccf9742bfb..3be594fc891d4b36f25bfbddfe225ecf2c5178ab 100644 (file)
@@ -24,9 +24,9 @@ ifndef::manvolnum[]
 Datacenter Configuration
 ========================
 include::attributes.txt[]
+:pve-toplevel:
 endif::manvolnum[]
 ifdef::wiki[]
-:pve-toplevel:
 :title: Manual: datacenter.cfg
 endif::wiki[]
 
index 570b282fdaf17cf7241a30944492bd48d3a73203..582dfcc91838efb249856775698de42f548997ef 100644 (file)
@@ -22,10 +22,8 @@ ifndef::manvolnum[]
 High Availability
 =================
 include::attributes.txt[]
-endif::manvolnum[]
-ifdef::wiki[]
 :pve-toplevel:
-endif::wiki[]
+endif::manvolnum[]
 
 Our modern society depends heavily on information provided by
 computers over the network. Mobile devices amplified that dependency,
index 7958b02f00ac641849c9611edc397b9d28a0af66..e2b36870d158cea6ee3668387428301c96908157 100644 (file)
--- a/pct.adoc
+++ b/pct.adoc
@@ -24,9 +24,9 @@ ifndef::manvolnum[]
 Proxmox Container Toolkit
 =========================
 include::attributes.txt[]
+:pve-toplevel:
 endif::manvolnum[]
 ifdef::wiki[]
-:pve-toplevel:
 :title: Linux Container
 endif::wiki[]
 
index 57b34b943434815ed04dc3b3f1ef9142cfa1a81a..2e3dd514691fcef078703a3423f05f4c203b2a13 100644 (file)
@@ -22,10 +22,8 @@ ifndef::manvolnum[]
 Proxmox Cluster File System (pmxcfs)
 ====================================
 include::attributes.txt[]
-endif::manvolnum[]
-ifdef::wiki[]
 :pve-toplevel:
-endif::wiki[]
+endif::manvolnum[]
 
 The Proxmox Cluster file system (``pmxcfs'') is a database-driven file
 system for storing configuration files, replicated in real time to all
index 1720284f5a00737b1be992d7248398f7d81d5fa4..d721c3d43ca391bb977e02df54b3ad785b5b46c3 100644 (file)
@@ -2,9 +2,9 @@
 Bibliography
 ============
 include::attributes.txt[]
-ifdef::wiki[]
+ifndef::manvolnum[]
 :pve-toplevel:
-endif::wiki[]
+endif::manvolnum[]
 
 [bibliography]
 .Books about {pve}
index 435c53e460eb71cda8ac99026af0bf6dc7305881..abaadcd83fdb41c909a80558b0d87ab49bfcfa1c 100644 (file)
@@ -1,8 +1,10 @@
 Frequently Asked Questions
 ==========================
 include::attributes.txt[]
-ifdef::wiki[]
+ifndef::manvolnum[]
 :pve-toplevel:
+endif::manvolnum[]
+ifdef::wiki[]
 :title: FAQ
 endif::wiki[]
 
index 1db810b5e37cc62ba1d4adaae92f1cfdaedfa2ab..8f5936cec18b6728c1edb5b04a50ad9dd85ca7fb 100644 (file)
@@ -24,9 +24,9 @@ ifndef::manvolnum[]
 {pve} Firewall
 ==============
 include::attributes.txt[]
+:pve-toplevel:
 endif::manvolnum[]
 ifdef::wiki[]
-:pve-toplevel:
 :title: Firewall
 endif::wiki[]
 
index c6e738739389577e1ff36698edc3457d98fbc3a3..d24d7670653c6d625e933b30e2ac3fa458798c97 100644 (file)
@@ -1,8 +1,10 @@
 Installing Proxmox VE
 =====================
 include::attributes.txt[]
-ifdef::wiki[]
+ifndef::manvolnum[]
 :pve-toplevel:
+endif::manvolnum[]
+ifdef::wiki[]
 :title: Installation
 endif::wiki[]
 
index ed468f54e2014d36773a6e98ca6c5d7c25a41800..8b3290f2e646fdd3318460f60da7b55dd5722efc 100644 (file)
@@ -22,10 +22,8 @@ ifndef::manvolnum[]
 Cluster Manager
 ===============
 include::attributes.txt[]
-endif::manvolnum[]
-ifdef::wiki[]
 :pve-toplevel:
-endif::wiki[]
+endif::manvolnum[]
 
 The {PVE} cluster manager `pvecm` is a tool to create a group of
 physical servers. Such a group is called a *cluster*. We use the
index 435dde6c63772236f8379f3c10c32eb47b401116..d41ab41c08a16ad181b69f56b5bc583eb7dcc22d 100644 (file)
@@ -23,9 +23,9 @@ ifndef::manvolnum[]
 {pve} Storage
 =============
 include::attributes.txt[]
+:pve-toplevel:
 endif::manvolnum[]
 ifdef::wiki[]
-:pve-toplevel:
 :title: Storage
 endif::wiki[]
 
index f119f69b8716b3acce4111ce023fa8fff6c3a963..95406c9874282224acd33e3583501b69a1df71e7 100644 (file)
@@ -24,10 +24,8 @@ ifndef::manvolnum[]
 User Management
 ===============
 include::attributes.txt[]
-endif::manvolnum[]
-ifdef::wiki[]
 :pve-toplevel:
-endif::wiki[]
+endif::manvolnum[]
 
 // Copied from pve wiki: Revision as of 16:10, 27 October 2015
 
diff --git a/qm.adoc b/qm.adoc
index a30e7dc49c4c9a4945427fb4e337e7396d94ead4..6aaaad5cd0820abe1979e90b3d89f29cb3e1b6e5 100644 (file)
--- a/qm.adoc
+++ b/qm.adoc
@@ -23,10 +23,8 @@ ifndef::manvolnum[]
 Qemu/KVM Virtual Machines
 =========================
 include::attributes.txt[]
-endif::manvolnum[]
-ifdef::wiki[]
 :pve-toplevel:
-endif::wiki[]
+endif::manvolnum[]
 
 // deprecates
 // http://pve.proxmox.com/wiki/Container_and_Full_Virtualization
index 13e6ae088a438e9cb30f4632eff92faa6adb32b2..b0bc340f4daa18b43c213bac5875b3cd54710bd3 100755 (executable)
@@ -14,27 +14,7 @@ my $environments = {
     pvelogo => 0, # ignore
 };
 
-my $fileinfo = {
-    outfile => {
-       default => {
-           "pve-admin-guide.adoc" => "pve-admin-guide.html",
-           "datacenter.cfg.adoc" => "datacenter.cfg.5.html",
-           "ha-manager.adoc" => "chapter-ha-manager.html",
-           "pct.adoc" => "chapter-pct.html",
-           "pve-bibliography.adoc" => "chapter-pve-bibliography.html",
-           "pve-firewall.adoc" => "chapter-pve-firewall.html",
-           "pve-installation.adoc" => "chapter-pve-installation.html",
-           "pvecm.adoc" => "chapter-pvecm.html",
-           "pvesm.adoc" => "chapter-pvesm.html",
-           "pveum.adoc" => "chapter-pveum.html",
-           "qm.adoc" => "chapter-qm.html",
-           "sysadmin.adoc" => "chapter-sysadmin.html",
-           "vzdump.adoc" => "chapter-vzdump.html",
-           "pmxcfs.adoc" => "chapter-pmxcfs.html",
-           "pve-faq.adoc" => "chapter-pve-faq.html",
-       },
-    },
-};
+my $fileinfo = {};
 
 my $start_env = [];
 foreach my $e (keys %$environments) {
@@ -291,9 +271,24 @@ foreach my $e (@$start_env) {
        } elsif ($e eq 'manvolnum') {
            my $realfn = $fn;
            $realfn =~ s/\.adoc$//;
-           die "toplevel file '$fn' is marhes as manual page!" if !$mansection;
+           die "toplevel file '$fn' is not marked as manual page!" if !$mansection;
            $realfn .= ".$mansection";
            $fileinfo->{outfile}->{$e}->{$fn} = $realfn;
+       } elsif ($e eq 'default') {
+           my $realfn = $fn;
+           $realfn =~ s/\.adoc$//;                 
+           if (defined($mansection) && ($mansection == 5)) {
+               $realfn .= ".$mansection";
+               $realfn = "$realfn.html";
+           } else {
+               if (($fn ne 'pve-admin-guide.adoc') &&
+                   $fileinfo->{doctype}->{$e}->{$fn} == 0) {
+                   $realfn = "chapter-$realfn.html";       
+               } else {
+                   $realfn = "$realfn.html";
+               }
+           }
+           $fileinfo->{outfile}->{$e}->{$fn} = $realfn;
        }
     }
 }
index a3da54e65214f22c8aff091a5c24aaf1633aa21c..1736744ba171f506a8607bf5d80720e032db0fcc 100644 (file)
@@ -2,9 +2,9 @@
 Host System Administration
 ==========================
 include::attributes.txt[]
-ifdef::wiki[]
+ifndef::manvolnum[]
 :pve-toplevel:
-endif::wiki[]
+endif::manvolnum[]
 
 {pve} is based on the famous https://www.debian.org/[Debian] Linux
 distribution. That means that you have access to the whole world of
index 62b848022000c60e167812889ec7bae1678f6961..12055b4c9b302ebd5afe7e561671e01278bb7e81 100644 (file)
@@ -24,10 +24,8 @@ ifndef::manvolnum[]
 Backup and Restore
 ==================
 include::attributes.txt[]
-endif::manvolnum[]
-ifdef::wiki[]
 :pve-toplevel:
-endif::wiki[]
+endif::manvolnum[]
 
 Backups are a requirements for any sensible IT deployment, and {pve}
 provides a fully integrated solution, using the capabilities of each