/usr/share/couchdb/www/docs/contributing.html is in couchdb-common 1.5.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | <!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>13. Contributing to this Documentation — Apache CouchDB 1.5 Documentation</title>
<link rel="stylesheet" href="_static/rtd.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.5.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="author" title="About these documents" href="about.html" />
<link rel="top" title="Apache CouchDB 1.5 Documentation" href="index.html" />
<link rel="next" title="14. Release History" href="whatsnew/index.html" />
<link rel="prev" title="12. Experimental Features" href="experimental.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="http-api.html" title="HTTP API Reference"
>API Reference</a></li>
<li class="right" >
<a href="config-ref.html" title="Configuration Reference"
>Config Reference</a> |</li>
<li class="right" >
<a href="whatsnew/index.html" title="14. Release History"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="experimental.html" title="12. Experimental Features"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Apache CouchDB 1.5 Documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="contributing-to-this-documentation">
<span id="contributing"></span><h1>13. Contributing to this Documentation<a class="headerlink" href="#contributing-to-this-documentation" title="Permalink to this headline">ΒΆ</a></h1>
<p>The documentation lives in the CouchDB source tree. We’ll start by forking and
closing the CouchDB GitHub mirror. That will allow us to send the contribution
to CouchDB with a pull request.</p>
<p>If you don’t have a GitHub account yet, it is a good time to get one, they are
free. If you don’t want to use GitHub, there are alternate ways to
contributing back, that we’ll cover next time.</p>
<p>Go to <a class="reference external" href="https://github.com/apache/couchdb">https://github.com/apache/couchdb</a> and click the “fork” button in the top
right. This will create a fork of CouchDB in your GitHub account. Mine is
<cite>janl</cite>, so my fork lives at <a class="reference external" href="https://github.com/janl/couchdb">https://github.com/janl/couchdb</a>. In the header, it
tells me me my “GitHub Clone URL”. We need to copy that and start a terminal:</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>git clone https://github.com/janl/couchdb.git
<span class="nv">$ </span><span class="nb">cd </span>couchdb
<span class="nv">$ </span>subl .
</pre></div>
</div>
<p>I’m opening the whole CouchDB source tree in my favourite editor. It gives
me the usual directory listing:</p>
<div class="highlight-bash"><div class="highlight"><pre>.git/
.gitignore
.mailmap
.travis.yml
AUTHORS
BUGS
CHANGES
DEVELOPERS
INSTALL
INSTALL.Unix
INSTALL.Windows
LICENSE
Makefile.am
NEWS
NOTICE
README
THANKS.in
acinclude.m4.in
bin/
bootstrap
build-aux/
configure.ac
etc/
license.skip
share/
src/
<span class="nb">test</span>/
utils/
var/
</pre></div>
</div>
<p>The documentation sources live in <cite>share/doc/src</cite>, you can safely ignore all
the other files and directories.</p>
<p>First we should determine where we want to document this inside the
documentation. We can look through <a class="reference external" href="http://docs.couchdb.org/en/latest/">http://docs.couchdb.org/en/latest/</a>
for inspiration. The <a class="reference external" href="http://docs.couchdb.org/en/latest/json-structure.html">JSON Structure Reference</a> looks like a fine place to write this up.</p>
<p>The current state includes mostly tables describing the JSON structure (after
all, that’s the title of this chapter), but some prose about the number
representation can’t hurt. For future reference, since the topic in the thread
includes views and different encoding in views (as opposed to the storage
engine), we should remember to make a note in the views documentation as well,
but we’ll leave this for later.</p>
<p>Let’s try and find the source file that builds the file
<a class="reference external" href="http://docs.couchdb.org/en/latest/json-structure.html">http://docs.couchdb.org/en/latest/json-structure.html</a> – we are in luck, under
<cite>share/doc/src</cite> we find the file <cite>json-structure.rst</cite>. That looks promising.
<cite>.rst</cite> stands for ReStructured Text (see
<a class="reference external" href="http://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html">http://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html</a>
for a markup reference), which is an ascii format for writing
documents, documentation in this case. Let’s have a look and open it.</p>
<p>We see ascii tables with some additional formatting, all looking like the
final HTML. So far so easy. For now, let’s just add to the bottom of this. We
can worry about organising this better later.</p>
<p>We start by adding a new headline:</p>
<div class="highlight-json"><pre>Number Handling
===============</pre>
</div>
<p>Now we paste in the rest of the main email of the thread. It is mostly text,
but it includes some code listings. Let’s mark them up. We’ll turn:</p>
<div class="highlight-json"><pre>ejson:encode(ejson:decode(<<"1.1">>)).
<<"1.1000000000000000888">></pre>
</div>
<p>Into:</p>
<div class="highlight-json"><pre>.. code-block:: erlang
ejson:encode(ejson:decode(<<"1.1">>)).
<<"1.1000000000000000888">></pre>
</div>
<p>And we follow along with the other code samples. We turn:</p>
<div class="highlight-json"><pre>Spidermonkey
$ js -h 2>&1 | head -n 1
JavaScript-C 1.8.5 2011-03-31
$ js
js> JSON.stringify(JSON.parse("1.01234567890123456789012345678901234567890"))
"1.0123456789012346"
js> var f = JSON.stringify(JSON.parse("1.01234567890123456789012345678901234567890"))
js> JSON.stringify(JSON.parse(f))
"1.0123456789012346"</pre>
</div>
<p>into:</p>
<div class="highlight-json"><pre>Spidermonkey::
$ js -h 2>&1 | head -n 1
JavaScript-C 1.8.5 2011-03-31
$ js
js> JSON.stringify(JSON.parse("1.01234567890123456789012345678901234567890"))
"1.0123456789012346"
js> var f = JSON.stringify(JSON.parse("1.01234567890123456789012345678901234567890"))
js> JSON.stringify(JSON.parse(f))
"1.0123456789012346"</pre>
</div>
<p>And then follow all the other ones.</p>
<p>I cleaned up the text a little but to make it sound more like a documentation
entry as opposed to a post on a mailing list.</p>
<p>The next step would be to validate that we got all the markup right. I’ll
leave this for later. For now we’ll contribute our change back to CouchDB.</p>
<p>First, we commit our changes:</p>
<div class="highlight-json"><pre>$ > git commit -am 'document number encoding'
[master a84b2cf] document number encoding
1 file changed, 199 insertions(+)</pre>
</div>
<p>Then we push the commit to our CouchDB fork:</p>
<div class="highlight-json"><pre>$ git push origin master</pre>
</div>
<p>Next, we go back to our GitHub page <a class="reference external" href="https://github.com/janl/couchdb">https://github.com/janl/couchdb</a> and click
the “Pull Request” button. Fill in the description with something useful and
hit the “Send Pull Request” button.</p>
<p>And we’re done!</p>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/logo.png" alt="Logo"/>
</a></p><!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<div id="searchbox" style="display: none">
<h3>Quick Search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q">
<input type="submit" value="Go">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
<br>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
<h4>Previous topic</h4>
<p class="topless"><a href="experimental.html"
title="previous chapter">12. Experimental Features</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="whatsnew/index.html"
title="next chapter">14. Release History</a></p><!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<h3>Utilities</h3>
<ul>
<li><a href="../">Futon</a></li>
</ul>
<!--
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<h3>More Help</h3>
<ul>
<li><a href="https://couchdb.apache.org/">Homepage</a></li>
<li><a href="http://wiki.apache.org/couchdb/">Wiki</a></li>
<li><a href="https://couchdb.apache.org/#mailing-list">Mailing Lists</a></li>
<li><a href="http://webchat.freenode.net/?channels=couchdb">IRC</a></li>
<li><a href="https://issues.apache.org/jira/browse/CouchDB">Issues</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="https://github.com/apache/couchdb/blob/master/share/doc/src/contributing.rst"
rel="nofollow">Show on GitHub</a></li>
<li><a href="https://github.com/apache/couchdb/edit/master/share/doc/src/contributing.rst"
rel="nofollow">Edit on GitHub</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="http-api.html" title="HTTP API Reference"
>API Reference</a></li>
<li class="right" >
<a href="config-ref.html" title="Configuration Reference"
>Config Reference</a> |</li>
<li class="right" >
<a href="whatsnew/index.html" title="14. Release History"
>next</a> |</li>
<li class="right" >
<a href="experimental.html" title="12. Experimental Features"
>previous</a> |</li>
<li><a href="index.html">Apache CouchDB 1.5 Documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2014, The Apache Software Foundation.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.
</div>
</body>
</html>
|