summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-11-13 14:08:20 +0100
committerYorhel <git@yorhel.nl>2009-11-13 14:08:20 +0100
commit997d1752ff1b1d2b1cf425b2c05dc180abc2243a (patch)
treedd8569564720bda4526a1fcae5f8c0c6591c087d
parent8053d00b0c9efa9bf1a7b176dcb8d9c106c1ee0d (diff)
docs: Updated d11 and added :SUBSUB: macro
-rw-r--r--ChangeLog1
-rw-r--r--data/docs/1142
-rw-r--r--data/docs/index1
-rw-r--r--data/style.css3
-rw-r--r--lib/VNDB/Handler/Misc.pm7
5 files changed, 46 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index c759b600..0cbaee4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ git - ?
- Added public database API
- Added [code] tag to bb2html()
- Tweaked Multi's idlequote timings
+ - Added :SUBSUB: macro to the doc pages
2.8 - 2009-10-24
- Converted relation graphs to use inline SVG
diff --git a/data/docs/11 b/data/docs/11
index b7f5ad45..a2928b7b 100644
--- a/data/docs/11
+++ b/data/docs/11
@@ -70,6 +70,34 @@ server resources and prevent abuse of this service.</p>
<dt>Port</dt><dd>19534 ('VN')</dd>
</dl>
+<br />
+<b>Disclaimer</b>
+<p>These notes should be obvious, but I'll point it out anyway.</p>
+<ul>
+ <li>
+ This service is still experimental and is provided for free. No guarantees
+ are given about the stability and uptime of this service. It may disappear
+ at any time, and access to it can be restricted without prior notice.
+ </li>
+ <li>
+ Changes to this API can be made without prior notice. Backwards compatibility
+ is provided when feasable, but non-compatible changes will be made at some
+ point. It is the responsibility of the application developers to keep their
+ applications up-to-date.
+ </li>
+ <li>
+ This service does not grant anyone the right to copy or republish the
+ information fetched using the API. VNDB does not have a clear copyright
+ statement, and in general we're not very strict about other people copying our
+ information, but this API is not intended to be used fetching and publishing
+ half of our database. When in doubt, ask.
+ </li>
+ <li>
+ Lastly, this API is not complete. If you have any specific features you'd
+ like to see, don't hesitate to ask.
+ </li>
+</ul>
+
:SUB:Request/response syntax
<p>
@@ -224,9 +252,10 @@ however still required.<br />
differently and that the order of the members may not be the same. What each
member means and what possible values they can have differs per type and is
documented below.
-</p><br />
+</p>
-<b>Returned object members for the 'vn' type:</b>
+:SUBSUB:get vn
+<p>The following members are returned from a 'get vn' command:</p>
<table style="margin: 5px 2%; width: 95%">
<thead><tr>
<td style="width: 80px">Member</td>
@@ -344,7 +373,7 @@ however still required.<br />
</tr>
</table>
-<b>Accepted filters for the 'vn' type:</b>
+<p>'get vn' accepts the following filter expressions:</p>
<table style="margin: 5px 2%; width: 95%">
<thead><tr>
<td style="width: 80px">Field</td>
@@ -402,9 +431,10 @@ however still required.<br />
novel and its releases. Note that the algorithm of this search may change and
that it can use a different algorithm than the search function on the website.
</td>
-</table><br /><br />
+</table>
-<b>Returned object members for the 'release' type:</b>
+:SUBSUB:get release
+<p>Returned members:</p>
<table style="margin: 5px 2%; width: 95%">
<thead><tr>
<td style="width: 80px">Member</td>
@@ -557,7 +587,7 @@ however still required.<br />
</tr>
</table>
-<b>Accepted filters for the 'release' type:</b>
+<p>Accepted filters:</p>
<table style="margin: 5px 2%; width: 95%">
<thead><tr>
<td style="width: 80px">Field</td>
diff --git a/data/docs/index b/data/docs/index
index 0c94b71f..02c8f769 100644
--- a/data/docs/index
+++ b/data/docs/index
@@ -9,5 +9,6 @@
<li><a href="/d9">Discussion board</a></li>
<li><a href="/d6">FAQ</a></li>
<li><a href="/d7">About us</a></li>
+ <li><a href="/d11">Database API</a></li>
<li><a href="/d8">Development</a></li>
</ul>
diff --git a/data/style.css b/data/style.css
index 5dcd7643..7653824e 100644
--- a/data/style.css
+++ b/data/style.css
@@ -905,7 +905,8 @@ div.scr_uploader { visibility: hidden; overflow: hidden; width: 1px; height: 1px
/***** Documentation pages *****/
.docs { padding: 0 15% 20px 15%; }
-.docs h3 { margin-top: 25px; }
+.docs h3 { margin-top: 30px; font-size: 14px }
+.docs h4 { margin-top: 15px; font-size: 12px }
.docs dd { padding-bottom: 5px; margin-left: 120px; }
.docs dt { float: left }
.docs ul.index { display: block; float: right; width: 150px; padding: 2px; margin: 0 0 10px 5px; background: url($_boxbg$) repeat; border: 1px solid $border$; }
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 9625372b..d2f5852b 100644
--- a/lib/VNDB/Handler/Misc.pm
+++ b/lib/VNDB/Handler/Misc.pm
@@ -281,12 +281,17 @@ sub docpage {
(my $title = shift @c) =~ s/^:TITLE://;
chomp $title;
- my $sec = 0;
+ my($sec, $subsec) = (0,0);
for (@c) {
s{^:SUB:(.+)\r?\n$}{
$sec++;
+ $subsec = 0;
qq|<h3><a href="#$sec" name="$sec">$sec. $1</a></h3>\n|
}eg;
+ s{^:SUBSUB:(.+)\r?\n$}{
+ $subsec++;
+ qq|<h4><a href="#$sec.$subsec" name="$sec.$subsec">$sec.$subsec. $1</a></h4>\n|
+ }eg;
s{^:INC:(.+)\r?\n$}{
$f = sprintf('%s/data/docs/%s', $VNDB::ROOT, $1);
open($F, '<:utf8', $f.$l) or open($F, '<:utf8', $f) or die $!;