From: Dietmar Maurer Date: Fri, 14 Oct 2016 05:18:04 +0000 (+0200) Subject: generate default output file mappings automatically X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=commitdiff_plain;h=194d2f296102b7693c5915ff803e225f6d3b6526 generate default output file mappings automatically --- diff --git a/datacenter.cfg.adoc b/datacenter.cfg.adoc index 5fa943a..3be594f 100644 --- a/datacenter.cfg.adoc +++ b/datacenter.cfg.adoc @@ -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[] diff --git a/ha-manager.adoc b/ha-manager.adoc index 570b282..582dfcc 100644 --- a/ha-manager.adoc +++ b/ha-manager.adoc @@ -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, diff --git a/pct.adoc b/pct.adoc index 7958b02..e2b3687 100644 --- 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[] diff --git a/pmxcfs.adoc b/pmxcfs.adoc index 57b34b9..2e3dd51 100644 --- a/pmxcfs.adoc +++ b/pmxcfs.adoc @@ -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 diff --git a/pve-bibliography.adoc b/pve-bibliography.adoc index 1720284..d721c3d 100644 --- a/pve-bibliography.adoc +++ b/pve-bibliography.adoc @@ -2,9 +2,9 @@ Bibliography ============ include::attributes.txt[] -ifdef::wiki[] +ifndef::manvolnum[] :pve-toplevel: -endif::wiki[] +endif::manvolnum[] [bibliography] .Books about {pve} diff --git a/pve-faq.adoc b/pve-faq.adoc index 435c53e..abaadcd 100644 --- a/pve-faq.adoc +++ b/pve-faq.adoc @@ -1,8 +1,10 @@ Frequently Asked Questions ========================== include::attributes.txt[] -ifdef::wiki[] +ifndef::manvolnum[] :pve-toplevel: +endif::manvolnum[] +ifdef::wiki[] :title: FAQ endif::wiki[] diff --git a/pve-firewall.adoc b/pve-firewall.adoc index 1db810b..8f5936c 100644 --- a/pve-firewall.adoc +++ b/pve-firewall.adoc @@ -24,9 +24,9 @@ ifndef::manvolnum[] {pve} Firewall ============== include::attributes.txt[] +:pve-toplevel: endif::manvolnum[] ifdef::wiki[] -:pve-toplevel: :title: Firewall endif::wiki[] diff --git a/pve-installation.adoc b/pve-installation.adoc index c6e7387..d24d767 100644 --- a/pve-installation.adoc +++ b/pve-installation.adoc @@ -1,8 +1,10 @@ Installing Proxmox VE ===================== include::attributes.txt[] -ifdef::wiki[] +ifndef::manvolnum[] :pve-toplevel: +endif::manvolnum[] +ifdef::wiki[] :title: Installation endif::wiki[] diff --git a/pvecm.adoc b/pvecm.adoc index ed468f5..8b3290f 100644 --- a/pvecm.adoc +++ b/pvecm.adoc @@ -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 diff --git a/pvesm.adoc b/pvesm.adoc index 435dde6..d41ab41 100644 --- a/pvesm.adoc +++ b/pvesm.adoc @@ -23,9 +23,9 @@ ifndef::manvolnum[] {pve} Storage ============= include::attributes.txt[] +:pve-toplevel: endif::manvolnum[] ifdef::wiki[] -:pve-toplevel: :title: Storage endif::wiki[] diff --git a/pveum.adoc b/pveum.adoc index f119f69..95406c9 100644 --- a/pveum.adoc +++ b/pveum.adoc @@ -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 a30e7dc..6aaaad5 100644 --- 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 diff --git a/scan-adoc-refs b/scan-adoc-refs index 13e6ae0..b0bc340 100755 --- a/scan-adoc-refs +++ b/scan-adoc-refs @@ -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; } } } diff --git a/sysadmin.adoc b/sysadmin.adoc index a3da54e..1736744 100644 --- a/sysadmin.adoc +++ b/sysadmin.adoc @@ -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 diff --git a/vzdump.adoc b/vzdump.adoc index 62b8480..12055b4 100644 --- a/vzdump.adoc +++ b/vzdump.adoc @@ -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