The core of troggle is the data architecture: the set of tables into which all the cave survey and expo data is poured and stored. These tables are what enables us to produce a large number of different but consistent reports and views.
ALSO there have been tables added to the core representation which are not anticipated in that document of this diagram, e.g. Scannedimage, Survexdirectory, Survexscansfolder, Survexscansingle, Tunnelfile, TunnelfileSurvexscansfolders, Survey. See <ahref="datamodel.html">Troggle data model</a> python code (15 May 2020) and click on the Class Diagram below on the right.
<p>Read the proposal: "<ahref="/expofiles/documents/troggle/troggle_paper.pdf"download>Troggle: a novel system for cave exploration information management</a>", by Aaron Curtis</em>. But remember that this paper is an over-ambitious proposal. Only the core data management features have been built. We have none of the "person management" features, none of the "wallet progress" stuff and only two forms in use: for entering <var>cave</var> and <var>cave entrance</var> data.
<h3>Implementation in software</h3>
<p><ahref="http://www.djangoproject.com/"><imgclass="onright"src="https://www.djangoproject.com/m/img/badges/djangopowered126x54.gif"border="0"alt="Powered by Django."title="Powered by Django."/></a>
Troggle is written in Python (about 5,700 lines excluding comments) and is built on the Django framework. Before starting to work on Troggle it might be a good idea to run through an initial install and exploration of <ahref="https://code.djangoproject.com/wiki/Tutorials">a tutorial Django project</a> to get the Django concepts bedded down - which are not at all obvious and some exist only within Django.
Django is the thing that puts the survey data in a database in a way that helps us write far less code to get it in and out again, and provides templates which make it quicker to maintain all the webpages.
<p>To understand how troggle imports the data from the survex files, tunnel files, logbooks etc., see the <ahref="trogimport.html">troggle import (databaseReset.py)</a> documentation.
<p>The following separate import operations are managed by the import utility <ahref="trogimport.html">(databaseReset.py)</a>:
<p>There are only two places where this happens. This is where online forms are used to create cave entrance records and cave records. These are created in the database but also exported as files so that when troggle is rebuilt and data reimported the new cave data is there.
<p>The public server uses a <ahref="https://mariadb.org/about/">MariaDB SQL database</a> and development is usually done using a single-user <ahref="https://sqlite.org/about.html">sqlite database</a> which is a standard django option.
<p>
You will find it very useful to see what is going on if you look directly at the data in the database (just a single file in the sqlite case) and browse the data in the tables. A light-weight, simple db browser is <ahref="https://sqlitebrowser.org/">DB Browser for SQLite</a>. Connecting directly the the MariaDB database with a control panel or <ahref="https://www.mysql.com/products/workbench/">workbench</a> gives even more tools and documentation capabilities.