From 87deae98598534585cae890159e9442a8f54597c Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 26 Oct 2021 12:31:03 +0300 Subject: [PATCH] JS old scripts tidying and documenting --- handbook/troggle/scriptsqms.html | 9 ++++++++- scripts/TableSort.js | 5 +++++ caves-tabular.htm => scripts/caves-tabular.htm | 9 ++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) rename caves-tabular.htm => scripts/caves-tabular.htm (99%) diff --git a/handbook/troggle/scriptsqms.html b/handbook/troggle/scriptsqms.html index 12f319a09..82f44a164 100644 --- a/handbook/troggle/scriptsqms.html +++ b/handbook/troggle/scriptsqms.html @@ -44,6 +44,13 @@ chase QMs. It is a troggle-generated document at e

QMs all use the same QM description conventions. +

js/QM_helper.js

+

A relic. +

This is referred to in core/admin.py and appears to help with the userinterface within the +Django Admin control panel for manipulating QMs. It is not live as media/js/ is not plumbed in. +(Live javascript lives in media/jslib/ which is routed to the URL /javascript/.) + +

tablize-qms.pl

This is a perl script dating from November 2004. @@ -128,7 +135,7 @@ This will work on all survex *.svx files even those which have not yet been run

Phil says (13 April 2020): "The generated files are not meant to be served by the webserver, it’s a tool for people to run locally. Someone could modify it to create HTML output (or post-process the CSV output to do the same), but that is work still to be done."

troggle/parsers/survex.py

-

The QMs inside thge survex files are parsed by troggle along with all the other information +

The QMs inside the survex files are parsed by troggle along with all the other information inside survex files and stored in the database. But the webpages which display this data are rudimentary, e.g. /getQMs/1623-204 or /cave/qms/1623-204. Looking through urls.py and core/view_caves.py we see a lot of code for providing new QM numbers, producing lists of QMs for a given cave and for downloading QM.csv files generated by the database. But none of it appears to be working today (14 May 2020), see below. diff --git a/scripts/TableSort.js b/scripts/TableSort.js index 39f5e9211..1703b533d 100644 --- a/scripts/TableSort.js +++ b/scripts/TableSort.js @@ -1,4 +1,9 @@ function filterTable(tablename) +// Used by Radost's single HTML page to sort list of all caves +// in expoweb/caves-tabular.htm +// where the data is all in that html file, having been extracted from +// the svx files by an undocumented method. Probably from the .3d file// produced by +//survex. { table = document.getElementById(tablename); diff --git a/caves-tabular.htm b/scripts/caves-tabular.htm similarity index 99% rename from caves-tabular.htm rename to scripts/caves-tabular.htm index c3bfef351..c0853317d 100644 --- a/caves-tabular.htm +++ b/scripts/caves-tabular.htm @@ -4,9 +4,12 @@ Caves of loser plateau - + - +

Caves of Löserplateau (locations according to all.3d)

{written by Radost, 2019 - uses JS to sort table. Table is not updated. } @@ -4258,7 +4261,7 @@ Click on column headers to sort/reverse sort


- +