Commit 3bfa961c authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[#10,!3] Generated API is now an appendix

parent 0875cf30
...@@ -92,4 +92,4 @@ docgen: ...@@ -92,4 +92,4 @@ docgen:
# That's a bit of a hack, but we are making sure that devel target # That's a bit of a hack, but we are making sure that devel target
# is always valid. The alternative is to make devel depend on all # is always valid. The alternative is to make devel depend on all
# *.cc *.h files in the whole tree. # *.cc *.h files in the whole tree.
.PHONY: devel guide .PHONY: devel guide docgen
...@@ -177,8 +177,8 @@ public: ...@@ -177,8 +177,8 @@ public:
for (auto cmd : cmds_) { for (auto cmd : cmds_) {
if (!first) { if (!first) {
f << ", "; f << ", ";
generateCmdLink(f, cmd.first);
} }
generateCmdLink(f, cmd.first);
first = false; first = false;
} }
...@@ -215,7 +215,6 @@ public: ...@@ -215,7 +215,6 @@ public:
bool first = true; bool first = true;
for (auto cmd : cmds_) { for (auto cmd : cmds_) {
first = true;
auto daemons = cmd.second->get("support"); auto daemons = cmd.second->get("support");
for (auto d : daemons->listValue()) { for (auto d : daemons->listValue()) {
if (d->stringValue() == daemon) { if (d->stringValue() == daemon) {
...@@ -239,7 +238,6 @@ public: ...@@ -239,7 +238,6 @@ public:
bool first = true; bool first = true;
for (auto cmd : cmds_) { for (auto cmd : cmds_) {
first = true;
auto daemon_hook = cmd.second->get("hook"); auto daemon_hook = cmd.second->get("hook");
if (!daemon_hook || daemon_hook->stringValue() != hook) { if (!daemon_hook || daemon_hook->stringValue() != hook) {
continue; continue;
...@@ -263,7 +261,7 @@ public: ...@@ -263,7 +261,7 @@ public:
generateCopyright(f); generateCopyright(f);
f << "<chapter xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xml:id=\"api\">" f << "<appendix xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xml:id=\"api\">"
<< endl; << endl;
f << " <title>API Reference</title>" << endl; f << " <title>API Reference</title>" << endl;
...@@ -273,7 +271,7 @@ public: ...@@ -273,7 +271,7 @@ public:
// Generate actual commands references. // Generate actual commands references.
generateCommands(f); generateCommands(f);
f << "</chapter>" << endl; f << "</appendix>" << endl;
ofstream file(OUTPUT.c_str(), ofstream::trunc); ofstream file(OUTPUT.c_str(), ofstream::trunc);
file << f.str(); file << f.str();
......
...@@ -92,9 +92,12 @@ ...@@ -92,9 +92,12 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="netconf.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="netconf.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="faq.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="faq.xml"/>
<chapter xml:id="acknowledgments"> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="api.xml"/>
<appendix xml:id="acknowledgments">
<title>Acknowledgments</title> <title>Acknowledgments</title>
<para>Kea is an open source project designed, developed, and maintained by Internet Systems <para>Kea is an open source project designed, developed, and maintained by Internet Systems
...@@ -133,10 +136,7 @@ ...@@ -133,10 +136,7 @@
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.tcinet.ru/">Technical Center of Internet</link> <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.tcinet.ru/">Technical Center of Internet</link>
.</para> .</para>
</chapter> </appendix>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="api.xml"/>
<!-- TODO: Add bibliography section (mostly RFCs, probably) --> <!-- TODO: Add bibliography section (mostly RFCs, probably) -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment