mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Lists can now be used outside of p and text tags.
This allows for more flexible document structuring.
This commit is contained in:
parent
5a85122841
commit
0fb8bcbfb7
@ -7,8 +7,6 @@ use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
use Carp qw(confess);
|
||||
|
||||
# use Exporter qw(import);
|
||||
# our @EXPORT = qw();
|
||||
use File::Basename qw(dirname);
|
||||
use Scalar::Util qw(blessed);
|
||||
|
||||
@ -124,7 +122,7 @@ sub parse
|
||||
my %oOut;
|
||||
my $iIndex = 0;
|
||||
my $bText = $strName eq 'text' || $strName eq 'li' || $strName eq 'p' || $strName eq 'title' ||
|
||||
$strName eq 'summary' || $strName eq 'table-cell' || $strName eq 'table-column';
|
||||
$strName eq 'summary' || $strName eq 'table-cell' || $strName eq 'table-column' || $strName eq 'list-item';
|
||||
|
||||
# Store the node name
|
||||
$oOut{name} = $strName;
|
||||
@ -239,7 +237,7 @@ sub build
|
||||
}
|
||||
|
||||
if ($$oDoc{name} eq 'p' || $$oDoc{name} eq 'title' || $$oDoc{name} eq 'summary' ||
|
||||
$$oDoc{name} eq 'table-cell' || $$oDoc{name} eq 'table-column')
|
||||
$$oDoc{name} eq 'table-cell' || $$oDoc{name} eq 'table-column' || $$oDoc{name} eq 'list-item')
|
||||
{
|
||||
$$oOut{field}{text} = $oDoc;
|
||||
}
|
||||
|
@ -584,7 +584,7 @@ sub helpCommandDocGet
|
||||
|
||||
$oSectionElement->textSet($$oCommandHash{&CONFIG_HELP_DESCRIPTION});
|
||||
|
||||
# use Data::Dumper;
|
||||
# use Data::doc;
|
||||
# confess Dumper($oDoc->{oDoc});
|
||||
|
||||
if (defined($$oCommandHash{&CONFIG_HELP_OPTION}))
|
||||
|
@ -29,6 +29,10 @@ use constant HTML_DIV => 'div';
|
||||
push @EXPORT, qw(HTML_DIV);
|
||||
use constant HTML_SPAN => 'span';
|
||||
push @EXPORT, qw(HTML_SPAN);
|
||||
use constant HTML_UL => 'ul';
|
||||
push @EXPORT, qw(HTML_UL);
|
||||
use constant HTML_LI => 'li';
|
||||
push @EXPORT, qw(HTML_LI);
|
||||
|
||||
####################################################################################################################################
|
||||
# CONSTRUCTOR
|
||||
|
@ -399,6 +399,16 @@ sub sectionProcess
|
||||
$oSectionBodyElement->add($oConfigElement);
|
||||
}
|
||||
}
|
||||
# Add a list
|
||||
elsif ($oChild->nameGet() eq 'list')
|
||||
{
|
||||
my $oList = $oSectionBodyElement->addNew(HTML_UL, 'list-unordered');
|
||||
|
||||
foreach my $oListItem ($oChild->nodeList())
|
||||
{
|
||||
$oList->addNew(HTML_LI, 'list-unordered', {strContent => $self->processText($oListItem->textGet())});
|
||||
}
|
||||
}
|
||||
# Add a subsection
|
||||
elsif ($oChild->nameGet() eq 'section')
|
||||
{
|
||||
|
@ -331,6 +331,16 @@ sub sectionProcess
|
||||
# $oSectionBodyElement->add($oConfigElement);
|
||||
# }
|
||||
}
|
||||
# Add a list
|
||||
elsif ($oChild->nameGet() eq 'list')
|
||||
{
|
||||
$strMarkdown .= "\n";
|
||||
|
||||
foreach my $oListItem ($oChild->nodeList())
|
||||
{
|
||||
$strMarkdown .= "\n- " . $self->processText($oListItem->textGet());
|
||||
}
|
||||
}
|
||||
# Add a subsection
|
||||
elsif ($oChild->nameGet() eq 'section')
|
||||
{
|
||||
|
@ -350,6 +350,19 @@ pre
|
||||
|
||||
/*.section-body-execute-output*/
|
||||
|
||||
/*******************************************************************************
|
||||
Lists
|
||||
*******************************************************************************/
|
||||
ul.list-unordered
|
||||
{
|
||||
margin-top: .5em;
|
||||
}
|
||||
|
||||
li.list-unordered
|
||||
{
|
||||
margin-top: .5em;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
Keywords
|
||||
*******************************************************************************/
|
||||
|
@ -79,9 +79,12 @@
|
||||
|
||||
<p><link url="{[github-url-issues]}/105">Github Issue</link></p>
|
||||
|
||||
<p>Formalize this process and allow upgrades to new database versions.<ul>
|
||||
<li>Make sure that restore and expiration still work - perhaps new unit tests.</li>
|
||||
<li>Add db-id param to restore and archive-get to specify a database.</li></ul></p>
|
||||
<p>Formalize this process and allow upgrades to new database versions:</p>
|
||||
|
||||
<list>
|
||||
<list-item>Make sure that restore and expiration still work - perhaps new unit tests.</list-item>
|
||||
<list-item>Add db-id param to restore and archive-get to specify a database.</list-item>
|
||||
</list>
|
||||
|
||||
<p>This should also make it easy to throw a <quote>stanza does not exist</quote> error.</p>
|
||||
</section>
|
||||
@ -99,9 +102,12 @@
|
||||
|
||||
<p><link url="{[github-url-issues]}/63">Github Issue</link></p>
|
||||
|
||||
<p>Two improvements:<ul>
|
||||
<li>Make sure recovery.conf has same ownership/mode as base path</li>
|
||||
<li>Make sure base path has original ownership/permissions.</li></ul></p>
|
||||
<p>Two improvements:</p>
|
||||
|
||||
<list>
|
||||
<list-item>Make sure recovery.conf has same ownership/mode as base path</list-item>
|
||||
<list-item>Make sure base path has original ownership/permissions.</list-item>
|
||||
</list>
|
||||
</section>
|
||||
|
||||
<section id="pull-remote-options">
|
||||
@ -117,9 +123,12 @@
|
||||
|
||||
<p><link url="{[github-url-issues]}/134">Github Issue</link></p>
|
||||
|
||||
<p>It's possible to have bogus settings in the configuration file since it is only checked for certain values.<ul>
|
||||
<li>Detect options that are placed in the wrong sections.</li>
|
||||
<li>Detect options that do not exist.</li></ul></p>
|
||||
<p>It's possible to have bogus settings in the configuration file since it is only checked for certain values:</p>
|
||||
|
||||
<list>
|
||||
<list-item>Detect options that are placed in the wrong sections.</list-item>
|
||||
<list-item>Detect options that do not exist.</list-item>
|
||||
</list>
|
||||
</section>
|
||||
|
||||
<section id="repo-owner-option">
|
||||
@ -294,11 +303,15 @@
|
||||
|
||||
<p><link url="{[github-url-issues]}/140">Github Issue</link></p>
|
||||
|
||||
<p>There are some use cases where would be valuable to use relative paths. However to avoid confusion it might be best to implement it like so:
|
||||
<ul>
|
||||
<li>relative paths would need to being with ./</li>
|
||||
<li>--config would always be allowed to be relative</li>
|
||||
<li>In the config file a new option 'relative-path' would enable relative paths for all other path options.</li></ul>This would avoid strange effects for users who do not need this feature.</p>
|
||||
<p>There are some use cases where would be valuable to use relative paths. However to avoid confusion it might be best to implement it like so:</p>
|
||||
|
||||
<list>
|
||||
<list-item>relative paths would need to being with ./</list-item>
|
||||
<list-item>--config would always be allowed to be relative</list-item>
|
||||
<list-item>In the config file a new option 'relative-path' would enable relative paths for all other path options.</list-item>
|
||||
</list>
|
||||
|
||||
<p>This would avoid strange effects for users who do not need this feature.</p>
|
||||
</section>
|
||||
|
||||
<section id="verify-pg-checksums">
|
||||
|
@ -105,8 +105,8 @@
|
||||
<!ATTLIST option-description key CDATA #REQUIRED>
|
||||
|
||||
<!ELEMENT section (title,
|
||||
((p|table|host-add|execute-list|backrest-config|postgres-config|option-description|code-block)+|
|
||||
(p*, section+)|p*))>
|
||||
((p|list|table|host-add|execute-list|backrest-config|postgres-config|option-description|code-block)+|
|
||||
((p|list)*, section+)|(p|list)*))>
|
||||
<!ATTLIST section id CDATA #REQUIRED>
|
||||
<!ATTLIST section keyword CDATA "">
|
||||
<!ATTLIST section depend CDATA "">
|
||||
@ -163,7 +163,7 @@
|
||||
<!-- Formatted elements -->
|
||||
<!ELEMENT summary (#PCDATA|quote|b|i|ul|ol|id|code|code-block|host|file|path|cmd|setting|exe|backrest|postgres|br-option|
|
||||
br-setting|pg-option|pg-setting|link|user)*>
|
||||
<!ELEMENT p (#PCDATA|quote|b|i|ul|ol|id|code|code-block|host|file|path|cmd|setting|exe|backrest|postgres|br-option|br-setting|
|
||||
<!ELEMENT p (#PCDATA|quote|b|i|id|code|code-block|host|file|path|cmd|setting|exe|backrest|postgres|br-option|br-setting|
|
||||
pg-option|pg-setting|link|user)*>
|
||||
<!ATTLIST p keyword CDATA "">
|
||||
<!ELEMENT text (#PCDATA|quote|b|i|ul|ol|id|code|code-block|host|file|path|cmd|setting|exe|backrest|postgres|br-option|
|
||||
@ -174,6 +174,9 @@
|
||||
<!ELEMENT ol (li+)>
|
||||
<!ELEMENT li (#PCDATA|quote|b|i|ul|ol|id|code|code-block|host|file|path|cmd|setting|exe|backrest|postgres|br-option|
|
||||
br-setting|pg-option|pg-setting|link|user)*>
|
||||
<!ELEMENT list (list-item+)>
|
||||
<!ELEMENT list-item (#PCDATA|quote|b|i|ul|ol|id|code|code-block|host|file|path|cmd|setting|exe|backrest|postgres|br-option|
|
||||
br-setting|pg-option|pg-setting|link|user)*>
|
||||
<!ELEMENT id (#PCDATA)>
|
||||
<!ELEMENT code (#PCDATA)>
|
||||
<!ELEMENT code-block (#PCDATA|exe)*>
|
||||
|
@ -122,11 +122,13 @@
|
||||
<section id="getting-started">
|
||||
<title>Getting Started</title>
|
||||
|
||||
<p><backrest/> strives to be easy to configure and operate:
|
||||
<ul>
|
||||
<li><link page="{[backrest-page-user-guide]}">User guide</link> for Ubuntu 12.04 & 14.04 / <postgres/> 9.4.</li>
|
||||
<li><link page="{[backrest-page-command]}">Command reference</link> for command-line operations.</li>
|
||||
<li><link page="{[backrest-page-configuration]}">Configuration reference</link> for creating <backrest/> configurations.</li></ul></p>
|
||||
<p><backrest/> strives to be easy to configure and operate:</p>
|
||||
|
||||
<list>
|
||||
<list-item><link page="{[backrest-page-user-guide]}">User guide</link> for Ubuntu 12.04 & 14.04 / <postgres/> 9.4.</list-item>
|
||||
<list-item><link page="{[backrest-page-command]}">Command reference</link> for command-line operations.</list-item>
|
||||
<list-item><link page="{[backrest-page-configuration]}">Configuration reference</link> for creating <backrest/> configurations.</list-item>
|
||||
</list>
|
||||
</section>
|
||||
|
||||
<section id="contributions">
|
||||
|
Loading…
Reference in New Issue
Block a user