mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2026-01-18 11:53:06 +00:00
handbook updates re logbooks parsing
This commit is contained in:
@@ -8,15 +8,23 @@
|
||||
<body>
|
||||
<style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style>
|
||||
<h2 id="tophead">CUCC Expedition Handbook</h2>
|
||||
|
||||
|
||||
<h1>Logbooks Import</h1>
|
||||
|
||||
[This all needs to be moved to very obscure troggle documentation. Not needed in the handbook anymore.]
|
||||
|
||||
<h3 id="import">Importing the logbook into troggle</a></h3>
|
||||
<p>[This now happens every time a logbook entry is edited using the online form (pre-2025 style) or every time a full logbook as a single page is requested (after Nov.2025).]
|
||||
|
||||
<p>This is usually done after expo but it is in excellent idea to have a nerd do this a couple of times during expo to discover problems while the people are still around to ask.
|
||||
|
||||
<p>The nerd needs to login to the expo server using <em>their own userid</em>, not the 'expo' userid. The nerd also needs to be in the group that is allowed to do 'sudo'.
|
||||
<h4>The 2026 expo and later</h4>
|
||||
Since November 2025 the logbook entries typed into the online form are stored as individual JSON files, not edited into the single <var>logbook.html</var> file. The <var>logbook.html</var> is only generated (from the server database) when it is requested using a link on a webpage.
|
||||
|
||||
<h4>The 'parser'</h4>
|
||||
<p>This is rather a grand word for the hacked about spaghetti of regexes in troggle/parsers/logbooks.py . It is not a proper parser, just a phrase recognizer, and is horribly, horribly fragile. On the brightside, we now only have one of these instead of 5.
|
||||
<p>This is rather a grand word for the hacked about spaghetti of regexes in troggle/parsers/logbooks.py . It is not a proper parser, just a phrase recognizer, and is horribly, horribly fragile. On the brightside, we now only have one of these instead of 5. It takes the <var>logbook.html</var> file for each expedition year , parses it, and imported the data into the online database.
|
||||
|
||||
<h4>Ideal situation</h4>
|
||||
<p>Ideally this would all be done on a stand-alone laptop to get the bugs in the logbook parsing sorted out before we upload the corrected file to the server. Unfortunately this requires a full troggle software development laptop as the parser is built into troggle. The <var>expo laptop</var> in the potato hut is set up to do this (2023) but requires more nouse than is convenient to describe here.
|
||||
@@ -29,7 +37,7 @@ the trips are indexed and we can see who was doing what where.
|
||||
<a href="log-blog-parsing.html">in another page</a>. But read this page first.
|
||||
|
||||
<h4>Current situation</h4>
|
||||
<p>With the new data entry form we should have far fewer problems with inventive hacks trying to do clever thngs with HTML, but it is entirely possible that the form can be used to input text which will then break the parser, most obviously by putting in a
|
||||
<p>With the new data entry online form we should have far fewer problems with inventive hacks trying to do clever thngs with HTML, but it is entirely possible that the form can be used to input text which will then break the parser, most obviously by putting in a
|
||||
<var><span style="color:red"><hr /></span></var> which is the separator between entries. This is not clever.
|
||||
<p>The nerd needs to do this:
|
||||
<ol>
|
||||
|
||||
@@ -35,9 +35,8 @@ and then the
|
||||
<li><a href="#rig">Rigging guide</a>
|
||||
<li><a href="#type">UK Caving Blog</a>
|
||||
<li><a href="#form">Using the online form</a>
|
||||
<br /><br />
|
||||
<li><a href="computing/logbooks-parsing.html">Detailed Formatting</a> of a logbook entry (nerds only)
|
||||
<li><a href="computing/logbooks-parsing.html">Re-importing</a> the logbook into troggle (nerds only)
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -145,8 +144,8 @@ should be tested offline before the edited logbook is uploaded to the server.
|
||||
-->
|
||||
|
||||
<hr />
|
||||
Go on to <a href="computing/logbooks-format.html">Logbook internal format</a> documentation.<br />
|
||||
Go on to <a href="computing/logbooks-parsing.html">Importing logbooks into troggle</a>.<br />
|
||||
Go on to <a href="computing/logbooks-format.html">Logbook internal format</a> documentation (serious nerds only).<br />
|
||||
Go on to <a href="computing/logbooks-parsing.html">Importing logbooks into troggle</a> (serious nerds only).<br />
|
||||
Go on to <a href="computing/log-blog-parsing.html">Importing the online UK Caving blog into troggle</a>.
|
||||
<hr /></body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user