expoweb/handbook/survey/newcavefile.html

103 lines
5.0 KiB
HTML
Raw Normal View History

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Handbook placeholder page</title>
<link rel="stylesheet" type="text/css" href="../../css/main2.css" />
</head>
<body>
<h2 id="tophead">CUCC Expedition Handbook</h2>
<h1>Cave data file</h1>
<p>These files live in <span style="font-family: monospace">::expoweb::/cave_data/</span>
<p>The example full format below is of a very simple cave with hardly any fields filled in. The most vital field is
<code>&lt;url&gt;augstb/4.htm&lt;/url&gt; </code>
at the bottom as this shows that this file is <code>::expoweb::/cave_data/augstb/4.htm</code>
<!-- it would be nice to find something that colourises this in HTML -->
<pre><code>&lt;!-- Only put one cave in this file --&gt;
&lt;!-- If you edit this file, make sure you update the websites database --&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;cave&gt;
&lt;non_public&gt;True&lt;/non_public&gt;
&lt;caveslug&gt;1623-4&lt;/caveslug&gt;
&lt;official_name&gt;Ritscherbachh&ouml;hle&lt;/official_name&gt;
&lt;area&gt;1623&lt;/area&gt;
&lt;area&gt;11&lt;/area&gt;
&lt;kataster_code&gt;1/T(W) +&lt;/kataster_code&gt;
&lt;kataster_number&gt;4&lt;/kataster_number&gt;
&lt;unofficial_number&gt;&lt;/unofficial_number&gt;
&lt;entrance&gt;
&lt;entranceslug&gt;1623-4&lt;/entranceslug&gt;
&lt;letter&gt;&lt;/letter&gt;
&lt;/entrance&gt;
&lt;explorers&gt;H&ouml;hlenforschervereinigung Altaussee, 1937&lt;/explorers&gt;
&lt;underground_description&gt;&lt;/underground_description&gt;
&lt;equipment&gt;&lt;/equipment&gt;
&lt;references&gt;&lt;/references&gt;
&lt;survey&gt;Plan at 1:100 by Alfred Auer, 1968 &lt;/survey&gt;
&lt;kataster_status&gt;&lt;/kataster_status&gt;
&lt;underground_centre_line&gt;&lt;/underground_centre_line&gt;
&lt;notes&gt;&lt;/notes&gt;
&lt;length&gt;12.3m&lt;/length&gt;
&lt;depth&gt;1.07m&lt;/depth&gt;
&lt;extent&gt;&lt;/extent&gt;
&lt;survex_file&gt;&lt;/survex_file&gt;
&lt;description_file&gt;augstb/4.htm&lt;/description_file&gt;
&lt;url&gt;augstb/4.htm&lt;/url&gt;
&lt;/cave&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<!-- Yes we should not be using the <tt> "teletype" tag as it is deprecated. -->
<p>As you can see, this is an XML tag format similar to HTML but with tags defined to hold cave survey data. These files are processed by troggle in real-time to produce an HTML file on the fly which is sent to your browser so that it
looks <a href="http://expo.survex.com/augstb/4.htm">like this</a>
<p>When you fill in the online form you creating a file just like the one above: troggle takes the input data from the form and creates the file. Troggle also stores the cave information in it's live memory when you use the form method.
<p>If instead of using the form you create the file by hand and upload it to the server you will also need find a nerd to run the cave import procedure before troggle "knows" that the cave exists.
<h3>Cave entrances</h3>
<p>There is <a href="newentrancefile.html">an exactly analogous file</a> for cave entrances except that those files live in <span style="font-family: monospace">::expoweb::/entrance_data/</span>
<h2>File layout</h2>
<p>The caves in our site are stored as XML files in the directory <tt>::expoweb::/cave_data</tt> and in
files named <tt>::expoweb::/cave_data/{area}-{cavenumber}</tt>. Entrances are correspondingly
in <tt>::expoweb::/entrance_data</tt> files, with the same naming convention, except that if
there is more than one entrance they have a,b,c suffixes, e.g. <tt>::expoweb::/<b>entrance</b>_data/{area}-{cavenumber}b</tt>
<p></p>Any <em>associated files</em>, usually photos and surveys, are
stored under the area names <tt>::expoweb::/1623/{cavenumber}</tt> or <tt>::expoweb::/1626/{cavenumber}</tt>
Note that this is a different naming convention: caves and entrances have the {area} as <em>
part of the file name
</em>
whereas associated files have the {area} <em>as a directory</em> in which the files are stored.
<p>An
understanding of this file layout is very important when filling in the forms or writing the tags so that images
appear on the final published website. The URLs in the XML file <em>should be relative URLs</em> to the cave page, which <em>appears</em>
as <tt>cave/{area}/{cavenumber}</tt> on the website even though <em>internally</em> they are <tt>cave_data/{area}-{cavenumber}</tt> </p>
<hr />
<p>Back to the form-filling method
<a href="caveentry.html">the form-filling method</a> guide
<hr />
<div id="menu">
<ul id="links">
<li><a href="../index.htm">Expedition Handbook</a>
<ul>
<li><a href="../rig/rigit.html">Rigging guide</a></li>
<li><a href="../survey/index.htm">Surveying guide</a></li>
<li><a href="../look4.htm">Prospecting guide</a></li>
<li><a href="../rescue.htm">Rescue guide</a></li>
</ul></li>
<li><a href="../../infodx.htm">Main index</a></li>
<li><a href="../../index.htm">Expo Home</a></li>
<li><a href="https://camcaving.uk">CUCC Home</a></li>
</ul>
</div>
</body>
</html>