diff --git a/1623/161/names.htm b/1623/161/names.htm index 5604bea87..7f8737f5a 100644 --- a/1623/161/names.htm +++ b/1623/161/names.htm @@ -1913,14 +1913,23 @@ to climb into <span lang=de-at>Staud'nwirt</span> Palace (1995)<br> </dl> </div> <hr /> -<script src="/site_media/js/jquery-3.6.0.min.js"></script> -<script> function show(id){ - $(".hidable").hide(); - $("#"+id).show(); - $(".t").css({ 'font-weight': 'normal' }); - $("#t_"+id).css({ 'font-weight': 'bold' }); +<script> + function show(id){ + var arrayOfDivs=document.getElementsByClassName('hidable'); + for (var i=0; i<arrayOfDivs.length;i++){ + arrayOfDivs[i].style.display='none'; + } + document.getElementById(id).style.display = 'block'; + + var arrayOfHeaders=document.getElementsByClassName('t'); + for (var i=0; i<arrayOfHeaders.length;i++){ + arrayOfHeaders[i].style.fontWeight='normal'; + } + document.getElementById(id).style.display = 'block'; + document.getElementById("t_" + id).style.fontWeight = 'bold'; + + } show('0'); -</script> -</body> +</script></body> </html> diff --git a/handbook/computing/todo.html b/handbook/computing/todo.html index b05c658ee..166417e82 100644 --- a/handbook/computing/todo.html +++ b/handbook/computing/todo.html @@ -13,9 +13,25 @@ body { } /* Use grey for system/programming/nerd pages as a visual reminder */ </style> -<script src="todo.js" defer></script> -<link rel="stylesheet" type="text/css" href="todo-styles.css" /> +<!-- only use some of these styles. Pending tidying after the other todo list is changed to use <details> +overwrite the ones we don't want here--> +<link rel="stylesheet" type="text/css" href="todo-styles.css" /> +<style> +li { + font: 18px Calibri, sanserif; + font-weight: normal; + color: 6083BF; + list-style-type: None; + line-height: 1.0; + margin-left: 1.0em; +} +li:before { + content: "ยป "; + font-weight: normal; + color: 6083BF; +} +</style> <h1>Expo Systems To-Do List</h1> <button onclick="window.location.href = 'todo.html_edit';">Edit this to-do list</button> @@ -43,7 +59,13 @@ but now we are just going to use standard HTML5 tags. Click here if no todo list appears here (because 'frames' have been disabled).</div></a> <hr> - +<h3>Other coding To Do things</h3> +<p>See also these long-running issues which have their own 'to do' implications: +<ol> +<li><a href="/handbook/troggle/trogdesign.html">What Troggle Does Badly - Design Decisions</a> +<li><a href="/handbook/troggle/menudesign.html">New Menu System</a> +<li><a href="/handbook/troggle/trog2030.html">Troggle in 2025-2030</a> +</ol> <h3>Process Documentation</h3> <details><summary><!--2020-03-26 psargent-->Wallets and new-cave</summary> <li><!--2020-03-26 psargent-->Explain how to link a new cave into the other caves in diff --git a/handbook/troggle/lbredesign.html b/handbook/troggle/lbredesign.html new file mode 100644 index 000000000..e588a460e --- /dev/null +++ b/handbook/troggle/lbredesign.html @@ -0,0 +1,108 @@ +<!DOCTYPE html> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>CUCC Expedition Handbook: Logbook HTML formats</title> +<link rel="stylesheet" type="text/css" href="../../css/main2.css" /> +</head> +<body><style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> +<h2 id="tophead">CUCC Expedition Handbook - Website menu design options</h2> + +<h1>Logbooks - multiple formats</h1> + +<ul> +<li><a href="#why">Why</a> +<li><a href="#prop1">Proposal #1</a> + +</ul> + +<h2 id="why">HTML formats - Why we need changes</h2> +<h4>Maintenance workload</h4> + +<p>We have 4 different markdown and HTML formats for logbooks of different vintages. This means 4x as much maintenance as we need. + +<code><pre>LOGBOOK_PARSER_SETTINGS = { + "2010": ("logbook.html", "Parseloghtmltxt"), + "2009": ("2009logbook.txt", "Parselogwikitxt"), + "2008": ("2008logbook.txt", "Parselogwikitxt"), + "2007": ("logbook.html", "Parseloghtmltxt"), + "2006": ("logbook.html", "Parseloghtmltxt"), +# "2006": ("logbook/logbook_06.txt", "Parselogwikitxt"), + "2006": ("logbook.html", "Parseloghtmltxt"), + "2005": ("logbook.html", "Parseloghtmltxt"), + "2004": ("logbook.html", "Parseloghtmltxt"), + "2003": ("logbook.html", "Parseloghtml03"), + "2002": ("logbook.html", "Parseloghtmltxt"), + "2001": ("log.htm", "Parseloghtml01"), + "2000": ("log.htm", "Parseloghtml01"), + "1999": ("log.htm", "Parseloghtml01"), + "1998": ("log.htm", "Parseloghtml01"), + "1997": ("log.htm", "Parseloghtml01"), + "1996": ("log.htm", "Parseloghtml01"), + "1995": ("log.htm", "Parseloghtml01"), + "1994": ("log.htm", "Parseloghtml01"), + "1993": ("log.htm", "Parseloghtml01"), + "1992": ("log.htm", "Parseloghtml01"), + "1991": ("log.htm", "Parseloghtml01"), + "1990": ("log.htm", "Parseloghtml01"), + "1989": ("log.htm", "Parseloghtml01"), #crashes MySQL + "1988": ("log.htm", "Parseloghtml01"), #crashes MySQL + "1987": ("log.htm", "Parseloghtml01"), #crashes MySQL + "1985": ("log.htm", "Parseloghtml01"), + "1984": ("log.htm", "Parseloghtml01"), + "1983": ("log.htm", "Parseloghtml01"), + "1982": ("log.htm", "Parseloghtml01"), + } + +</pre></code> +<h4>Complexity - missing entries</h4> +<p> +Secondly, it is highly likely that most of the different parsers have errors and so some logbook entries do not get imported. One parser, which we +could devote more effort to, would mean data does not get mislaid. + +<p>Thirdly, the current format is error-prone and nonsensical, so it an unecessary learning curve for all expoers. + + + +<h2 id="prop1">Logbooks: Proposal #1 - One Single Format</h2> +<h4>Architecture</h4> +<ul> +<li>Use new HTML5 tags e.g. <article> --stuff-- </article> or another tag that does not allow nesting. Ideally. +<li>Use closing tag at end of entry - no implicit merging of entries +<li>Explicitly handle content not in a logbook entry, e.g. title, frontispiece. +</ul> + +<p>There are several HTML structural tags we could choose, +see <a href="https://webplatform.github.io/docs/guides/html_structural_elements/">HTML5 structural elements</a>. +<br> +DIV, SECTION, ARTICLE, ASIDE + +<h4>Implementation</h4> +<ul> +<li>Start by exporting using this format from the import parsers +<li>extensive manual checking for each logbook +<li>Start with 2003 which has a unique parser +<li>trial new import parser, check it gives same results as old parser on old format +<li>repeat for each format type +<li>retire old format parsers, archive old formats of logbook +</ul> + +<h4>Advantages</h4> +<ul> +<li>Reduced maintenance load in future +<li>More expoers will write up their logbook entries ! Win! +<li>Clearly distinct programming task: would suit newcomer +</ul> + +<h4>Disadvantages</h4> +<ul> +<li>non urgent work +</ul> + +<hr /> +Return to: <a href="trogdesign.html">Troggle design and future implementations</a><br /> +Return to: <a href="trogintro.html">Troggle intro</a><br /> +Troggle index: +<a href="trogindex.html">Index of all troggle documents</a><br /><hr /> +</body> +</html> diff --git a/handbook/troggle/serverconfig.html b/handbook/troggle/serverconfig.html index fa028966e..e73f0e047 100644 --- a/handbook/troggle/serverconfig.html +++ b/handbook/troggle/serverconfig.html @@ -5,7 +5,8 @@ <title>Handbook - Expo Server</title> <link rel="stylesheet" type="text/css" href="../../css/main2.css" /> </head> -<body><style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> +<body> +<style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> <h2 id="tophead">CUCC Expedition Handbook: Server</h2> <h1>The Expo server</h1> <p>Troggle is the software which runs the the expo cave survey data management and website. It is not the only thing running on the expo server. @@ -50,7 +51,7 @@ expoweb (repo) ├── topos └── years</textarea></code> -<p>The handbook illustrates the i/t/l idiom whereby an image file (i) is displayed with a paragraph of text as an HTML file (l) and there is a thumbnail image (t) which is included in another document, e.g. see <a href="../../1623/walkin.htm">the photographic guide to the walk from the toll road car park</a>. +<p>The handbook illustrates the i/t/l idiom whereby an image file (i) is displayed with a paragraph of text as an HTML file (l) and there is a thumbnail image (t) which is included in another document, e.g. see <a href="/guidebook/walkin.htm">the photographic guide to the walk from the toll road car park</a>. <h4 id="css">CSS and HTML</a></h4> @@ -448,6 +449,5 @@ Return to: <a href="trogdesign.html">Troggle design and future implementations</ Return to: <a href="trogintro.html">Troggle intro</a><br /> Troggle index: <a href="trogindex.html">Index of all troggle documents</a><br /> -<hr /> -</body> +<hr /></body> </html> diff --git a/handbook/troggle/trog2030.html b/handbook/troggle/trog2030.html index 424895f6b..2495a306c 100644 --- a/handbook/troggle/trog2030.html +++ b/handbook/troggle/trog2030.html @@ -68,11 +68,43 @@ all the multi-user non-interference, not Django. So unless we want to roll our o <div style="color:blue"> <p>We need to de-cruft troggle *first*: remove 'good ideas' which were never used, trim redundancies and generally reduce it in size significantly. <p> -We should have a good look at making a list of functions that we will drop and some we replace by parsing cavern output and some we calculate during importing/reading svx files. +We should have a good look at making a list of functions that we will drop and some we replace by parsing cavern output and some we calculate +during importing/reading svx files. <p> -Documentation and a working list of on-going programming projects is the key to keeping troggle in a state where someone can pick it up and do a useful week's work, e.g. extracting the parsed logbooks to use shelve() storage throughout instead of SQL. The next time someone like Radost comes along during the next 5 years we want to be able to use them effectively. +Documentation and a working list of on-going programming projects is the key to keeping troggle in a state where someone can pick it up and do a +useful week's work, e.g. extracting the parsed logbooks to use shelve() storage throughout instead of SQL. The next time someone like Radost comes +along during the next 5 years we want to be able to use them effectively. </div> + +<h3>Option Zero.1</h2> +<div style="color:blue"> +<p>We should probably review and revise all the over-complex templates, originally written in 2006, which do serious amounts of database querying, +and linked object sub-querying, within the template code. This is a nightmare to maintain and debug, e.g. see +the note at the bottom of <a href="/personexpedition/Wookey/1999">Wookey 1999 trips</a>. + +<p>A possible goal would be to create all the data that will be displayed in a page as dictionaries - generated by obviously simple python, with +some Django query optimisations if necessary - which are then handed as 'context' to the Django page template (those files in <var> +troggle/templates/xxx.html</var>), instead of using the Django-specific database object requests within the template sublanguage, e.g. +<code><pre> + {% if persondate.2 %} + <td class="survexblock"><a href="{% url "svx" persondate.2.survexfile.path %}">{{persondate.2.name}}</a></td> + {%comment%} + <td class="roles" style="padding-right: 3px; text-align:right"> + {% for survexpersonrole in persondate.2.survexpersonrole_set.all %} + {{survexpersonrole.nrole}} + {% endfor %} + </td>{%endcomment%} +<td style="text-align:right"> + {{persondate.2.legslength|stringformat:".1f"}} m + </td> + {% else %} + <td colspan="3"> </td> + {% endif %} + </pre></code> + +</div> + <h3>Things that could be a bit sticky 1 - multi-user safety</h3> <p>Multi-user synchronous use could be a bit tricky without a solid multi-user database sitting behind the python code. So removing all the SQL database use may not be what we want to do after all. <p>Under all conceivable circumstances we would continue to use WGSI or diff --git a/handbook/troggle/trogdesign.html b/handbook/troggle/trogdesign.html index 1610486bb..9749933c7 100644 --- a/handbook/troggle/trogdesign.html +++ b/handbook/troggle/trogdesign.html @@ -154,6 +154,7 @@ complete copy, but if universal internet access is coming anyway, any such work <h2 id="specific">Specific, Immediate problems</h2> <ul> <li>New systems for <a href="menudesign.html">website menus</a> + <li>New <a href="lbredesign.html">logbook coding system</a> - not at all urgent <li><s>Short-term note on "logon" <a href="trogregistr.html">django-registration</a></s> </ul> <p>Open architectural issues being worked on: diff --git a/handbook/troggle/trogimport.html b/handbook/troggle/trogimport.html index fd02f4a22..24d53027e 100644 --- a/handbook/troggle/trogimport.html +++ b/handbook/troggle/trogimport.html @@ -5,7 +5,8 @@ <title>Handbook Troggle Data Import</title> <link rel="stylesheet" type="text/css" href="../../css/main2.css" /> </head> -<body><style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> +<body> +<style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> <h2 id="tophead">CUCC Expedition Handbook</h2> <h1>Troggle Data Import</h1> @@ -41,8 +42,8 @@ Usage is 'python databaseReset.py <command> [runlabel]' caves and logbooks must be run on an empty db before the others as they set up db tables used by the others. </pre></code> -<p>On a clean computer using sqlite a complete import takes less than 100 seconds now if nothing else is running. -On the shared expo server it takes 1,000s as it is a shared machine. More than half of the time on the server is reinitialising the MariaDB database. +<p>On a clean computer using sqlite a complete import takes 100 seconds now if nothing else is running (200s if running on an SD card not a SSD). +On the shared expo server it takes 600s as it is a shared machine. More than half of the time on the server is reinitialising the MariaDB database. <p>Here is an example of the output after it runs, showing which options were used recently and how long each option took (in seconds). <code><pre> @@ -100,6 +101,5 @@ loadlogbk.log</pre></code> Return to: <a href="trogintro.html">Troggle intro</a><br /> Troggle index: <a href="trogindex.html">Index of all troggle documents</a><br /> -<hr /> -</body> +<hr /></body> </html> diff --git a/handbook/troggle/trogindex.html b/handbook/troggle/trogindex.html index f8943bc34..6acae4a38 100644 --- a/handbook/troggle/trogindex.html +++ b/handbook/troggle/trogindex.html @@ -5,7 +5,8 @@ <title>Handbook Troggle Index</title> <link rel="stylesheet" type="text/css" href="../../css/main2.css" /> </head> -<body><style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> +<body> +<style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> <h2 id="tophead">CUCC Expedition Handbook</h2> <h1>Handbook Troggle - Index</h1> @@ -20,7 +21,8 @@ <a href="datamodel.html">Troggle - Data Model</a> - syntax-coloured list of classes, instance variables and foreign keys<br> <a href="trogdesign.html">Troggle - What it does Badly</a> - Design Decisions for the Future<br> <ul> -<li><a href="trogregistr.html">Troggle Login and user registration</a> - proposal to remove registration<br> +<li><a href="trogregistr.html">Troggle Login and user registration</a> - proposal to remove registration (DONE)<br> +<li><a href="lbredesign.html">Troggle Logbook Format Redesign</a> - options for revising the logbook HTML format<br> <li><a href="menudesign.html">Troggle Menu Design</a> - options for replacing the menuing system<br><br> <li><a href="trogsimpler.html">Troggle - a kinder simpler troggle?</a> - Radost's proposals (critiqued)<br> <li><a href="trogspeculate.html">Troggle Architecture Speculations</a> - as in April 2020<br> @@ -56,6 +58,5 @@ <br> <hr /> Return to: <a href="trogintro.html">Troggle intro</a><br /> -<hr /> -</body> +<hr /></body> </html> diff --git a/handbook/troggle/troglaptop.html b/handbook/troggle/troglaptop.html index 53b2a3dbf..2b9be78f0 100644 --- a/handbook/troggle/troglaptop.html +++ b/handbook/troggle/troglaptop.html @@ -5,7 +5,8 @@ <title>Handbook Troggle Laptop</title> <link rel="stylesheet" type="text/css" href="../../css/main2.css" /> </head> -<body><style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> +<body> +<style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style> <h2 id="tophead">CUCC Expedition Handbook</h2> <h1>Troggle - software development laptop</h1> @@ -338,7 +339,7 @@ python manage.py migrate</code></pre> Tests the uptodateness of your sqlite database. The help option explains what this does and gives extra command line options. -<h4>check full functionality</h4> +<h4 id="fullfunct">check full functionality</h4> <p>Now run the test suite: @@ -417,6 +418,5 @@ Go on to: <a href="trogarch.html">Troggle architecture</a><br /> Return to: <a href="trognotes.html">Troggle programmers' guide</a><br /> Troggle index: <a href="trogindex.html">Index of all troggle documents</a><br /> -<hr /> -</body> +<hr /></body> </html>