2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 18:17:06 +00:00

2313 Commits

Author SHA1 Message Date
762d11b720 rearranged scanfolders 2025-12-14 16:52:06 +00:00
18a9bcc258 rearranged old scanned survey book folders 2025-12-14 12:00:14 +00:00
31d7c4a718 add to do git commit field 2025-12-11 17:43:30 +00:00
137b6bce7d apparently all working 2025-11-26 02:00:09 +02:00
ced9a7b024 SHould be nearly working, but crashes on saving edited entry 2025-11-26 01:22:38 +02:00
0e6a3e457d nearly complete store logbook entries in separate JSON files 2025-11-22 22:38:47 +02:00
88833941b5 nearly parsed JSON into correct form for database 2025-11-22 14:32:16 +02:00
e2c1bc3516 parsing JSON logentries OK as valid 2025-11-22 13:50:50 +02:00
2807ed5c21 removed limit on number of entries exported 2025-11-22 13:10:58 +02:00
0a16a0bd9d now doing dates and foreign keyed objects corretly 2025-11-22 13:08:08 +02:00
76fe0c0379 got author OK 2025-11-22 11:46:21 +02:00
7889162420 more progress to better serializer 2025-11-22 11:38:00 +02:00
f52eab842f refactored 2025-11-22 11:19:25 +02:00
8b00c441f5 entry individual export working mostly 2025-11-22 01:42:01 +02:00
d4ec144434 logbook entries json exporter 2025-11-21 23:57:00 +02:00
f378406893 notable caves 2025-11-21 23:56:47 +02:00
90ae23fc05 cave formatting 2025-11-21 23:56:28 +02:00
8d5fa586ca protect against MariaDB crash 2025-11-01 11:44:30 +02:00
7e5201edc6 extend allowed length of ref_text, crashes MariaDB 2025-11-01 11:42:44 +02:00
7e599afd40 something 2025-11-01 00:22:56 +02:00
66834caffb need login to do these things 2025-10-31 23:10:37 +02:00
7bbc413902 cartesian survex blocks now handled 2025-10-31 22:32:14 +02:00
c6647907e5 enable search for survexblock in admin console 2025-10-31 17:39:11 +02:00
5b53264316 more explanation of early years 2025-10-31 12:48:10 +02:00
e39037b333 now consistent with survex blocks only from expo 2025-10-31 12:19:21 +02:00
0a5e779dfd fixing many things which are just wrong 2025-10-31 12:00:26 +02:00
f573838e89 to do additions comments 2025-10-27 22:01:15 +02:00
061738d56d refactored expofilerename() - a bit complex, needs simplifying 2025-10-27 21:58:29 +02:00
b2104e191b refactored photoupload() 2025-10-27 21:34:53 +02:00
3fb310ed97 refactored photoupload, but a small bug 2025-10-27 20:44:57 +02:00
f5c1c6a90e refactored gpxupload() into new standard form 2025-10-27 20:06:44 +02:00
c08d06d81f refactored and extended gpxfix() 2025-10-27 19:41:32 +02:00
78699b934d Refactored to use _get(), _post() in upload form 2025-10-25 21:51:04 +03:00
28914916b6 refactored to reduce duplicated code 2025-10-24 22:40:26 +03:00
179ba32c5a moved stuff 2025-10-24 22:27:59 +03:00
1968c099fe now gets the wallet id from the .th files and links it in 2025-10-24 22:02:33 +03:00
d9953d8bbe now reading .xml drawings as utf-8 not binary, after correcting corrupt files 2025-10-24 19:52:54 +03:00
6e5b893646 comment 2025-10-23 00:28:35 +03:00
993005761c better output format 2025-10-22 23:49:27 +03:00
43b3d712a7 fix bug and make table better 2025-10-22 23:12:11 +03:00
ac50d28d36 better unwalleted survex report 2025-10-21 14:16:08 +03:00
7daef9f253 more detail in wild survex report 2025-10-20 22:34:28 +03:00
5e4ab5006f more explanation about wallet survey lengths 2025-10-20 17:25:30 +03:00
79ef45a99f make Eexplorers field on Cave disabled 2025-10-20 16:26:28 +03:00
ed43ab4bcf fixing tests 2025-10-20 13:50:05 +03:00
4bbbdba571 work in progress, now uploads several GPX files.. 2025-10-12 21:57:44 +03:00
6ccd16a508 comments edited 2025-10-12 20:23:50 +03:00
d25a2154af tidying unused fileds on classes 2025-10-11 23:59:11 +03:00
e842ae1ca3 removing new_since_parsing and fixing tests 2025-10-11 23:31:15 +03:00
905d9af978 utility to find empty fields on databse classes: for tidying 2025-10-11 21:07:43 +03:00
9806212395 Explorers field annotations in report pages 2025-10-10 22:26:22 +03:00
76854a84d7 fix Explorers field 2025-10-10 22:18:29 +03:00
870dfb5129 fix count of expos 2025-10-10 22:18:14 +03:00
bba585acf1 documented dodgy file creation 2025-10-10 20:18:11 +03:00
Wookey
305cb8a392 Fix typo on statistics page 2025-10-04 13:10:54 +01:00
Wookey
90141c4263 Update notes on software used on server 2025-10-04 13:08:58 +01:00
deead77c08 display drawings on wallet data 2025-09-27 21:59:37 +03:00
4d3821f572 expanded search for wallets inside tunnel files 2025-09-27 16:49:27 +03:00
ff739b9e24 comment added, to-do 2025-09-27 12:09:55 +03:00
d455b9aee7 fixed bug when extra unneeded ent file exists 2025-09-27 11:01:16 +03:00
4138dd0671 update out of data stuff after server update 2025-09-26 21:08:34 +03:00
400fd8430e add survey by year to wallets for each cave: Charlotte's request 2025-09-26 20:38:18 +03:00
1370524479 using io buffer to speedup, but it doesnt 2025-09-25 22:18:55 +03:00
6025f0b1dc spelix fixedpts allow 2025-09-25 22:18:20 +03:00
68621a4a92 use AI to redo MariaDB reinit 2025-09-25 18:30:27 +03:00
bc154c9016 old file removed 2025-09-25 18:30:05 +03:00
b1e518b3aa trying to track down error messages related to cave aliases in DataIssues 2025-09-23 20:55:20 +03:00
a7ec46cb70 bulk update seriously speeds up logbook database storing 2025-09-21 21:40:30 +03:00
9df466de2f QM links to explanations in reports 2025-09-21 20:45:33 +03:00
ca9fd8ec55 comments updated 2025-09-21 20:45:21 +03:00
64419ffb7c refactored to use a dataclass not a tuple 2025-09-21 19:33:20 +03:00
5b129fee8f bugfix 2025-09-20 22:44:48 +03:00
a32bee3c8c fix test based on chnaged data 2025-09-20 22:11:20 +03:00
02fe1f9750 revised colours for 'tunnelled' wallets 2025-09-20 22:10:59 +03:00
544cf0522a Google Keep extraction code, temporarily here 2025-09-18 18:01:03 +03:00
810f4a8af8 this needs rewriting competely 2025-09-18 17:17:20 +03:00
a7152b591d working.. 2025-09-06 17:39:39 +03:00
19c3f02c2d more gpx fix 2025-08-29 19:38:23 +03:00
cc3203a31f initial GPX track averager 2025-08-29 19:18:47 +03:00
4933515be6 stop verbose warnings, change colour on cave names 2025-08-28 23:35:09 +03:00
bab1736636 fix in-file package requirements used by uv 2025-08-28 22:07:47 +03:00
b982a0a3ca pure python version of Fernet 2025-08-28 21:03:48 +03:00
d24c992482 hack to avoid Fernet 2025-08-28 16:03:43 +03:00
eec9760b6c avoiding rust version incompatibility bug 2025-08-28 15:46:30 +03:00
26332d86e7 copilot refactoring, nice 2025-08-28 15:46:15 +03:00
1b82113f11 testing bad import under wsgi 2025-08-28 14:38:40 +03:00
87fd355985 updated schema 2025-08-28 13:46:23 +03:00
2a0001d994 fixed bug preventing QMs being detected 2025-08-28 01:57:55 +03:00
8e147986ae tighten QM recognizer to prevent spurious warnings 2025-08-27 16:59:38 +01:00
afe9190c97 rearranged QM code, added red triangle for open QMs 2025-08-26 22:52:13 +01:00
0cf76e8c6b remove ancient comment 2025-08-26 20:16:00 +01:00
53e03d5462 Much regex engineering, used co pilot 2025-08-26 19:13:34 +01:00
8379f7b154 uv lock in _deploy 2025-08-25 21:28:09 +03:00
ebfdc6c34c add 2 years before caves to recent page 2025-08-02 21:26:38 +02:00
ae88d279cb fixed bug looking for survex file with no .svx 2025-08-02 19:01:08 +02:00
e70dfec759 expand weird error due to unexpected file 2025-08-02 18:41:52 +02:00
4dece336f2 fix survex file specified without .svx issue 2025-08-02 18:40:36 +02:00
9d235ff10a prevent crash on broken QM parsing 2025-08-02 15:31:41 +02:00
b4f719d7bb label for field 2025-08-02 14:22:09 +02:00
6123c03ef4 made robust to unknown names 2025-08-01 21:20:00 +02:00
579389589b SPecial links for Lara 2025-08-01 21:11:59 +02:00
0bbb0a5173 typo bug 2025-08-01 14:19:39 +02:00
6ee06f0879 tidy return failure value 2025-08-01 12:48:41 +02:00
962263beb0 fixed entracne creation bug 2025-08-01 09:44:11 +02:00
08e545f03a starting rotate on cave descrip images 2025-07-31 20:32:48 +02:00
c2c70e6a95 revised tables 2025-07-31 12:25:53 +02:00
f76fd8ab65 made last table more useful 2025-07-31 11:13:17 +02:00
4075f43c5f whwre the hell did this come from 2025-07-29 19:44:14 +02:00
7a9bcd02f7 Adding SUrvexFix class 2025-07-29 19:42:59 +02:00
959c358c09 undropped caves code -> GPX 2025-07-29 17:08:36 +02:00
7564ce4d27 big fix 2025-07-29 12:07:50 +02:00
5fa4e3f72a undropped caves page 2025-07-29 11:53:21 +02:00
cf566d4bc7 restored original url /caves to point ot all caves 2025-07-29 11:34:11 +02:00
08577deeb5 fix long-standing problem of multi-columns on firefox 2025-07-29 11:10:55 +02:00
Anathema Device
2e26532837 anathema runs troggle 2025-07-29 10:24:48 +02:00
9b0da4ef2f better formatting 2025-07-28 22:57:05 +02:00
51c9fe8839 fixing undescended caves thinggy 2025-07-28 22:16:50 +02:00
5f2791816d UNDESCENDED caves now written in red ink 2025-07-28 19:10:02 +02:00
89e38397b9 Shorter, faster default caves index list 2025-07-28 18:17:54 +02:00
c82ed82aba add productivity per caver for each expo 2025-07-27 21:56:59 +02:00
1bae6c6cd1 removing voluminous, unneeded debug printout 2025-07-27 20:11:30 +02:00
57fb3a0078 fixing redundant messages 2025-07-27 16:16:32 +02:00
f0c5168067 trap bug that Tom B found 2025-07-26 22:56:08 +02:00
df0ea7ab30 add label text 2025-07-26 21:03:43 +02:00
786261fcfd reduce size of text box 2025-07-26 19:07:13 +02:00
751f677c44 explorer added properly now 2025-07-26 17:19:20 +02:00
bbb769faab typo 2025-07-26 15:13:23 +02:00
76f7b10777 Revised text on pending cave creation 2025-07-26 14:31:11 +02:00
d6dcd7a39a formatting 2025-07-25 20:50:29 +02:00
e3df02076c notables chnaged 2025-07-25 19:27:48 +02:00
bf09ee0054 no, don't do this 2025-07-25 18:51:44 +02:00
4fa767585c add TUNNELLED as a field on wallets 2025-07-25 18:24:38 +02:00
5204e3cc68 tunnel fucsia 2025-07-25 16:54:16 +02:00
29eae4e9b2 fixing resolved QM regex 2025-07-25 16:06:26 +02:00
3032386852 Insert troggle menu on 4 pages for caves and entrances 2025-07-25 14:58:05 +02:00
07e702c458 meddling with menus 2025-07-25 12:24:59 +02:00
2b5d3ecb01 fixed out of date comment 2025-07-25 11:32:16 +02:00
6ffcae16a2 go knows 2025-07-24 19:32:27 +02:00
ec4feaee8b protect against tom beech 2025-07-24 18:07:34 +02:00
6a6ec66a88 default number 2025-07-24 17:53:31 +02:00
0135d47536 tidied format of caves index page 2025-07-24 16:06:42 +02:00
2f7354d556 this year's cave list 2025-07-24 15:02:33 +02:00
c1bf6e94aa bugfix i hope 2025-07-24 14:35:15 +02:00
8e9ae0dd92 template now sexytopo compatible 2025-07-24 14:34:55 +02:00
9e9122da81 remove javascript from template 2025-07-24 13:11:49 +02:00
8cf85ca5ef aliases twiddle 2025-07-24 12:56:27 +02:00
bb74b95aaf partially fixing results from create entrance bug (not fixed) 2025-07-23 22:16:23 +02:00
1ca7fd5a2c gix bug on new cave created and entracne immediately edited 2025-07-23 20:48:00 +02:00
57b68fc7db being responsive to user requests 2025-07-23 20:40:38 +02:00
f9d8a2bea3 recheck 2025-07-22 21:11:58 +02:00
1d7603a7fe pre-run script 2025-07-22 19:39:43 +02:00
b79523e4e4 fix missing mugshots 2025-07-22 15:36:26 +03:00
226b13b136 plsifer dev system 2025-07-22 14:51:50 +03:00
67b366a2d0 single quote on server 2025-07-21 21:25:07 +02:00
e983ac2f00 single quote on server 2025-07-21 21:24:00 +02:00
a319863654 single quote on server 2025-07-21 21:22:15 +02:00
9409e27e1d reduce spam print 2025-07-21 21:18:45 +02:00
833aeaeeba Blrubfile field 2025-07-21 21:03:56 +02:00
9a3651ed8b fixed bug from people who did not turn up, optimised parsing a bit 2025-07-21 19:24:14 +02:00
b5540fd543 used cache instead of .get query, vastly faster 2025-07-21 18:29:06 +02:00
2039501672 refactoring people import from folk.csv 2025-07-21 15:41:05 +02:00
1cfcbccf76 must be lower case when specifying survey stations 2025-07-20 17:17:31 +02:00
083de7fdd5 no logs 2025-07-20 17:11:33 +02:00
29840aabff fixed survey station casesensitivity 2025-07-20 16:57:58 +02:00
5770a9b2e7 remove redundant code 2025-07-20 12:46:27 +02:00
24079ab5fe remove endmatter creation from now on 2025-07-20 11:46:27 +02:00
af22823e7a typo 2025-07-19 22:04:36 +02:00
25e5f5ccde add OSMand version of OSM online 2025-07-18 22:18:01 +02:00
543d30c84a fix bad *instrument line 2025-07-18 16:09:11 +02:00
2aee915abc attmept to catch upper case in entrance filenames 2025-07-17 18:10:51 +02:00
b206d08b39 hannah ug special case 2025-07-17 16:45:36 +02:00
d7bfe83039 fix test to match new page text 2025-07-17 16:19:00 +02:00
db5be84d77 remove redundant calls to cavern in locations.py 2025-07-17 15:54:22 +02:00
17347850b3 label of field 2025-07-17 08:18:28 +02:00
Wookey
93172f3b70 Update initial containerfile to use official base debian image and work over network 2025-07-17 01:50:40 +01:00
Wookey
a2356d9559 Update initial containerfile to use official base debian image and work over network 2025-07-17 01:43:29 +01:00
14222dd3fc bugfix 2025-07-16 18:57:20 +03:00
b53f09bb8f extra link on form 2025-07-16 18:45:29 +03:00
5ea359561a survey area label on form 2025-07-16 18:34:32 +03:00
7149b5d379 Place being surveyed 2025-07-16 18:28:45 +03:00
0c97c11d82 tick boxes meddling 2025-07-16 13:59:16 +02:00
ae6e8205a1 Notice for Mr Balister 2025-07-16 11:47:55 +02:00
7d0155fea8 move label text 2025-07-16 11:31:43 +02:00
f12f788248 remove pointless warning DataIssue 2025-07-16 11:31:28 +02:00
51d8a50d90 fix no people on wallet bug 2025-07-16 10:31:55 +02:00
15156aa79c working Containerfile for podman build 2025-07-13 19:31:15 +03:00
ea0a5b153f better validation for survey stations tag/other on an entrance, and bugs fixed 2025-07-13 19:30:53 +03:00
6cf7bbb7d9 *fix suggestions more 2025-07-13 18:29:45 +03:00
c2292038c4 *fix suggestions 2025-07-13 18:19:57 +03:00
d19e60976e improved areacode check in Cave edit form 2025-07-13 11:36:39 +03:00
38744a1781 fix non appearing cave ids on wallets 2025-07-12 18:43:16 +03:00
5f1b01bea7 fix non-appearing cave id info on wallets 2025-07-12 17:30:40 +03:00
dbec098bba cave areacode requirement enforced 2025-07-12 16:48:01 +03:00
468634527f many logbook entries in 2025 already 2025-07-12 16:32:54 +03:00
Expo laptop Crowley
a9e687c7ce added support buttons to logbook template
Commited in Aug 2024 on Crowely but not pushed. Rebased onto current head by Jonty, Jul 2025
2025-07-12 10:47:48 +02:00
4b4ab973f8 bug fi, always need to regenerate the import .pos file 2025-07-08 16:58:27 +03:00
6c962c0132 correct totals without non-expo surveys 2025-06-30 12:15:09 +03:00
8d901efdfc refactoring wallets and expos survey lengths code 2025-06-30 12:05:54 +03:00
823ef5b7e7 add {{year}} 2025-06-29 13:16:42 +03:00
501692586d add multi year menu 2025-06-28 20:24:04 +03:00
fc427993e7 separating out ARGE surveys from badly recorded Jenny&Olly surveys 2025-06-28 18:27:25 +03:00
c89e8cea90 remaining shared-use machine cookie tyimeouts set 2025-06-25 23:39:41 +03:00
c29548db01 shared use machine short-cookie timeout implemented for wallets and logbook edits 2025-06-25 23:33:05 +03:00
a7966e714d shared use machine short-cookie timeout implemented for survex file editing only 2025-06-25 23:30:20 +03:00
19844cd94a iniital framework for testing shared use cookie 2025-06-25 22:34:09 +03:00
3d12397d9a databaseReset.py fixed to use uv with manage.py 2025-06-21 20:14:45 +03:00
576e4a20f0 extract heights.json and fix manage.py to use uv 2025-06-21 20:10:43 +03:00
6e3279e585 made test for cavern more robust against legs v shots 2025-06-18 07:58:10 +01:00
fdc656dbba okchai settings 2025-06-18 07:21:03 +01:00
7a95c6478c updated tests to cope with moved file in expofiles 2025-06-14 20:55:53 +03:00
40fb066e2b refactoring cookie age as a function not a constant 2025-06-14 20:36:31 +03:00
d8cdf7bc5a new to do item 2025-06-14 14:25:39 +03:00
e1d7b35015 documentaiton for Becka as to where to find drawings files 2025-06-14 14:12:13 +03:00
40aeee9bf9 Updated dev config 2025-06-13 19:52:51 +03:00
1bb950ec45 initial method for identifying potato hut laptops as cookie 2025-05-23 21:58:21 +03:00
c7df859d80 Changed pre-push bash script to be per-machine not per architecture 2025-05-22 21:47:54 +03:00
955baeb238 only allows registration once, except for admins 2025-05-22 14:40:08 +03:00
9ae9ca9ec3 notice inserted if ADMIN, not fully implemented 2025-05-21 09:40:09 +03:00
06f9de360a notes made, work still to do 2025-05-20 21:29:12 +03:00
d06526846f prevent re-register not working 2025-05-20 21:13:09 +03:00
e0c87b167b blank unofficial number for Pending caves 2025-04-16 00:35:18 +01:00
63ff01700f Add entry for bad GPS/photo 2025-04-14 14:28:43 +01:00
85185c23b4 dev config updated to Django 5.2 2025-04-10 00:48:35 +01:00
da28aa7b22 Add <br> 2025-03-24 13:45:00 +00:00
38130c876b attempt to reformat logbook entries.. fail. Too many side efefcts. 2025-03-16 13:15:45 +00:00
31c77fd89c fix bug if no exif on file 2025-03-11 17:00:38 +00:00
2b010384f1 update template to standard survex 2025 syntax for *team 2025-03-11 17:00:23 +00:00
9a4916cc58 year fixed if not in exif data 2025-03-08 07:09:50 +00:00
ec3f513308 bugfix in .url file 2025-03-03 00:16:07 +00:00
ab8d527163 fix latitude bugs 2025-03-02 23:30:40 +00:00
3bdf73ccad improving cave identification in logbooks 2025-03-02 00:37:28 +00:00
7fb42c926f more fields added 2025-03-01 23:34:50 +00:00
06861144c3 more selective tag location report 2025-03-01 22:34:29 +00:00
71c3fb12ab new report for Lost entrances 2025-03-01 22:13:46 +00:00
4e9c766493 formatting 2025-03-01 22:13:35 +00:00
2f098b7333 bug fix, missing form field. 2025-03-01 12:52:57 +00:00
b1d10a41d5 Now matching 2025 survex standard *team 2025-02-25 01:16:04 +00:00
54717a436c *team new code to fit updated survex 2025-02-25 00:54:49 +00:00
c98f386c13 bug fix, missing import 2025-02-24 21:20:59 +00:00
73812b41b1 fix URLS for links 2025-02-24 12:25:47 +00:00
ddb90b3a39 tidy survex file writing 2025-02-24 12:25:35 +00:00
3118b717a0 fix tests to match cleaned-up urls.py 2025-02-22 23:06:33 +00:00
e95cff5818 produce .url file in same folder as orig. photo in expofiles 2025-02-22 10:11:24 +02:00
8a95b0609d create marker .url file for uploaded image 2025-02-21 22:14:17 +02:00
81fba01d1e comments 2025-02-21 19:31:24 +02:00
731095e2d9 GPS of photo now has href to OSM online 2025-02-19 23:18:53 +02:00
6586c00a37 now outputs lat+lon onto /l/*.html page for a photo with GPS exif 2025-02-19 23:13:13 +02:00
0ab0750511 fixed display bug 2025-02-19 23:12:33 +02:00
aeaf7cf57f make more robust against data error 2025-02-19 18:32:58 +02:00
a950cc60d9 tidy trailing slash everywhere & fix tests 2025-02-19 16:00:53 +02:00
cc06e2e1f4 Attempt at append_slash, and backtrack. 2025-02-18 19:59:12 +02:00
95190324fb final final final: logbook edit form (humph) 2025-02-17 23:01:56 +02:00
c23e93d7a7 bugfix 2025-02-17 22:44:27 +02:00
61c0f91088 Drawing file upload now using identified_login (oops) 2025-02-17 22:31:10 +02:00
6c30a9ffcb Bug: create year directory if a new year 2025-02-17 21:32:31 +02:00
95878e630d identified login for last form: survexfile. All done now. 2025-02-17 21:23:20 +02:00
6a5513e52b idenitifed login stuff 2025-02-15 16:27:25 +00:00
dc83ae1bc6 bugs 2025-02-13 23:15:51 +00:00
9fd86dc0c4 cookie and logon working nicely together: cave & entrance 2025-02-13 17:30:40 +00:00
ae36f1a9ce moved textedit from uploads to expo 2025-02-13 16:55:12 +00:00
a976497b3a text file editor now using validated logon properly 2025-02-13 16:42:51 +00:00
3fb99eb4be lgoing/cookie interaction betetr 2025-02-13 15:10:12 +00:00
3a3e5765f9 now including direction of vview of the photo 2025-02-11 21:15:25 +00:00
d05b6b9b5f fix many glitches for unusual JPGs 2025-02-11 19:28:20 +00:00
096c3be4e5 copies uploaded photos to expofiles too (as originals) 2025-02-11 17:40:07 +00:00
b8b2d52866 robust against photos with no exif 2025-02-11 13:36:01 +00:00
c099bf8071 typo for python 3.12 2025-02-11 01:32:18 +00:00
89afdded38 Removed obligatory typing when uploading photo 2025-02-11 00:59:33 +00:00
91d8d33e95 re-inserted GPS into re-scaled images 2025-02-10 23:34:45 +00:00
f4afa0c672 documeting the kataster tool 2025-02-09 23:32:42 +00:00
1c07dc5a94 new user registration 2025-02-09 22:39:50 +00:00
54c2e3c9c3 Fix tool on control panel 2025-02-09 22:17:27 +00:00
10352f2ccb Signup adds person to current expedition 2025-02-09 22:06:19 +00:00
0e2ccee678 Admin search and filters 2025-02-09 22:05:58 +00:00
79b2280cde menu 2025-02-09 14:30:39 +00:00
60fcb831d1 signup readonly, but visible 2025-02-09 14:16:30 +00:00
441049b0f1 kanboard in menu 2025-02-09 14:16:08 +00:00
c4f990f002 Better description 2025-02-08 23:04:19 +00:00
875145fc38 add edit-entry link to report 2025-02-08 21:15:19 +00:00
a357f4cf5b fix error msg 2025-02-07 23:36:40 +00:00
06b81ea825 tidied PATHs 2025-02-07 15:13:59 +00:00
28d24e48de tidy settigs PATHs 2025-02-07 15:12:21 +00:00
7c8253dcfc synch laptop and PC 2025-02-07 13:02:42 +00:00
c3eed61080 turn off print stmts 2025-02-07 13:02:25 +00:00
ea77d4f3e4 fixing bad url handling 2025-02-06 00:09:42 +00:00
f757d7632c moving i/l/t folders 2025-02-05 17:35:37 +00:00
7b462a883b new fix too for misplaced images i,t,l 2025-02-04 21:25:41 +00:00
f39e2c9bb5 many bugs fixed 2025-02-02 03:10:10 +00:00
3003b3c3c3 kataaster tool complete (probably buggy) 2025-02-02 01:10:13 +00:00
a0243c030e progress on URLS 2025-02-01 17:49:02 +00:00
859a1dd4a8 fixed TOTALS 2025-02-01 17:48:50 +00:00
e9e0050162 catch bug 2025-02-01 13:28:03 +00:00
59599ecdbf nearly done 2025-02-01 00:09:46 +00:00
afa3727757 sed basics done for survex files in :loser: 2025-01-31 21:55:52 +00:00
062ab3e5f8 renaming script 2025-01-31 19:19:04 +00:00
43634fb475 initial rename script textarea 2025-01-31 18:30:22 +00:00
49ea30cf06 fields in cave.html file 2025-01-31 02:00:06 +00:00
4a0496b3b4 begun to do fields, blue 2025-01-31 01:51:22 +00:00
e080610010 More diagnostics 2025-01-31 00:37:20 +00:00
6d5c6c0d0b more recipe 2025-01-30 22:00:56 +00:00
8073aca5d2 more to-do 2025-01-30 20:20:20 +00:00
d275211aa7 Katastering, list files 2025-01-30 18:54:15 +00:00
0084412258 Initial Cave Kayaster STatus form 2025-01-30 17:34:21 +00:00
3d1dbf2e0d another tweak 2025-01-29 22:46:04 +00:00
2681127037 tweaks to make it clearer which logbook entry is being saved 2025-01-29 22:05:32 +00:00
53865e64d8 make clear what filename is being saved. Phil Underwood issue. 2025-01-29 21:55:11 +00:00
bb4df7d07f need to login as personal user before seeing signup form 2025-01-28 21:09:50 +00:00
cf89b1b67f bug fix 2025-01-28 20:54:12 +00:00
e39760590f fix bogus check on readonly field 2025-01-28 20:41:06 +00:00
798ffc248e _edit Preview now displayed properly 2025-01-28 20:07:53 +00:00
db1c1fec6c bad expo pages format 2025-01-28 19:56:40 +00:00
6e7f0d39cc troggle pages menu 2025-01-28 19:56:16 +00:00
1f0a4806a2 fix bad url in header menu 2025-01-28 16:21:35 +00:00
11cf61b0a3 Put troggle reports menu on troggle handbook pages 2025-01-28 15:38:37 +00:00
bac65b5897 old user, first registration. cleaner 2025-01-27 23:50:08 +00:00
98594a07e2 reistration of previously attending expoer working again. 2025-01-27 16:42:52 +00:00
1825ed55fc password reset for logged-on users now working 2025-01-27 15:15:54 +00:00
6d25f70491 detect misplaced entrances 2025-01-26 23:18:02 +00:00
f1682367ee cp simples 2025-01-26 23:17:51 +00:00
aef0de715d bugfix 2025-01-26 19:23:07 +00:00
ce508b0eb2 Use logon not cookie when editing pages 2025-01-26 19:04:56 +00:00
7fab42fa9e add insurance info 2025-01-26 14:51:37 +00:00
5a678dcb0e quotes on 3.11 2025-01-26 14:37:27 +00:00
288ce80e07 Signup now saves list for bierbook & commits chnages 2025-01-26 14:12:19 +00:00
3ad75d4439 add prior expo experience (readonly) 2025-01-26 13:38:10 +00:00
4f1d808720 wording 2025-01-26 12:46:34 +00:00
622dfc34e3 bug 2025-01-25 22:29:47 +00:00
d78345e335 JSON link 2025-01-25 22:26:58 +00:00
1c3d2f7b73 formatting 2025-01-25 22:18:57 +00:00
2446758e6e blank out "expo" as a signedup user 2025-01-25 22:16:37 +00:00
95ea87233f Pre-load form with saved data 2025-01-25 20:36:35 +00:00
0d105d40da Signup form now saving data (and encrypting it) 2025-01-25 19:56:36 +00:00
c479345b6c bug fix 2025-01-24 23:13:04 +00:00
1e3a684c4b bug typo 2025-01-24 22:51:56 +00:00
a5bce14226 typos 2025-01-24 22:49:04 +00:00
9c3a40dd98 allow new registration only once 2025-01-24 22:48:45 +00:00
8af4fc5b90 missing imagemagik in new machine setup 2025-01-24 22:48:19 +00:00
1502ffb0c4 remove uneeded decorator as middleware does this universally 2025-01-24 22:23:52 +00:00
27cc23fe3b pythion3.11 funny 2025-01-24 02:35:13 +00:00
fedcc6d201 whack a mole 2025-01-24 02:33:42 +00:00
61722fd6c0 duplicate email prevention 2025-01-24 01:49:37 +00:00
27a14d0a0f Signup now stitched in 2025-01-24 01:31:06 +00:00
072a04487d stitch together the login sequence better 2025-01-24 01:10:45 +00:00
2daad646e3 bug 2025-01-23 23:52:26 +00:00
a5d0ad3e4f New User registration form 2025-01-23 23:38:06 +00:00
f842dab12a bugfix 2025-01-22 23:15:17 +00:00
173ee2348f password reset via encrypted token by email 2025-01-22 23:03:01 +00:00
a5341c4eb2 tidied login and control panel pages 2025-01-22 20:19:33 +00:00
18517f5ec7 typo 2025-01-22 19:25:02 +00:00
c602587990 oops bug 2025-01-21 19:21:24 +00:00
c5357cab3d Model change: add 1:1 link Person:User 2025-01-21 19:18:17 +00:00
a784ca8641 ensure anonymous before changing registration 2025-01-21 19:17:51 +00:00
d19b1e79ab now saves encrypted file after new registration. 2025-01-21 17:59:33 +00:00
157f1fcf27 add 'users' phase into database re-import 2025-01-21 17:58:46 +00:00
bb66c09498 new fomatting on form 2025-01-21 17:58:16 +00:00
e632a0d918 remove mention of CaveSlug class 2025-01-21 17:47:06 +00:00
fd4a3bc015 more explanation 2025-01-21 14:50:01 +00:00
8ac3791fcf fix bad warning message 2025-01-21 14:47:01 +00:00
b59ab47bc2 extend cookie timeout to 2 years 2025-01-21 13:18:43 +00:00
65cdeb4994 Loads and resaves same file. Round trip working. 2025-01-21 11:29:20 +00:00
01afb09a6e Registering existing and new users works, but is ephemeral. 2025-01-21 01:15:13 +00:00
b34ad3a82b infelicities 2025-01-20 22:09:34 +00:00
ba5987b674 form now working with basic validation 2025-01-20 21:57:11 +00:00
d79ffd8354 re-order names 2025-01-20 20:50:21 +00:00
8d8bc47e79 user registration pages 2025-01-20 20:43:21 +00:00
650cee4b0e gethostname 2025-01-20 20:42:43 +00:00
7769fa868e new page listing people's ids 2025-01-20 20:42:26 +00:00
1fcb2c5203 generated to-do lists updated 2025-01-20 15:30:15 +00:00
960958c922 cleanup 2025-01-20 14:51:11 +00:00
e37165f136 include users module in calc. 2025-01-20 14:49:23 +00:00
df52ee9251 split out users from people 2025-01-20 14:43:31 +00:00
4f9468ec66 update capabilities 2025-01-20 14:35:18 +00:00
0201281e38 do not write file until git integration done 2025-01-20 14:35:09 +00:00
b9f9cba672 fix for python 3.11 which is ok in python 3.13 2025-01-20 13:10:36 +00:00
3351d949d9 adding cryptography module with uv 2025-01-20 13:03:41 +00:00
4d49eefccb encryption round-trip works 2025-01-20 02:07:26 +00:00
79cf342d33 days before, not days 'ago' 2025-01-18 16:37:22 +00:00
a4957df557 TOTAL duration and colour highlighting 2025-01-18 16:33:01 +00:00
551e849a0f probably ARGE or VfHO 2025-01-17 23:01:27 +00:00
d903f883eb fix printing 2025-01-17 20:26:34 +00:00
ba4851fe80 add TOTALS to databaeReset timings 2025-01-17 20:21:23 +00:00
1678dedf08 protect against both sorts of capitalisation mismatches 2025-01-17 19:27:26 +00:00
b94ea8eb22 make people fill out git repo author field 2025-01-17 19:27:06 +00:00
54566ef092 renamed form and more comments 2025-01-17 18:42:19 +00:00
c4eb14148a make cookie default to empty string - form validation then works 2025-01-17 18:41:54 +00:00
d21278c5de rename Forms to be more understandable 2025-01-17 18:41:24 +00:00
d49d2eecee improve test resilience 2025-01-17 18:40:36 +00:00
05c687b253 tests needed who_am_i field for cookie id 2025-01-17 16:00:13 +00:00
Expo on server
919e02cee9 .gitignore not ignoring 2025-01-17 14:18:20 +00:00
6cfb6f3373 debug 2025-01-17 01:28:34 +00:00
8ce5db9175 re-enable string conversion 2025-01-17 01:28:34 +00:00
Expo on server
219cc2870a this should notbe happeneing 2025-01-17 01:28:22 +00:00
1a044759c6 tidying 2025-01-17 00:19:05 +00:00
a6a0db3c8f copy of expo server local settings in case it gets overwritten again 2025-01-16 23:46:22 +00:00
0c7fafd07f ignore localsettings again 2025-01-16 23:46:22 +00:00
Expo on server
999d3fd02b what a mess 2025-01-16 23:46:16 +00:00
abb32e6b5d fix Path() 2025-01-16 23:28:40 +00:00
Expo on server
fe9589039e still fixing things 2025-01-16 23:28:30 +00:00
ea2f4526e8 new localsettings 2025-01-16 23:22:15 +00:00
9331d7e1db now using secret credentials 2025-01-16 22:59:26 +00:00
d1ca37f00e remove old stuff 2025-01-16 21:16:06 +00:00
4116b32c33 tidy after git problem 2025-01-16 21:11:58 +00:00
3353b4e1fc forgotten deploy-specific tools 2025-01-16 21:08:52 +00:00
12499f423d moving to different credentials management 2025-01-16 21:08:28 +00:00
afd2b7cc18 remove mistake 2025-01-16 21:06:45 +00:00
d2fade5a3d making error handling mroe robust 2025-01-16 17:36:24 +00:00
eb22047c08 cover case when cave data is re-parsed online 2025-01-16 12:57:24 +00:00
f4fe681524 more fine tuning 2025-01-15 21:07:16 +00:00
3df9b1a3d6 tidy default if cookie has expired 2025-01-15 20:22:49 +00:00
8db340fd62 more signup mods 2025-01-15 20:22:16 +00:00
c5b08ce80f stumbled on bug when no entries in logbook, fixed. 2025-01-15 20:21:49 +00:00
f3bd9024cf formatting and defaults done 2025-01-15 18:48:23 +00:00
21d69994e7 new signup form now split out 2025-01-15 17:00:01 +00:00
d603bef64e prompt placeholders added 2025-01-15 16:37:28 +00:00
d31777dc8d initial signup form, copy of PHP 2025-01-15 14:34:29 +00:00
49c0c0fe3a First attempts at better use of Django query optimisation 2025-01-10 00:28:01 +00:00
486a50f876 Added two indexes to foreign keys 2025-01-09 22:07:27 +00:00
219b8b792e AI comments on regexes 2025-01-09 21:59:27 +00:00
5b97cd83dd tidying and new setting for emojies 2024-12-31 22:16:08 +00:00
4435836313 cleaning version history of these which have no secrets in them 2024-12-31 22:14:58 +00:00
f5441e4c6b enable emojies in text strings on MariaDB 2024-12-31 21:59:40 +00:00
f73f1b50fe Bug fixes 2024-12-29 23:37:20 +00:00
1ddd4da27b Upload drawings now using git_add() 2024-12-29 22:53:26 +00:00
2623af92c4 Documn. and tidy import 2024-12-29 22:53:04 +00:00
52600df2f2 logbookedit now using git functions in troggle.utils 2024-12-29 21:18:07 +00:00
f2a43558f9 Split out logbook_edit.py and ruff fix 2024-12-29 20:31:51 +00:00
e3a9498656 Wallet edit now using refactored git add/commit system 2024-12-29 19:35:20 +00:00
a3c7f165b9 Cookie/ git author now working on Wallet updates 2024-12-29 17:05:08 +00:00
ace2325773 Add commit msg when on a devserver 2024-12-29 15:49:07 +00:00
6d2484376a refactor & git author work 2024-12-29 03:42:58 +00:00
13c5d14a9f Allow edit of another non .txt file 2024-12-29 02:04:55 +00:00
dac3e6e288 Entrances now do cookie / git author thing. + tidyup. 2024-12-28 23:49:26 +00:00
e7444d20a4 cave edit working with cookies 2024-12-28 22:43:21 +00:00
ecd187e88e nearly done cave edit commit thing with cookie 2024-12-28 19:47:28 +00:00
09a16fed3b remove unused reference to function 2024-12-28 19:04:01 +00:00
9274600f1e clean up cave edit form 2024-12-28 18:48:08 +00:00
6cdf883ad7 unravelling writetrogglefiles 2024-12-28 18:47:54 +00:00
b71bb05fcd remove unneeded comments 2024-12-28 18:44:19 +00:00
4652d83b49 Comments adjusted 2024-12-28 17:04:36 +00:00
8dbad16ece Editor field & cookie working for survex online edits 2024-12-27 22:57:34 +00:00
60d24dc48e Cookie setting enabled for 'git editor' 2024-12-27 20:23:04 +00:00
dccd465354 oops 2024-12-27 19:15:27 +00:00
2e62f3c7d4 retain newline in body but replace \r 2024-12-27 16:54:38 +00:00
2b97c8f783 git-compatible editor field for updated page 2024-12-27 16:02:38 +00:00
5ee26af02a comments changed 2024-12-27 12:26:21 +00:00
42b978197c fixed wrong name of pending caves file in template 2024-12-22 15:22:24 +00:00
90ecdda407 debugging install scripts on a new 24.04 machine 2024-12-20 21:24:46 +00:00
1b6333fdef fixing setup scripts for a new Ubuntu 24.04 install 2024-12-20 16:03:28 +00:00
011e6777c9 bugfixes and more comments 2024-12-19 22:55:08 +00:00
19bbb00dcc bug fix 2024-12-16 23:35:44 +00:00
151cba336b fix absolute addressing in templates 2024-12-16 22:42:50 +00:00
d8ab17217f docm 2024-12-16 13:08:58 +00:00
f560cce348 no VScode when pulling everything now 2024-12-16 00:24:21 +00:00
407e97f91c toml tidying 2024-12-15 23:31:48 +00:00
e532b15c1d comments 2024-12-15 21:59:54 +00:00
a836dd2619 archiving the pip venv mechanisms 2024-12-15 21:59:41 +00:00
b541e258ec remove deptry and isort chnages uv.lock when sync'd 2024-12-15 18:56:37 +00:00
4677ac8b2c sorting imports code snippet 2024-12-15 18:55:07 +00:00
30760654b7 import order fixed by ruff 2024-12-15 18:54:47 +00:00
eb74940ca8 ruff config 2024-12-15 18:48:28 +00:00
5475a0b853 separate survex install from troggle install 2024-12-15 18:48:16 +00:00
492f2b00b0 fixing width different for caves re handbook 2024-12-14 23:16:40 +00:00
8eb248bb13 Dev versions, user server.toml for server mimic testing 2024-12-14 03:25:20 +00:00
3b5ead22f2 Variant versiosn of pyproject.toml 2024-12-14 03:14:55 +00:00
36bb964845 fix tests for caveform chnages 2024-12-14 03:14:08 +00:00
f04aa7d067 tidying dev environment 2024-12-14 01:42:12 +00:00
1d3b8d44b4 More form layout chnages for Django v5 2024-12-14 01:41:26 +00:00
cfc7a4b9f6 Make edit fields wider 2024-12-14 00:27:19 +00:00
7730b2535f tidying 2024-12-12 17:09:36 +00:00
321f912083 fixing pre-run script 2024-12-12 17:08:00 +00:00
58c9dd7d09 used by uv to set default python version 2024-12-12 17:07:46 +00:00
bbdd2cc58f fixing deprecated syntax 2024-12-12 17:07:14 +00:00
1ffc971285 move buttons to top in JavaScript 2024-12-12 17:06:56 +00:00
c401af7bfc upgrading scripts to use uv 2024-12-12 01:26:36 +00:00
f3235f8b76 using uv not pip 2024-12-12 00:38:28 +00:00
8b6a8be2c8 comments, configuring vscode 2024-12-11 22:34:51 +00:00
eb07a36eaf minor comments 2024-12-11 22:22:51 +00:00
54a069df84 comments 2024-12-11 21:46:37 +00:00
2bebc781a1 making os-trog.sh work on WSL/Ubuntu24.04 2024-12-11 21:32:36 +00:00
8c91d2f47d we do need a space between names after all 2024-12-10 21:31:45 +00:00
555cb63be3 Fix the order of participants in a logbook entry 2024-12-10 21:29:05 +00:00
8c56a45e7c preserving expoer order in logbook entries attempt 1 2024-12-10 20:09:25 +00:00
700512c008 disambiguate error messages 2024-12-10 19:06:55 +00:00
26eff0172b disambiguate error messages 2024-12-10 18:43:09 +00:00
aa164e9d81 bug typo fixed 2024-12-10 17:46:13 +00:00
cb9bfbf5d2 Add 'surface' to list of roles 2024-11-23 22:48:01 +00:00
d3042264b3 better error message 2024-11-23 22:07:49 +00:00
2598126879 remove date from cave .html files when editing or creating 2024-10-14 21:12:35 +03:00
29a7b984da Error ms inserted 2024-10-14 20:59:01 +03:00
7e92ee2084 more logbook entries 2024-09-01 22:57:52 +03:00
e6601e1bf7 fix pointless error messages in tests 2024-08-21 15:48:49 +03:00
2787b6c4ec comment 2024-08-15 23:25:49 +03:00
b6fc5f3d32 remove python 3.12 thing 2024-08-15 23:24:45 +03:00
fd189c68b3 cleaner wallets import disgnostics 2024-08-15 22:54:18 +03:00
c7f0061605 format tidy 2024-08-15 22:40:20 +03:00
005e1c132a number of entries 2024-08-12 19:42:24 +03:00
9063e54e6c local import of DataIssue 2024-08-11 19:45:51 +03:00
3e198fc410 cleaned up wallets import process 2024-08-11 18:41:27 +03:00
fc145648e6 Rearranging wallets setting from scanning surveyscans 2024-08-11 17:06:27 +03:00
6e1c83ec6e Catch exception when database reset ongoing 2024-08-11 17:06:27 +03:00
d57e49b5b2 Label changed 2024-08-11 17:03:13 +03:00
aaabcafcfe Message while database reset ongoing.. untested 2024-08-11 15:43:41 +03:00
74ce8894d2 wallets subfolders fiddling 2024-08-11 15:19:59 +03:00
e64cb212c1 make more robust 2024-08-11 14:07:26 +03:00
581f0259e2 bug fix again 2024-08-11 13:40:56 +03:00
f99141b0cb bug fix 2024-08-11 13:38:01 +03:00
89ef1afbe8 check slashes in dates in wallets 2024-08-11 13:29:30 +03:00
1203b51530 chnage logbook default to 2024 2024-08-10 08:37:25 +01:00
517d27458c make default date sensible for LBEs 2024-08-09 02:02:46 +03:00
7dbaea5d24 forbid changing year when editing existing logbook entry 2024-08-09 00:58:40 +03:00
859d9a5b22 changed msg for QM import 2024-08-05 11:35:28 +03:00
beb83e93f4 remove old warnings 2024-08-05 11:08:08 +03:00
e97d60a1c4 check pre exisiting scan files for proposed new wallet 2024-08-04 10:39:18 +03:00
3bfb082e83 ? 2024-08-04 08:48:37 +03:00
5e6aa0a175 wallet link 2024-08-04 01:04:21 +03:00
490fb61571 linki to wallets for a person 2024-08-04 00:55:19 +03:00
c1f9a26f5b debug msg 2024-07-30 08:50:23 +03:00
62320e9f7e fixing ,, bug in logbook rewriting, and fixing persons order 2024-07-30 00:53:24 +03:00
526d0ad904 fixing bad ids on newly entrered LBEs 2024-07-26 14:31:54 +02:00
9166b6ed74 fix year menu, fix name display, fix no of entries 2024-07-24 21:55:46 +02:00
245486666c comment & docm re timestamps 2024-07-24 11:43:27 +02:00
6ec90b4665 fixed test text 2024-07-24 07:59:41 +02:00
7c36fd5d2b comment 2024-07-23 23:43:08 +02:00
f590d0c12c redirect to edit page 2024-07-23 16:38:24 +02:00
219637e215 bug 2024-07-23 16:20:56 +02:00
957f78b1a3 trying to debug dup lbe 2024-07-23 16:18:09 +02:00
ca103fde22 more debug for logbook edits 2024-07-23 15:52:04 +02:00
a2f4591f72 offline message 2024-07-23 11:42:36 +02:00
07fc372b41 belt and braces prevent bad lbe ids 2024-07-23 11:34:12 +02:00
feaf38aa39 bug fix 2024-07-23 09:39:21 +02:00
c01f0e1dff debug stuff for logreport 2024-07-23 08:58:17 +02:00
48f2407a06 annotation on heading 2024-07-22 17:24:57 +02:00
2de4ad2a2f link to mugshots 2024-07-22 13:58:55 +02:00
baf58a5433 simpler person icon in calendar report 2024-07-20 21:19:20 +02:00
41fff1f3dd mugshots on expo page 2024-07-20 19:10:05 +02:00
bca1123d4d mugshots on the expo calendar page 2024-07-20 18:41:30 +02:00
83e22f828c extra comment re number of scans 2024-07-20 17:49:33 +02:00
c95d861516 fixed orde rof author and others in log 2024-07-20 17:11:23 +02:00
afa8ff4f66 debug commented out 2024-07-20 16:35:57 +02:00
c25a4b47de fix expofiles photos not appearing 2024-07-20 16:22:07 +02:00
78bc7323e9 fix YEAR separate for title banner and for current_year beging investigated 2024-07-20 13:52:39 +02:00
210174b901 fix photos link to expofiles in logbooks 2024-07-19 11:55:44 +02:00
c27a4f0ddc FIxed new survex file in editor crashed I think 2024-07-18 23:42:59 +02:00
5740a6b0d6 fixing new survex file editing 2024-07-18 20:12:18 +02:00
ff08e05485 remove print 2024-07-18 20:07:04 +02:00
0ce2ae4d1c commnt added 2024-07-18 16:14:11 +02:00
5a4d874b9f remove trial new QM bits 2024-07-18 13:59:35 +02:00
41893b81e8 remove trial new QM bits 2024-07-18 13:57:45 +02:00
3ba1454f15 add link to logbook delete in control panel 2024-07-18 10:12:30 +02:00
12fa55f537 new entry deletuion capability 2024-07-17 21:58:27 +02:00
6729698d7b fix for non existent logbook between 1st Jan and start of expo 2024-07-17 16:10:55 +02:00
00f5ffa1b6 re-order names 2024-07-17 14:05:58 +02:00
a6ca40becd fix bug 2024-07-16 18:13:07 +02:00
5b23b2df8a nicer display 2024-07-16 17:30:04 +02:00
ceb20f8565 fix 'year' 2024-07-16 15:29:03 +02:00
1365190330 More links 2024-07-16 14:45:08 +02:00
b907dcc993 debug comment 2024-07-15 12:42:46 +02:00
2cb665e141 to-do comments updated 2024-07-15 12:41:58 +02:00
11756fa0bb relax duplicate alias removal: assume 1623 area 2024-07-14 21:39:56 +02:00
ee5b36a33c remove spurious headers 2024-07-14 18:16:18 +02:00
35b04d096e New log report by title 2024-07-14 16:01:44 +02:00
f4c25ba163 bugfix 2024-07-14 13:29:21 +02:00
1a5e6167fd fix 2024-07-13 14:52:24 +02:00
f874bdc55e fix 2024-07-13 14:51:19 +02:00
cef872d038 GPX upload 2024-07-13 14:49:55 +02:00
fca95ce539 2024 defauklt year 2024-07-12 17:56:15 +02:00
24c5ba9711 Remove CaveSLug as a Class. Now each Cave has only one slug for sure. 2024-07-12 17:18:05 +02:00
a4783d2332 fix for python 3.11 2024-07-10 22:18:39 +02:00
7908257d63 fix directory for uploaded cave description photos 2024-07-10 21:07:45 +02:00
f5f3adf7da fixing index.htm as troggle-managed page 2024-07-10 13:10:55 +02:00
63ef8c9fb1 link to new logbook entry in menues 2024-07-09 14:46:42 +02:00
a8c9f8b899 bug fix from unfinished work, aborted 2024-07-08 22:28:09 +01:00
a68ef27284 make some pages sensitive to current_expo() 2024-07-08 20:22:42 +02:00
35e6bbe1ac comment about gpx files 2024-07-08 18:48:49 +02:00
cb854696c9 content type for gpx and kml 2024-07-08 11:59:10 +02:00
5ffe8230b1 addnewlogbook url 2024-07-07 10:08:48 +02:00
8b2ec54676 now 2024 logbook exists 2024-07-06 22:57:13 +02:00
f36f10d903 debug op 2024-07-05 00:28:48 +03:00
69ce1d91f3 all tests working except for git troggle and survex parsing 2024-07-04 22:36:40 +03:00
57bab53cec Nearly fixed test suite 2024-07-04 22:10:49 +03:00
b28b590b60 Makefile 2024-07-04 17:40:51 +03:00
0ae1315f59 add .tex and .sty files to text editable 2024-07-04 15:41:17 +03:00
3ba9f9d5c7 added link to control panel page 2024-07-03 21:06:54 +03:00
8732641cfd title changed 2024-07-03 19:56:38 +03:00
1c8c36c82f loading cave aliases from file now working 2024-07-03 19:27:37 +03:00
b6ffcb63bf error handling for txt editor 2024-07-03 12:34:21 +03:00
cb81a066db initial text file editing stuff 2024-07-03 11:48:38 +03:00
704ff8335d still some bugs in cave ids 2024-07-02 20:01:15 +03:00
c58f2716b0 chnage to cave data model field: fully_explored, taken from kataster code 2024-07-02 13:15:34 +03:00
e4d3e33dec bug fix 2024-07-02 12:23:33 +03:00
208c0ffa1f something odd with 2023-ww-01 2024-07-02 11:49:53 +03:00
0f754694ed alias glitch 2024-07-02 11:12:16 +03:00
c3b08c85ef typo 2024-07-02 10:57:08 +03:00
a6730b1b3a deal with absent uneeded items 2024-07-02 10:55:11 +03:00
c51f76ed83 rename alias still giving error messges.. but why? 2024-07-02 02:50:38 +03:00
e432098f6a renaming aliases 2024-07-02 02:18:09 +03:00
8e1cf1021d using filename for entrance_slug not the <slug> field in entrance_data file 2024-06-30 20:38:02 +03:00
6789d4f627 detecting mismatched entrance slugs and filenames 2024-06-30 00:17:39 +03:00
24a97b9dbd fixing entrance import messages 2024-06-29 12:12:16 +03:00
897cdf9aee fix messages 2024-06-29 12:10:35 +03:00
313d4bde30 try again 2024-06-29 12:09:41 +03:00
d1e853ef47 ignore temp script 2024-06-29 12:09:41 +03:00
Expo on server
b93ff5552b remove mvscript.sh 2024-06-29 10:09:34 +01:00
a6c47b2654 <caveslg> now taken from filename not <caveslug> field 2024-06-29 10:32:10 +03:00
87d67f5820 ignore mvscript.sh in /troggle 2024-06-29 10:31:46 +03:00
6d16f8f7ca fixing cave slug <caveslug> issues 2024-06-29 10:31:45 +03:00
Expo on server
09dbe5b14b bogus, fixing.. 2024-06-29 08:30:27 +01:00
70bdb50ae7 more fixes to cave_edit mess 2024-06-28 18:56:17 +03:00
03fa36576b fixing cave_edit 2024-06-28 18:55:41 +03:00
Expo on server
5fff060487 utility to rename katastered files 2024-06-28 16:55:24 +01:00
c18ebeb992 fixing more misnamed file stuff 2024-06-28 13:53:44 +03:00
36ef9f961d Trying to make kataster renumbering easier 2024-06-08 13:30:39 +03:00
f156b89f32 New cave renumbering 2023 kataster 2024-06-08 13:09:53 +03:00
efbb5b1b97 update number of log entries 2024-06-08 13:09:30 +03:00
76f5ca3f45 Where JS is put 2024-05-09 21:07:52 +03:00
1874a755a9 error message for new person pre database reset 2024-04-21 20:26:27 +01:00
Wookey
b8d5ce2542 Update for bulseye 2024-04-21 00:01:49 +01:00
Wookey
77fafc378e Update server requirements for bullseye 2024-04-21 00:00:21 +01:00
af414396d6 matching fix for db import to match folklist parser 2024-04-20 12:05:05 +01:00
dfdf21459a fix current year in top menu 2024-04-10 23:25:13 +01:00
b73ac24a3b infinite loop bug fixed 2024-04-10 21:23:52 +01:00
65f0c1e29f preventing _edit_edit_edit* loops by bots 2024-04-10 20:24:29 +01:00
Expo on server
2743be281e WHy are these files not committed ont he server? Philip 2024-04-06 15:27:30 +01:00
8bafe9be98 maybe ARGE 2024-03-16 19:45:56 +00:00
a0ef426cdb fix year in menu for older survexfiles 2024-03-15 16:37:30 +00:00
5dfaa893ad make missing Expo work if mroe than one year skipped 2024-03-15 15:26:32 +00:00
5523c7a484 update menu to show 2024 or whatever it can 2024-03-15 13:55:40 +00:00
e2d7ab4416 detect missing current expo on expo page 2024-03-15 12:49:01 +00:00
dbfe72071e auto git auto created files 2024-03-15 02:16:33 +00:00
d970942f04 auto new year stuff 2024-03-15 01:50:34 +00:00
e1eb85969a next year auto for wallets 2024-03-14 23:59:39 +00:00
4c8a88d20c more base.html automation 2024-03-14 21:35:58 +00:00
b3490aa52d current year auto 2024-03-14 19:53:01 +00:00
7325d934f9 initial / inserted on {{cave.url}} 2024-03-09 17:28:03 +00:00
83920e4d83 new menu item 2024-03-05 23:47:28 +00:00
e9255a2cb5 new menu item 2024-03-05 23:42:23 +00:00
abfa5b2757 p12d5 working 2024-02-21 01:26:55 +00:00
5948db2555 trying python v 3.12 2024-02-21 01:04:54 +00:00
a61751e1fb remove // in URLs 2024-02-06 18:52:46 +00:00
422d2324e8 fix bad url in logbookentry 2024-02-06 16:59:25 +00:00
957002507c Replace Charfield with TextField 2024-02-05 22:33:09 +00:00
18a8fcbfb5 restore crash to try to debug 2024-02-05 22:16:51 +00:00
478f8b9ea1 atomic 2024-02-05 21:39:21 +00:00
974b91d939 exceptio 2024-02-05 21:38:23 +00:00
e46cbe5d41 dataerror 2024-02-05 21:36:56 +00:00
f26c9d1ff2 suppress DataError exception 2024-02-05 21:32:34 +00:00
c518fbc5af more fix 2024-02-05 21:27:04 +00:00
1b44bc2867 typo 2024-02-05 21:22:47 +00:00
00ce42c1cf typo 2024-02-05 21:21:21 +00:00
c72efe1326 trying to debug crashing db 2024-02-05 21:18:40 +00:00
1e00e56522 check for non-existent expo 2024-02-05 20:02:03 +00:00
1c19211c33 Copilot tests automatically written 2023-12-31 12:51:09 +00:00
96b034d026 enhancing list of wallets on cave description page 2023-12-23 18:37:20 +00:00
ebfab4da45 add comment to wallets 2023-12-23 16:46:48 +00:00
8fd09bef92 python 3.12 discovered syntax issues 2023-11-23 18:46:44 +00:00
521fd20e37 Remove unused fossils incompatible with Django 5 2023-11-23 18:17:33 +00:00
480b98a704 comment 2023-11-23 18:04:04 +00:00
3158bfb746 venv updates 2023-11-23 18:03:57 +00:00
857b4c5809 repairing tests 2023-11-23 11:19:05 +00:00
32e487eca6 still working on tests 2023-11-22 18:58:19 +00:00
a63f04d194 fix tests 2023-11-22 18:14:00 +00:00
80c19864ad trying to make it work with xubuntu 22.04 2023-11-22 17:38:52 +00:00
Your Name
c0e35e964b more raw strings 2023-11-22 17:09:22 +00:00
Your Name
e1945feef5 fix raw string 2023-11-22 17:05:01 +00:00
Your Name
b191678570 working on django 5 2023-11-22 16:54:49 +00:00
Your Name
ab1212dd8a make tests work 2023-11-22 16:54:38 +00:00
bd81bd0b01 Made kataster_status field invisible. 2023-11-20 19:27:09 +00:00
740a5a4fa8 Working on removing 'katatser status' field 2023-11-20 19:04:42 +00:00
7c7c0812e8 removing unused fields 2023-11-18 14:17:50 +00:00
7a61bc47ea Make 'bearings' a read-only field on entrances 2023-11-18 13:27:08 +00:00
76688695b8 srtm altitude parsing 2023-11-18 12:38:07 +00:00
688a1795e7 Removing cave field underground_centre_line 2023-11-17 21:41:07 +02:00
026d959aeb Detecting data in field on cave 2023-11-17 21:26:26 +02:00
d333ebe88e url code commented out 2023-11-17 18:30:00 +02:00
ddf88d5394 make robust against None value 2023-11-17 13:03:48 +02:00
41e64a217c working regex 2023-11-17 12:53:05 +02:00
5961175193 found why regex is not finding ; comment, to fix 2023-11-16 10:27:06 +02:00
e1c9de14ca trying to find srtm *fix stations 2023-11-16 08:49:18 +02:00
7b67eb52dc re-enable /map/tools/ 2023-11-14 19:43:49 +02:00
680477d2d5 better error msg 2023-11-14 18:01:44 +02:00
6bc0884d43 better labels on forms 2023-11-14 15:55:11 +02:00
d2ee32d3e6 fixing side effects of the new cave url scheme 2023-11-12 01:23:20 +02:00
699c19245a regenerating .pos file more carefully 2023-11-11 14:36:03 +02:00
7fb0f0734d re-located *fix in different area 2023-11-10 15:34:13 +02:00
2761fb5867 tidy up more 'url' fossils 2023-11-10 15:33:39 +02:00
0c1601e1b0 beter(?) git error reporting 2023-11-10 15:33:04 +02:00
08c56644eb Make maps an 'unvarnished' url 2023-11-08 22:53:30 +02:00
ca289afe68 fix headers & | safe 2023-11-08 15:43:19 +02:00
717ef2fad9 headings 2023-11-08 15:34:36 +02:00
d5900b6b7a no longer use expowebcache 2023-11-08 15:28:22 +02:00
Expo on server
29e16b66b7 Table sorting. 2023-11-08 13:05:57 +00:00
Expo on server
51cf09ece7 Add comments about units and datum. 2023-11-08 12:55:55 +00:00
dec7acaf14 move text 2023-11-08 14:39:32 +02:00
9bc94f59b5 remove last url field niggle from cave_data 2023-11-08 02:49:57 +02:00
2215464cfa fix error on first creating new ent 2023-11-08 02:12:37 +02:00
b5cc66a576 ent and cave templates 2023-11-08 02:12:21 +02:00
1e8a5bea6e ent.url removed and entrance edit path simplified 2023-11-07 23:23:15 +02:00
1ba37665b5 <p> now OK in logbook entries 2023-11-07 23:20:59 +02:00
3f94955883 Fix .3d filename 2023-11-07 18:37:52 +02:00
5652b9b66a Javascript how it is. 2023-11-07 18:35:21 +02:00
07d9365747 fixed many problems in creating new entrances 2023-11-07 02:12:57 +02:00
bd0a9332df pending entrance locations 2023-11-05 22:59:23 +02:00
df79bdb711 fine tuning search for SRTM point 2023-11-05 22:59:02 +02:00
c0687615a4 bugfix and ongoing issue 2023-11-05 21:59:01 +02:00
2c67351424 bugfix and making more robust 2023-11-05 15:20:45 +02:00
d524f94c47 more stations 2023-11-05 02:24:37 +02:00
3c62defdfd fixes and bugfix 2023-11-04 18:28:14 +02:00
a63275f913 do NOT inherit *date between *include files - policy decision 2023-11-04 18:27:41 +02:00
55bbccb4ca add link to exact logbookentry page 2023-11-04 10:40:46 +02:00
70c629f455 downgrade error to warning 2023-11-04 01:53:10 +02:00
6630877b02 making the #00 wallet a catch-all and no complaining 2023-11-03 21:56:10 +02:00
99b87f808c make cave url canonical form 2023-11-03 16:54:57 +02:00
f78c719fd7 remove unneeded table 2023-11-03 16:54:44 +02:00
fc60bde3ec comments and tidy 2023-11-03 16:54:29 +02:00
c7cb8ece2e comments trying to understand.. 2023-11-02 21:05:08 +02:00
685131a4c1 tidied tables of stations and entrances 2023-11-02 19:24:07 +02:00
c95e6e8097 better display 2023-11-02 01:22:08 +02:00
cc4a7f04da improves stations srtm report 2023-11-02 01:05:36 +02:00
742ccb5f0b update tests for page name change 2023-11-02 00:02:21 +02:00
62de8095d8 lat long in italics 2023-10-27 22:44:44 +03:00
84e0b4fe3f SRTM on all stations report 2023-10-27 22:28:10 +03:00
f706bd814e add SRTM alts 2023-10-27 22:23:03 +03:00
97bb1a3ad1 comment corrections 2023-10-27 22:13:32 +03:00
788de853dc ported radosts SRTM altitude tool 2023-10-27 22:13:14 +03:00
7672de2dd1 more fixing bad *ref and null dates on blocks 2023-10-26 22:46:16 +03:00
87d9804864 findng variant data on survexblocks and setting wallet *ref 2023-10-26 18:28:59 +03:00
f14bd984f8 extract more into ARGE pending cave pages 2023-10-25 22:35:51 +03:00
0843a27966 Revised (faster, less brain damaged) wallet pages 2023-10-25 01:56:30 +03:00
33477f2b40 refactoring duplicate code 2023-10-23 22:54:46 +03:00
b522899216 remove print stmts 2023-10-23 20:54:38 +03:00
c8c21fbe04 JSON cache per python instance - working 2023-10-23 20:50:28 +03:00
1694d01536 before big revision to wallet model code 2023-10-23 20:24:05 +03:00
2b96086535 caves->wallets at parse time 2023-10-23 03:24:34 +03:00
54ffab3e93 checking wallets earlier int he process 2023-10-23 02:32:44 +03:00
8f87e4f77a bugfix - hack 2023-10-22 21:28:38 +03:00
1641dfe5f1 tidy with new multicave wallets 2023-10-21 22:31:33 +03:00
e7a0c57330 wallets & caves now many:many 2023-10-21 16:22:20 +03:00
24029be7d3 wookeys new not-scan files 2023-10-21 12:39:47 +03:00
850e87b97a fix because of format change 2023-10-21 12:39:02 +03:00
dfd8f4a453 instrucitons 2023-10-20 18:06:19 +03:00
8c7d4f8ebb photo map more 2023-10-20 14:01:54 +03:00
423347dbe5 cope with bad exif error 2023-10-20 14:00:38 +03:00
a823a7b2d8 New geocoding photos 2023-10-20 00:36:15 +03:00
0874ca38f4 to do 2023-10-19 18:37:27 +03:00
c4da7f6fa7 italics for 'official name' 2023-10-19 18:33:39 +03:00
9b96c4c745 scanning photos for GPS datat 2023-10-19 18:33:20 +03:00
c1d14ea49d aliases update 2023-10-19 01:01:28 +03:00
c0e4bee26b still trying to find why 78d is duplicated 2023-10-18 00:42:50 +03:00
1cbbdad1b3 trying to fin dup entrance bug 2023-10-18 00:19:17 +03:00
de298748e3 aliases of refound caves 2023-10-16 22:47:28 +03:00
0762d53c18 bug fix 2023-10-16 19:03:54 +03:00
bf8bf7b3d2 bug in getting cave slug 2023-10-16 13:35:56 +03:00
6b94829315 bug in pending caves parsing 2023-10-16 13:35:36 +03:00
d88ae2f78c corrected message 2023-10-15 18:43:15 +03:00
a786f4813f tidying 2023-10-15 18:39:00 +03:00
c51c2326fe Better standard entrances report 2023-10-15 01:11:21 +03:00
5d383e0445 fix bug in <p> removal 2023-10-14 02:05:25 +03:00
5cfc237448 minor updates 2023-10-14 00:17:57 +03:00
bf8d881770 Edit entrance form explanation text 2023-10-12 16:13:28 +03:00
246fb29193 more easting northing removal 2023-10-12 01:26:33 +03:00
d3a7a9823a remove exact station 2023-10-12 00:58:20 +03:00
3b1fd56fe4 REMOVED northing and easting fields 2023-10-12 00:25:24 +03:00
a2bddaeb89 tooling to check unevidenced locations 2023-10-11 23:26:41 +03:00
0cd527761e easting first, then northing: always 2023-10-11 20:53:41 +03:00
7e1c8797b8 fix edit entrance bug 2023-10-11 17:02:11 +03:00
2452fe5752 extra message 2023-10-11 15:05:58 +03:00
d34c2c50d7 comments in pages 2023-10-11 01:38:41 +03:00
d6a3006444 x/y distances between explicit data and survey points 2023-10-11 01:03:28 +03:00
973f9bedd5 WSL useful script 2023-10-10 20:03:05 +03:00
12293e4513 add alias 2023-10-10 14:31:17 +03:00
67136e9881 href to OSM on located stations 2023-10-10 12:41:52 +03:00
eed031cf71 1623-114 alias 2023-10-10 12:41:32 +03:00
0151626c0b added popup text for triangkles 2023-10-08 00:15:16 +03:00
31461531fc add 1624 caves 2023-10-08 00:06:12 +03:00
152156227d remove print statements 2023-10-07 23:42:04 +03:00
7c0187c75b Black triangles on cave index 2023-10-07 19:41:25 +03:00
5f67af35f0 Better tag locations 2023-10-07 02:26:52 +03:00
c3642f1ae4 More entrance data on report 2023-10-07 02:24:41 +03:00
2f3827d60e Display * triangle caves with no ent or survex 2023-10-06 17:01:48 +03:00
dfdbba6550 Orange &#x25B2; for caves with no Entranes 2023-10-06 14:57:41 +03:00
0a72e50c90 tests now do all work, honest 2023-10-05 15:36:04 +03:00
207513b8b5 tests now work again 2023-10-05 15:33:01 +03:00
ed993761a1 clean up small errors and debugging 2023-10-05 14:45:46 +03:00
fcfa59cdf7 Make people listed in wallets url-linkable 2023-10-05 14:11:05 +03:00
eae919e5b2 Digging out failed name recognition 2023-10-04 23:34:36 +03:00
6950fc1d1d make wgs84 location visible on cave descritpion page (if present) 2023-10-04 22:23:52 +03:00
adbc8f7955 disambiguating names on wallets 2023-10-04 22:23:26 +03:00
da10605d75 show WGS84 lat/long of entrances on the Cave page, ideally a link to OSM too? 2023-10-04 20:25:36 +03:00
bc621efc36 wallets-per-person now finding non-survex wallets 2023-10-04 18:22:54 +03:00
9f4306e367 FIx bad hard-wired links 2023-10-04 13:24:39 +03:00
21e0700b8d CLean up accented names display 2023-10-04 13:05:33 +03:00
ad2d25ed00 remove first attempts are fixing this stuff 2023-10-04 12:17:04 +03:00
f161ed3cf4 fixing accented names 2023-10-01 17:53:25 +03:00
d8aad0ba2b All working except floklist script 2023-10-01 16:10:17 +03:00
7b8703dadc part-way though converting to slugs for people 2023-10-01 15:55:28 +03:00
16d3ee9f92 Rename lookupAttribs and nonLookupAttribs + add slug to Person 2023-10-01 12:42:47 +03:00
fd94909ee7 removed fossil URL_ROOT from active code 2023-10-01 12:21:34 +03:00
c80db1a55f added caves URL table at end of report 2023-09-30 22:28:43 +03:00
c884156889 fixed duplicate paths to same page 2023-09-30 22:09:18 +03:00
8dcae6437e Comments chnaged to be more accurate 2023-09-30 20:35:40 +03:00
904b6309cf First attempts at reforming the FirstnameSurname parsing 2023-09-29 22:00:10 +03:00
a67a97b9fc red * 2023-09-28 01:23:18 +03:00
e98c63f51c Fix odd glitches in cave parsing 2023-09-28 01:01:32 +03:00
7f9f598f11 comment updates 2023-09-27 21:44:04 +03:00
421b47c137 bugfix 2023-09-27 21:43:35 +03:00
0d5297f08c lat/long values now persistent on Entrances 2023-09-27 00:38:07 +03:00
9aad95bfd0 Mark caves with no survex files 2023-09-26 22:16:19 +03:00
505eb6475e pending caves aliases stuff 2023-09-26 19:44:06 +03:00
51dbf5e9e6 setting up fresh venv 2023-09-26 18:32:11 +03:00
98e7cf6d1b test stuff for Django 5.0a (alpha) 2023-09-26 15:20:59 +03:00
d6eadeffd6 Add digital file reminder 2023-09-26 01:40:34 +03:00
cf6ba7568f Check the url field too 2023-09-26 01:26:50 +03:00
d4cf76da40 slightly cleaning up slug/areacode/unofficial_number mess 2023-09-26 01:10:50 +03:00
f10db6d73d clean up ignore lists for survex files 2023-09-25 20:57:25 +03:00
18e1775cff fix for eastings page test 2023-09-23 01:45:38 +03:00
85dba41601 better text 2023-09-23 01:37:53 +03:00
9c05cb6af0 rotatable images & text 2023-09-23 00:48:35 +03:00
017f916ef9 Entrance locations showing lat long screwups 2023-09-16 22:46:17 +03:00
a85f859f88 add WGS84 lat/long entrance locations 2023-09-16 21:12:49 +03:00
81b5198cd1 fix code so tests work 2023-09-16 19:53:39 +03:00
9db0b2a191 recognise old cave id codes in old wallets "1623-" 2023-09-16 13:53:05 +03:00
a8d4b05617 finding the right survex file for a cave 2023-09-15 22:41:40 +03:00
3390f17aa4 .3d cave file links 2023-09-15 22:41:02 +03:00
29879fdde2 fix comment 2023-09-15 10:20:01 +02:00
7ddf7fe373 1624 arge caves 2023-09-14 15:29:00 +03:00
1effc10e3f tidyup of image rotate 2023-09-14 15:08:10 +03:00
85487efee3 debug mogrify 2023-09-14 14:24:36 +03:00
db3d1ff4ef ROTATE image option 2023-09-14 14:15:16 +03:00
1085a14b92 comments 2023-09-14 13:40:33 +03:00
0295fce110 logic rearranged 2023-09-14 13:40:19 +03:00
724989f985 prompt text 2023-09-13 18:57:35 +03:00
70dd61b2ba sanitize filenames 2023-09-13 18:46:10 +03:00
33a485d207 notable caves fix 2023-09-13 18:45:59 +03:00
af136d3432 fixes 2023-09-11 22:42:12 +03:00
d323ff2700 debugging Cave page links.. 2023-09-11 20:38:14 +03:00
47db19f1a2 formatting 2023-09-10 17:28:13 +03:00
9d6552ea22 ARGE caves, fixed bug in non-numeric ids 2023-09-10 16:35:00 +03:00
2f6017d6d3 testsuite passes - Area removed 2023-09-10 15:55:01 +03:00
ab79a43afa Removed class Area, use Cave.areacode Cave.subarea 2023-09-10 15:42:36 +03:00
ad272fab3b Now creating ARGE caves properly 2023-09-10 13:44:06 +03:00
327b1923b0 Cleaning auto Cave creation from survex file detection 2023-09-10 02:06:38 +03:00
54136721b8 fix for survex file url 2023-09-09 23:03:37 +03:00
5a191ee554 Big refactor of cave lookuo & creation. Works. 2023-09-08 19:51:04 +03:00
7779544c0c refactoring cave id stuff in survex parser - working 2023-09-08 18:35:47 +03:00
28d1092956 Removing unneeded svx from parse list 2023-09-08 01:26:01 +03:00
5fc5c1285a bugfix - bad variable 2023-09-07 21:47:40 +03:00
e1aabc84e8 url bugfix 2023-09-07 21:47:15 +03:00
8b76cad15a EPOCH = 1970-01-01 2023-09-07 21:47:02 +03:00
1631111a7f page title chnaged 2023-09-07 21:44:52 +03:00
335ffb360d /drawings 2023-09-07 21:40:39 +03:00
6d5cee7f6a tidy 2023-09-07 00:42:26 +03:00
6b64149131 cleaned out unused code 2023-09-07 00:27:38 +03:00
2c5ebde308 Survex directories report tidied 2023-09-07 00:01:03 +03:00
69340db438 SurvexDirectory removed from active code 2023-09-06 22:58:14 +03:00
1ddb8248df SUrvexDirectory no longer necessary 2023-09-06 21:38:45 +03:00
0dc0e27519 moving primary survex file to each survexfile 2023-09-06 17:19:20 +03:00
3c6cae20ed fix link to cave_edit 2023-09-06 13:32:36 +03:00
83d058221d Fixed survex file list for one or more caves 2023-09-06 13:20:29 +03:00
38d0e855c9 Working on survexdirectory removals.. 2023-09-05 23:43:07 +03:00
cc9f425fb5 Ongoing work to remove SurvexDirectory as a concept 2023-09-05 23:14:48 +03:00
8c721e905a New SurvexDirectory report 2023-09-05 21:46:10 +03:00
8e2990ca7a validate year in logbook entry form 2023-09-05 17:19:09 +03:00
220e1327d7 validate author of trip on editing 2023-09-05 15:49:12 +03:00
0ea8fadaeb moer people/logbook improvements 2023-09-05 14:35:56 +03:00
f3d5a389eb hide warning msgs about pre 1999 wallets 2023-09-05 13:29:49 +03:00
2506517e17 Keeping *person and guests such as Karl in the list 2023-09-04 20:12:09 +03:00
ac128705f6 Keep nicknames, not full names, in lbes 2023-09-04 19:30:29 +03:00
d3ac321d38 fix bugs on reload of logbook 2023-09-04 18:56:32 +03:00
a5dc78b04d 30 valid 1979 logbook entries 2023-09-04 16:35:59 +03:00
a2e30b29ef 1979 logbook enabled 2023-09-04 16:16:58 +03:00
f53b551d5a add data upload prompt 2023-09-04 00:49:51 +03:00
3a04a8490e debugged lbe edit tests 2023-09-04 00:25:35 +03:00
2c89cdc1b9 login fix for protected pages in tests 2023-09-03 23:28:36 +03:00
101910a957 fix link 2023-09-03 00:05:35 +03:00
eb7a1efea5 Path seems newly fragile re int rather than str 2023-09-02 19:43:50 +03:00
a4f676fd32 bugfixing 2023-09-02 19:23:22 +03:00
1a8bc17f80 Fixed parsers 2023-09-02 17:49:37 +03:00
c9729c046c Adding field to logbookentry 2023-09-02 14:49:43 +03:00
34064972e9 Still one test failing when it shouldnt 2023-09-01 21:50:03 +03:00
5a7eda0968 new test for lbe 2023-09-01 21:35:26 +03:00
98bc6007a5 fix tests to match code chnages 2023-09-01 21:14:19 +03:00
33a08bed4f bugfix and remove swapped order for title/people 2023-09-01 20:57:23 +03:00
98412c140d more robust tripid labelling 2023-09-01 20:31:19 +03:00
1cf02afec9 add tempest nickname 2023-09-01 19:34:05 +03:00
9380f751b2 Inelegances fixes 2023-09-01 19:09:57 +03:00
e209a9bb37 bugfix, name[0] may not exist 2023-08-31 19:17:44 +03:00
2dc8faee35 URL to edit entry in logbook 2023-08-31 19:08:16 +03:00
c29c12ea76 Edit Logbook Entry mostly working 2023-08-31 18:55:20 +03:00
bbb821e2f9 error message prepare 2023-08-31 00:34:48 +03:00
069a1d57c9 Parser fixed to work on 2023 UKcaving blog 2023-08-31 00:09:02 +03:00
df86103407 cosmetic 2023-08-30 21:29:51 +03:00
d48163f167 update comment 2023-08-30 21:17:25 +03:00
f23ea0ce4b edits today mean test needs fixing 2023-08-26 18:53:15 +03:00
d08a6aa204 Nicknames preserved, date checked 2023-08-26 18:39:29 +03:00
93397a774f fix _edit access loophole 2023-08-25 22:08:04 +03:00
f2a76da7e2 fix error in test suite when full reset has not been done 2023-08-25 21:49:05 +03:00
3d51588cc1 update test to match code 2023-08-11 07:43:47 +03:00
c44dea4d2b More comment, to-do 2023-08-10 23:36:56 +03:00
24b5018c8d re-order display 2023-08-10 23:28:05 +03:00
d3c1736119 extending logbook entry edit 2023-08-10 23:17:03 +03:00
da8e22c856 more 2023-08-08 19:24:18 +03:00
741754e676 some input validation 2023-08-08 19:23:55 +03:00
c2ae586e5b Tom <=>Thomas 2023-08-08 18:23:32 +03:00
a4f84f0812 better placeholdering 2023-08-08 01:27:20 +03:00
9e9c24ad44 better placeholder/value setting 2023-08-08 01:17:36 +03:00
b1a5251768 Format new logbook entry 2023-08-08 00:43:12 +03:00
0b7a9cf03e suppress pointless msg 2023-08-07 23:51:35 +03:00
eec0426612 Cope with ARGE people 2023-08-07 23:10:30 +03:00
65936bdce5 duplicate removed, number fixed 2023-08-07 22:10:40 +03:00
f949d3732e extras 2023-08-06 14:06:45 +03:00
9269d1ec52 Logbook entry initial form 2023-08-06 13:47:09 +03:00
1baf528d0a better msg 2023-08-05 23:30:46 +03:00
99ff7c741b bug fix for server 2023-08-05 18:54:20 +03:00
12aa6ced86 length of unreference cave survey added 2023-08-05 14:15:35 +03:00
ee5a2c9ef8 slash 2023-08-05 13:26:55 +03:00
126aaa0633 add url to wallets 2023-08-05 13:14:45 +03:00
68409c70fd explanations 2023-08-05 13:04:23 +03:00
33026ca9ea who to blame 2023-08-05 12:57:38 +03:00
7df2d44748 wild survex file report 2023-08-05 12:43:06 +03:00
b709dd2f1b filename correction 2023-08-05 01:26:50 +03:00
51298786c3 debugging entrance creation, single ent works 2023-08-04 23:33:49 +03:00
1375b34cbe bugfix2 2023-08-04 16:17:52 +03:00
2c74a7317d bugfix 2023-08-04 16:11:35 +03:00
c8430d1ff7 more correct error message 2023-08-04 16:08:07 +03:00
3b9a2b990d bugfix 2023-08-04 10:29:20 +03:00
2c509d085e allow editing ent letter if blank on many ent caves 2023-08-04 09:29:25 +03:00
bed663a031 trying to enable eidting of blank letter for entrance 2023-08-04 09:08:18 +03:00
e101f4ed2f trying to isolate bug in letter setting on ents 2023-08-03 16:11:46 +03:00
0dfe9d94b2 update pendingcaves only on local dev machine 2023-08-03 12:06:35 +03:00
0efdfe66d5 recover from missing letter field 2023-08-03 11:48:03 +03:00
a0f85454f8 detecting orphan cave ids and adding to pending list 2023-08-02 18:23:04 +03:00
c76c09fced remove excess prints 2023-08-02 15:48:36 +03:00
efa40b47ca change of id for this class of data issue 2023-08-02 15:47:24 +03:00
6bca75b877 NOEDIT fixed 2023-08-02 13:41:12 +03:00
585eb534a9 Entrance locations explanations 2023-08-02 10:17:48 +03:00
7fc058b1da return to correct wallet 2023-07-31 22:00:46 +03:00
8d9b320d89 filesize now shown 2023-07-31 16:16:43 +03:00
89c1c65340 hack wallet scan rename job 2023-07-31 15:49:54 +03:00
5f07f234ef electronic surveys still need notes 2023-07-29 18:21:07 +03:00
af6081e406 better sort order for issues 2023-07-29 18:11:19 +03:00
1165b10fe4 Clearer issues message 2023-07-29 17:21:27 +03:00
4a7c14f8dc remove unused page 2023-07-27 14:40:52 +03:00
955fe9661a fix for notice on edit cave form 2023-07-27 12:21:50 +03:00
d93133c338 ambiguous aliases removed more thoroughly 2023-07-27 00:38:47 +03:00
Martin Green
a86f251423 Fixed parsing and rendering of an entrances last visited field 2023-07-26 20:40:30 +01:00
6482aa697f helpful comments on form 2023-07-26 17:38:19 +03:00
0706d5dc77 fix entrqnce edit bug 2023-07-26 16:54:37 +03:00
cdac10fdcf <figure> forr folk bios 2023-07-26 15:03:26 +03:00
1f656b2101 properly turn off automagic entrance creation 2023-07-26 01:23:49 +03:00
fab7adf079 Cleaning up entrance importing robustly 2023-07-26 00:14:46 +03:00
72a6b091e6 make more robust 2023-07-25 22:14:13 +03:00
af552a3d62 better detect unknown cave identifer strings from users 2023-07-25 21:07:13 +03:00
5ce21564fc Remove unused field on survexstation class 2023-07-25 18:56:13 +03:00
7d4ca5dae2 Make robust against duplicate objects 2023-07-25 18:55:42 +03:00
3c78ab79ca better fix for variant date formats 2023-07-25 01:34:02 +03:00
748cb91a20 lengthen url field, i hope 2023-07-25 01:34:02 +03:00
Martin Green
8463f8947e Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-24 23:03:47 +01:00
Martin Green
380565c6f5 save connection between cave and entrances, before writing out the cavedata file 2023-07-24 23:03:12 +01:00
31c815eeb0 bugfix in error message 2023-07-24 17:33:39 +03:00
c31615b1ff clean up after Mark changed things a bit 2023-07-24 15:26:36 +03:00
3bd7684d4b formatting terminal o/p 2023-07-24 14:24:53 +03:00
64fa602a07 ignore /subsections/ files 2023-07-24 14:24:39 +03:00
9f2b77bf1d More compact parsing report to terminal 2023-07-24 13:14:42 +03:00
9473b22bd9 detect non-ISO dates in JSON and from user and fix 2023-07-23 23:30:19 +03:00
3ea014ec57 add new *team role 2023-07-23 22:01:01 +03:00
3ffb07371d warning message to people who have got here before they are ready, and link to docm 2023-07-22 22:26:50 +03:00
f76c22e843 moving dev configs to _deploy/ 2023-07-17 19:25:40 +03:00
33d279b95a rearrange variant debian, ubuntu dev environemnts 2023-07-17 19:05:22 +03:00
f8faf6c2ba updated build stuff 2023-07-17 19:00:56 +03:00
6e452b2ee9 current settings on server - sanitized 2023-07-17 17:40:29 +03:00
dc06744444 fix exception? 2023-07-14 11:26:47 +02:00
26e96839e4 stop crash onloading wallet with blank caveid 2023-07-14 11:22:48 +02:00
4e4824546a stop crash on live system 2023-07-14 11:21:49 +02:00
387bdf4f91 shorter msg 2023-07-14 11:20:57 +02:00
b650095588 calendar S T colour >10 per date 2023-07-14 11:13:06 +02:00
761a71930b hack to stop crash 2023-07-13 22:20:01 +02:00
127002d736 more entries 2023-07-13 21:36:48 +02:00
a062e9ea44 moving venv stuff to _deploy 2023-07-13 16:02:51 +02:00
Martin Green
380fe8cc32 Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-13 12:35:00 +02:00
Martin Green
bdb5e3208b Rotate and reflect images, as specified in EXIF whilst uploading 2023-07-13 12:34:52 +02:00
Martin Green
c119c99308 removed print statement 2023-07-13 12:33:55 +02:00
Martin Green
2af4f4b10e ignore javascript dir that should be downloaded from the deployment server 2023-07-13 12:27:13 +02:00
Expo laptop Crowley
a5968121a0 add DEPRECATed SURVEX FILES TO IGNORE LIST 2023-07-12 22:04:46 +02:00
5eb6ef4d31 more synonyms 2023-07-12 16:44:45 +02:00
Mark Shinwell
5f6359694d Update test to reflect change in loser repo 2023-07-12 14:12:40 +02:00
Martin Green
90a6eaa26d Updated requirements to match expo.survex.com 2023-07-10 17:42:29 +02:00
Martin Green
67361fa66c Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-10 17:00:56 +02:00
Martin Green
b27852c1f3 redirect to actual login page 2023-07-10 16:55:09 +02:00
Expo laptop Crowley
8ff438942d handle shortform months and days in svx file 2023-07-10 12:49:14 +02:00
Expo laptop Crowley
b3e2f34960 hack fix 2023-07-10 10:33:57 +02:00
Expo laptop Crowley
d0ccc46260 better test & msg 2023-07-10 10:03:23 +02:00
Expo laptop Crowley
5a7f197bcb hack to make server reset quickly 2023-07-10 09:24:11 +02:00
Expo laptop Crowley
389fb6c409 add month 2023-07-10 09:18:17 +02:00
Expo laptop Crowley
4d48dd4386 Logbook debugging 2023-07-09 11:30:50 +02:00
Expo on server
086537cb56 =Added string to caveslugs so admin interface works. Added explanation for the rational for cave slugs. 2023-07-08 23:45:32 +01:00
Expo on server
beab42323b Added CaveSlugs to Admin 2023-07-08 23:43:57 +01:00
Expo on server
3d43c0ec12 Allow for parent directories to be created when created photos. 2023-07-08 22:42:06 +01:00
b1c5b03104 link to 2023 in menus 2023-07-08 17:13:57 +01:00
Martin Green
68724a0504 Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-08 17:57:33 +02:00
Martin Green
3359889d97 Better attempt at creating a default url for caves created by svx files 2023-07-08 17:56:49 +02:00
2f24a7f7bb Barbie setup 2023-07-08 15:35:43 +01:00
Martin Green
66ee96cd63 Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-05 21:11:04 +01:00
Martin Green
ad37a82713 git comitting allowing files to be comitted in different directories. 2023-07-05 21:10:05 +01:00
Martin Green
ffed6e3ba6 convert uploaded images to RGB so that it can be saved as jpg 2023-07-05 21:08:51 +01:00
Expo laptop Crowley
7b8e93cdb5 menus and logbook 2023-07-05 21:54:25 +02:00
Expo laptop Crowley
4158f5ba63 add 2023 2023-07-05 20:17:08 +02:00
Martin Green
a70cf6cad3 Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-05 18:27:49 +01:00
Martin Green
63599cb27a Removed ability to add other caves entrances to a cave. 2023-07-05 18:22:08 +01:00
Martin Green
a0fcb78e95 Removed kataster area for unoffical numbers of pending caves. Added .html to urls of pending caves. 2023-07-05 18:21:15 +01:00
Expo laptop Crowley
745ccd7f88 Show when running locally 2023-07-05 19:05:07 +02:00
Martin Green
2b30b7b624 Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-05 17:45:21 +01:00
Martin Green
410a285085 Bug fixes to allow adding of a new cave. No longer ask users about filenames or urls. 2023-07-05 17:43:57 +01:00
Expo laptop Crowley
d2bcef6e36 Turn menu bar magenta if running on localserver 2023-07-05 18:35:40 +02:00
Martin Green
067fcd9892 Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-05 13:19:11 +01:00
Martin Green
c4095eb336 Have images saved to correct place, when edited in the cave or entrance view. etc 2023-07-05 13:18:02 +01:00
Expo laptop Crowley
020a083afa more fix 2023-07-05 13:09:49 +02:00
Expo laptop Crowley
fd9f21de2e more local fixups 2023-07-05 12:49:30 +02:00
Expo laptop Crowley
7268eb4f30 synch localsettings variants 2023-07-05 12:11:44 +02:00
Expo laptop Crowley
910e0e3123 updating requirements for testing 2023-07-05 11:22:31 +02:00
Expo laptop Crowley
7db17154ad ugh stage problem 2023-07-05 11:22:31 +02:00
Expo laptop Crowley
ebcc0db665 ugh stage problem 2023-07-05 11:22:31 +02:00
Expo on server
73675ca1b9 Radost fiux for narrow screens 2023-07-05 10:22:30 +01:00
Martin Green
973d05f9fb Modification to templates to make them more suitable on a stand alone website. 2023-07-03 21:35:00 +01:00
Martin Green
52299fb6fd Add links to entrances page 2023-07-03 09:32:34 +01:00
Martin Green
01964e7cf6 Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-07-03 08:06:45 +01:00
Martin Green
929f6732d0 Add some sort of orderinng 2023-07-03 08:04:26 +01:00
Martin Green
b91223da66 Add list of entrances 2023-07-03 08:00:03 +01:00
a04d9ef056 capitalisation fix 2023-06-28 20:37:06 +01:00
Martin Green
e4fe5eaf5d removed extranius bracket from html 2023-06-08 01:10:07 +01:00
Martin Green
c7494fe379 bug fix 2023-06-07 23:49:19 +01:00
Martin Green
e4112431be bug fix 2023-06-07 23:47:14 +01:00
Martin Green
65eec8e91d attempt to use {% url %} tag to point at 3d file for cave viewer 2023-06-07 23:44:44 +01:00
Martin Green
0b0f2f07e1 Try having caveviewer using same url as download link again 2023-06-07 23:25:25 +01:00
Martin Green
ee34f87563 Replaced cave viewer link to 3d file with the working orginal 2023-06-07 23:20:51 +01:00
Martin Green
e42f0569fd Made the sources of the 3d download files consistent 2023-06-07 23:19:08 +01:00
Martin Green
d242a8bb1d Try using url template command to link to 3d files 2023-06-07 23:08:28 +01:00
Martin Green
0cd32d6a15 See what breaks when put .3d on the end of urls for dowloading 3d files 2023-06-07 22:58:28 +01:00
Martin Green
fc9977952e Changed source of cave 3d files back. 2023-06-07 22:47:06 +01:00
Martin Green
56e9273047 changed source of 3d files for cave viewer, to see if it works better 2023-06-07 22:45:36 +01:00
Martin Green
12cee59605 Try not showing kataster codes if they are empty/None 2023-06-07 22:38:22 +01:00
Martin Green
90862e9a89 Add editlink classes for editing the entrances 2023-06-07 22:26:11 +01:00
Martin Green
ec3ebe8499 Fixed comments again 2023-06-07 22:21:41 +01:00
Martin Green
1ef636ca6f fixed broken commment tags 2023-06-07 22:19:12 +01:00
Martin Green
174d7bfe13 Commented out Kataster status. Chnaged Survey heading to Surveys and Rigging Guides. Moved explorers and references down the page. 2023-06-07 22:08:11 +01:00
Martin Green
4e34ae0530 Reordered cave description and survey. 2023-06-07 21:54:25 +01:00
Expo on server
f477507d27 Ignore Windows Zone.identifier files
Ignore all of media/jslib except the readme
2023-06-04 11:17:48 +01:00
969ed6cce5 added 1627 caves to 'caves'page 2023-05-20 22:47:09 +03:00
2e6b8d44f1 adding BS4 because of Martin's KML stuff 2023-05-20 21:47:14 +03:00
93201ab458 better layout to understand apache interactions 2023-05-20 21:36:05 +03:00
Martin Green
43724f1cf6 When reloading a cave, do so from cave.filename, rather than inorrectly assuming the cave is named after its slug 2023-05-08 23:09:15 +01:00
Martin Green
7d140af87a Do not rename caves when saving 2023-05-08 22:34:45 +01:00
Martin Green
77ed1b444c Hack to turn cave URL to absolute links, so they can work from anywhere on the website. 2023-05-08 22:32:49 +01:00
Martin Green
f7fca58c57 Start of creating kmz file, with entrance photos and links to expo.survex.com 2023-05-08 01:10:43 +01:00
Martin Green
ea7c29a54e Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2023-05-02 22:41:36 +01:00
Martin Green
0052385333 Add lat long to entrance locations on cave pages 2023-05-02 22:40:44 +01:00
7f0e7d8fa3 Ubuntu 22.04 + python3.11 2023-05-02 23:26:53 +03:00
Philip Sargent (laptop)
ef467ad481 Making the dummy entrance thing clear 2023-05-02 17:42:58 +03:00
Philip Sargent (laptop)
175307773b More fixes for laptop 2023-05-02 15:28:28 +03:00
Philip Sargent (laptop)
8e982bd6be Fixing new dev machine setup 2023-05-02 14:27:55 +03:00
Martin Green
783154d24a Restored check of git status after a committ, but only for the one file being committed 2023-05-01 22:06:48 +01:00
Philip Sargent (laptop)
40126f6e2f fixing laptop SNowWHite 2023-05-01 23:29:20 +03:00
Martin Green
1ccd9c418b template missing from last commit 2023-05-01 00:03:58 +01:00
Martin Green
896af43994 kml file output for google earth etc 2023-05-01 00:01:41 +01:00
Martin Green
2ee63a9804 If a cave is made with no entrances, redirect to a new entrance form for the cave 2023-04-30 21:42:03 +01:00
Martin Green
c7b3e8aff0 Added an ordering of entrances 2023-04-30 21:41:17 +01:00
Martin Green
c50236575f Dummy entrances were being written to a global variable, recording that they have a filename. But the filename was not written. This was then causing an exception when the user asked to edit a cave, leading to all entrances being reread. Obviously the dummy entrances file ould not be read.
PS. Do we really want to reread all entrances when we start editing a cave?
2023-04-30 21:06:57 +01:00
Martin Green
e8d1265ee4 Be more specific about what is being commited and do not check for unadded changes, and then through an error at the user, which they are unlikely to understand. 2023-04-30 21:04:05 +01:00
Martin Green
10ff8a5aab Fixed errors when creating new caves and entrances via the website. Moved slug logic to forms (previously checked in). This allows slug uniqueness to be validated in the form 2023-04-30 19:05:57 +01:00
Martin Green
941100a8a3 Previously if a cave was found without an entrance an entrance was added to the database. However as this was not also added as a file, the new entrance could not be edited via the web interface. Without an entrance being made, they can still be added. 2023-04-30 19:03:09 +01:00
Martin Green
374caa0d9a Fixeed spelling error in variable name 2023-04-30 19:01:07 +01:00
Martin Green
82aaa2b523 Improved cave form, layout text and validations 2023-04-30 19:00:22 +01:00
Martin Green
31a60ce85c For a cave, force users to enter are and have a unique URL. Cope better if area not defined 2023-04-30 18:58:41 +01:00
Martin Green
0a3a6934c4 Added some commented out lines for allowing for local development, where files are server from /usr/share/javascript or expofilescache 2023-04-30 18:54:53 +01:00
Martin Green
ed9f7b03bf Have entrance coordinates displayed to web pages. (Requires expo web entrance survey points to start with 1623 or 1626) 2023-04-30 00:59:58 +01:00
Expo on server
fc8584775e Get CaveView working again on cave pages. (v2.2.0)
Move caveView section back to bottom of page.
2023-04-29 23:35:18 +01:00
Martin Green
b7ec4f2efe python virtual library 2023-04-29 22:49:26 +01:00
Martin Green
0b566575f3 Change uploaded images to jpg to png, for much smaller files 2023-04-29 22:49:26 +01:00
Expo on server
73af227fb3 remove unused copy of CaveView in troggle and updated cave.html
template for caveview2
2023-04-29 22:46:14 +01:00
8aec40f951 todo 2023-04-22 23:27:06 +01:00
c5a9bdc724 xml parser attmpt retract 2023-04-22 23:15:50 +01:00
30ef427b90 refactor cave import 2023-04-22 22:05:12 +01:00
275adc8efa mistaken default fixed 2023-04-22 03:46:34 +01:00
02e46ed723 Remove uneeded print 2023-04-22 03:35:07 +01:00
94b8b357fb Fix entrance edit too, saving slug now 2023-04-22 03:26:53 +01:00
2ed66fe3d0 edit cave reads from HTML file not just db 2023-04-22 01:24:32 +01:00
116cfc7c6e bad tests. 2023-04-06 00:57:19 +01:00
f15555a3bd more tests 2023-04-06 00:51:04 +01:00
dcfff1ede7 tests for QM pages 2023-04-06 00:16:44 +01:00
0f76422d85 format change 2023-04-05 23:33:01 +01:00
d3d983eedb QM check-box report for open leads 2023-04-05 23:13:12 +01:00
2541766dd5 typo 2023-04-05 20:42:19 +01:00
e002a634ff remove obsolete setting, add PHOTOS_ROOT 2023-04-05 20:42:09 +01:00
489dd157b6 context processor documn link 2023-04-05 20:41:34 +01:00
0a76acd664 test checked 2023-04-05 12:46:10 +01:00
4d8cb82ef9 initial refactoring 2023-03-31 12:19:22 +01:00
9ffe3f690b tidy up entranceSlug all now deleted 2023-03-28 20:30:00 +01:00
e7d9e9402a bugfixes 2023-03-28 20:05:38 +01:00
3ef5c1aa0b add FLUSH command 2023-03-28 19:51:20 +01:00
9a28e93ac6 EntranceSlug removed from data model. 2023-03-28 19:26:37 +01:00
5738da8566 cached_slug str now a .slug field & pending fixed 2023-03-28 19:08:05 +01:00
bbc13c4eb9 remove 'primary' concept from entrance slugs. tested. 2023-03-28 17:08:55 +01:00
6ca5d5bfa8 debug ent report 2023-03-28 15:37:25 +01:00
2091eb8e8b remove unused versionControlForm 2023-03-28 14:19:06 +01:00
860ce6b065 Creates new cave from survex file upload 2023-03-24 00:54:26 +00:00
8b5887a87a Allows creation of new svxfile with unknown cave 2023-03-23 21:26:16 +00:00
770edd6391 Survex editor now parses edited files 2023-03-23 19:05:25 +00:00
562ef48f19 re-parsing survex file when editing 2023-03-23 01:17:38 +00:00
70d6d9eb77 error msgs improved 2023-03-22 23:30:05 +00:00
2332bfdc57 comment to resolve confusion 2023-03-22 23:29:40 +00:00
1db7c5ffea change on_delete to cascade for blocks in a file 2023-03-22 23:29:12 +00:00
838b358a4a chnage template comment 2023-03-22 23:28:26 +00:00
dd32114698 delete test upload file after test 2023-03-22 17:57:48 +00:00
5f46d8fdc5 Fix bugs 2023-03-22 15:18:16 +00:00
ad48851118 re-enable login restriction on wallet create 2023-03-22 15:04:34 +00:00
ead3f8dc8b fix broken tick-lists in wallets 2023-03-21 18:23:07 +00:00
6b3cb9f02e samedate for all wallets on wallet edit form 2023-03-21 14:56:34 +00:00
435f3cf00b fixed url glitch, added parent url 2023-03-21 14:29:15 +00:00
7caf1690c6 fix download .3d file 2023-03-21 12:56:51 +00:00
4ae79a642e Report format clean-up 2023-03-19 19:12:09 +00:00
9489b9209d obviate meaningless error messages 2023-03-18 20:32:35 +00:00
5a90e7b727 fix more twiddly variations of QMs 2023-03-18 03:03:06 +00:00
d64948749e more QMs parsed correctly 2023-03-18 00:57:40 +00:00
7345e3a328 Much QM re-engineering 2023-03-17 20:01:52 +00:00
de54576d11 Fix QMs reports, remove V grade 2023-03-17 14:33:30 +00:00
12c7b9b5d1 + ? grades 2023-03-16 21:55:14 +00:00
c40b56844f TICK shown 2023-03-16 21:38:03 +00:00
09f5741b71 cleaner formatting 2023-03-16 21:31:09 +00:00
17fa306b09 More QM fields in JSON export 2023-03-16 21:26:31 +00:00
3011e7b114 Adding QM JSON export 2023-03-16 21:06:52 +00:00
98066591da More archaic URLs re-enabled 2023-03-15 14:22:21 +00:00
56c78611fb enable /smkridge/ as /1623/ url 2023-03-15 13:58:09 +00:00
a7660c8ec7 QM report updating 2023-03-14 16:11:37 +00:00
934a19b879 updated .svx template 2023-03-14 16:10:57 +00:00
c247636c4c Working on QMn TICK lines again 2023-03-14 03:27:05 +00:00
85fab88ac9 Fixing inherited *date into sub-blocks 2023-03-14 02:12:28 +00:00
b428a87f1a Better debug messages 2023-03-13 20:27:27 +00:00
d0a05af9c6 Now inheriting *date from parent survexblock 2023-03-13 19:44:39 +00:00
83dc9e6c09 Move code closer to related code 2023-03-13 19:01:30 +00:00
7aeffff00c Better error msgs for poorly formatted QMs 2023-03-13 16:31:42 +00:00
94dd0fe1fd documn. url reverse() tests 2023-03-12 23:40:11 +00:00
45fcaac47d test revers() function 2023-03-12 16:21:31 +00:00
35e9eb558d Identified survey length discrepencies 2023-03-12 01:09:17 +00:00
b88b142332 fixing bad splay detection 2023-03-12 00:35:37 +00:00
870b290726 add station to QM report 2023-03-11 21:14:35 +00:00
7b10aa0bdf WSL1 on thinkpad 2023-03-11 17:58:58 +00:00
4d66548920 Fix URL to survex file in menus 2023-03-11 00:47:13 +00:00
7c923842ca more comment into generated file 2023-03-11 00:11:56 +00:00
02970512c1 link to 204 wallets 2023-03-08 22:42:02 +00:00
2c36666d41 tidy test fior git clean 2023-03-08 18:29:14 +00:00
b3d9eeecd2 fixing paths in settings to be Path() not str() 2023-03-08 18:24:57 +00:00
301fa1fce1 re-enable lookup() on survexblock objects (again) 2023-03-08 18:02:00 +00:00
e71939fe00 restore lookup() function 2023-03-06 22:30:36 +00:00
859a28b4ee 1979 logbook parsing now works 2023-03-06 22:30:07 +00:00
432759bfc1 Import new survexfile ONLY 2023-03-06 16:37:54 +00:00
94e145adce CASCADE fixes in data model 2023-03-06 16:37:38 +00:00
ccfc44a423 Saving new survex file parses contents. 2023-03-06 04:52:41 +00:00
8f3b329552 obscure bug empty directory inside empty directory 2023-03-05 23:55:00 +00:00
63dde36389 100th test 2023-03-05 23:17:11 +00:00
8fc25de794 Initial attempts at saving edited survex file 2023-03-05 23:06:06 +00:00
d5887e8f99 bloody bugs 2023-03-05 19:53:12 +00:00
b086348d38 Bugfixes for new survex file 2023-03-05 19:09:28 +00:00
4a2106183a Bugfix for new survex file 2023-03-05 18:20:18 +00:00
06ac840dd0 Needed for django 4.2 admin pages 2023-03-05 17:46:01 +00:00
6ab7a340e2 Now 99 tests 2023-03-03 15:15:17 +00:00
1cb81cbb09 Duplicate survex files in lists all done properly 2023-02-28 18:52:04 +00:00
e8c824a396 More names in cross-references 2023-02-28 17:41:15 +00:00
dc03016dbe clean up de-duplication code 2023-02-28 16:18:29 +00:00
5067ef2c8c reformat template fragment 2023-02-28 16:18:13 +00:00
5c3927c25d all working, queries improved, date-ordered. 2023-02-27 22:23:24 +00:00
154722f765 logbook trips, and some wallets working. 2023-02-27 19:14:08 +00:00
6387de038b get events on same date.progress. 2023-02-27 16:42:08 +00:00
6de4fa66a2 Initial add of On This Day links to svx file page 2023-02-26 22:13:37 +00:00
394d94d5d6 Extended test 2023-02-24 23:12:44 +00:00
a3fc9a17ed New tests for parsing logbooks 2023-02-24 22:55:18 +00:00
3d38611e4f new test for logbook 2023-02-24 20:21:06 +00:00
d1dac92034 Now using HTTP status codes properly 2023-02-24 17:38:06 +00:00
bc9306fc1b str() needed with python 3.11.0rc1 & added try/execept 2023-02-24 17:21:56 +00:00
4358e6440a remove unneeded warnings 2023-02-11 23:03:30 +00:00
6b5f048b4b Problems with venv script, ongoing.. 2023-02-11 23:03:12 +00:00
709b720be9 Update URLs to django documn version 2023-02-10 00:05:04 +00:00
19d9942676 Django 3.0 deprecations removed 2023-02-09 20:54:55 +00:00
0740f9ea5a More todos 2023-02-08 23:37:00 +00:00
28f87e82e9 page rename fix 2023-02-03 22:36:15 +00:00
175e71facf Many many bugs fixed for >1 svx file on a wallet 2023-02-03 22:19:51 +00:00
c1231ff451 refactored and most recent wallet link fixed 2023-02-03 17:13:29 +00:00
e70d51e52b Made JSON visible on wallet edit page 2023-02-03 11:34:38 +00:00
7f5bd2c17e docm. update 2023-02-03 11:34:24 +00:00
f7d91b5929 todo updates 2023-02-02 22:02:16 +00:00
e94a24bbd4 to-do lists updates 2023-02-02 21:50:40 +00:00
e0a198bac5 Added 'Notes not needed' checkbox 2023-02-02 17:39:56 +00:00
25e00e02b7 Complete set of todo strings on webpage 2023-02-02 16:15:13 +00:00
13f0c6f988 * prefix documented 2023-02-02 15:40:50 +00:00
9abfcdd091 re enable 2023-02-02 14:57:44 +00:00
18541de371 test file permissions 2023-02-02 14:51:20 +00:00
578f02db2d Better diagnostics from bad slug error 2023-02-02 11:19:46 +00:00
3b9695b4f3 spiders are asking for weird urls 2023-02-02 11:13:02 +00:00
b55bfb8868 more debug 2023-02-02 00:01:37 +00:00
3a348d5d1a more debug 2023-02-01 23:59:38 +00:00
5ed91e1c15 debug msg 2023-02-01 23:56:54 +00:00
8aa5a601e7 if db badly corrupt 2023-02-01 23:54:26 +00:00
9d1c0ac395 Setting wallet dates earlier in the import process 2023-02-01 23:43:05 +00:00
c7d88077ec renamed wallet form file 2023-02-01 21:58:48 +00:00
5798e8dcd5 make nav cope with missing wallets 2023-02-01 21:31:07 +00:00
5ae37eef82 Fix to not create an extra wallet 2023-02-01 19:31:29 +00:00
587ccff501 date handling now working for new wallet 2023-02-01 19:10:46 +00:00
8e51f3aff8 Dedicated 'Create' button for a new wallet 2023-02-01 17:21:33 +00:00
e38d29f33d menu change to go to latest blank wallet 2023-01-31 20:52:22 +00:00
3c7661836c New wallet goes to next available slot now 2023-01-31 20:28:39 +00:00
1f5b56a593 Wallet editor into separate file 2023-01-31 17:13:41 +00:00
57930b7aa5 Show survey length per survex file 2023-01-31 14:49:54 +00:00
76ed801077 Minor bulk create tweak 2023-01-31 01:37:00 +00:00
241dde3a84 Bulk_create working for team on a survexblock 2023-01-31 00:39:30 +00:00
b98d7d246c bug fixes renaming 2023-01-30 23:22:28 +00:00
3aca0d0c76 ruf cleanup imports, bigly. 2023-01-30 23:04:11 +00:00
e35fccea5d Removed unused properties and moving 2023-01-30 22:27:17 +00:00
7808005498 ran 'black' to reformat all the core files 2023-01-30 19:04:36 +00:00
d06dd3d166 Updated all.svx documn 2023-01-30 19:00:05 +00:00
a12f666e96 Remove unneeded Class ExpeditionDay 2023-01-30 16:42:56 +00:00
ebe86d73d4 Renaming class - step 3 complete 2023-01-30 16:27:01 +00:00
b29ff61871 Renaming class step 2 2023-01-30 16:18:19 +00:00
58f7cf72d4 renaming confusing Class, step 1 2023-01-30 16:07:44 +00:00
3742e0f367 fixing Sunday display on calendar 2023-01-30 15:28:11 +00:00
7d98980121 Fixing dates on expedition table 2023-01-29 22:11:00 +00:00
89d0e1723e fixing cyclic import problem 2023-01-29 21:45:51 +00:00
226cbb6b5c Fixed coloured T and S on expo calendar 2023-01-29 20:59:56 +00:00
a1c34f488d bugfix from rearranged model files 2023-01-29 18:17:43 +00:00
79bccade02 separated out ent locations from survex parser 2023-01-29 17:03:50 +00:00
5639435058 Moved Logbooks to separate model file 2023-01-29 16:47:46 +00:00
432be660a4 separated out Model for wallet to its own file 2023-01-29 16:23:58 +00:00
f73640522b More public debug reports 2023-01-29 12:41:50 +00:00
d9d4181dda Add new survex import report 2023-01-29 12:11:47 +00:00
071f68080c Inherit *team to anonymous survex blocks 2023-01-29 01:30:10 +00:00
03fa5f5548 compiling more regexes 2023-01-28 21:17:16 +00:00
0d9d307490 refactor to reduce db hits and fix *team 2023-01-28 21:00:38 +00:00
e6fd1f0ec5 Collect dataissues and write to db all at once 2023-01-28 15:10:39 +00:00
2704fc42d4 faster db creation, safer file reading with 'with' 2023-01-28 14:04:32 +00:00
d9a4069662 moved aliases to people module, faster db too 2023-01-28 14:03:46 +00:00
9e71be8169 refactored, global removed 2023-01-28 13:14:54 +00:00
db0504057b no search before db object creation: faster 2023-01-28 11:45:30 +00:00
e4c804b305 refactoring author checks 2023-01-28 10:47:25 +00:00
e01bd39609 refactored logbooks parser 2023-01-27 23:21:07 +00:00
6565b3f9c4 refactored, faster deletion prior to loading 2023-01-27 17:41:10 +00:00
2fee216e80 Remove logdataissues from TROG 2023-01-27 17:24:31 +00:00
75834902f2 new report on tehrion file parsing 2023-01-26 23:36:56 +00:00
719e0fe918 therion issues report 2023-01-26 22:36:49 +00:00
a321625f35 fix number of entries expected 2023-01-26 21:52:56 +00:00
0c4ce6dc3c deleted old parser code 2023-01-26 21:33:17 +00:00
733765802e reformatted all old logbook formats 2023-01-26 21:33:06 +00:00
1be3a3892c ruff removed unused imports 2023-01-19 21:34:09 +00:00
89b0c0862e ran ruff to remove unused imports 2023-01-19 21:20:47 +00:00
ba2ae6cd82 reformatted using black 2023-01-19 21:18:42 +00:00
0f8fe0e290 isrt reordering of import statements 2023-01-19 20:47:26 +00:00
be9fcc522a sort imports using isort. tested. 2023-01-19 18:35:56 +00:00
939d3970aa sort imports using isort. tested. 2023-01-19 18:33:04 +00:00
e5a9330a91 reordering import statements using isort 2023-01-19 18:30:05 +00:00
1b70ccea3e consistent tests with logbooks junk removal 2023-01-16 19:52:05 +00:00
822965ebe5 remove %s old formatting style (last bits) 2023-01-02 22:26:33 +00:00
7738b2836e removed temp files 2022-12-29 16:26:25 +00:00
1ab7528f7b Clean up unused templates. All checked. 2022-12-29 15:07:58 +00:00
de74cd4867 tidy up 2022-12-29 13:56:46 +00:00
9dc1853e10 cope with bad wallet name 2022-12-29 13:56:09 +00:00
78740a1fc0 remove logbooksearch, use site-wide search on server 2022-12-29 13:54:38 +00:00
b131e567b5 logbooksearch ? 2022-12-29 13:52:37 +00:00
5bbb363f12 Adding docstrings, deleting unused code 2022-12-23 23:32:59 +00:00
0e29cdd48c bugfix 2022-12-23 22:18:17 +00:00
8374500da5 Put colour bar on wallet editor 2022-12-23 22:14:00 +00:00
194470841e logbooks correct numberss of entries expected 2022-12-23 22:13:43 +00:00
a71c616afd update deprecations etc 2022-12-23 22:13:11 +00:00
9c39c9dcff docstrings added 2022-12-23 00:49:22 +00:00
a72c2bd96a Using Path() wherever possible in localsettings.py 2022-12-22 16:04:16 +00:00
f23764c486 diagnosing missing entrance file 2022-12-22 00:56:46 +00:00
a7a126dd55 Formatting wallets tables 2022-12-21 22:10:55 +00:00
d06af5b0ec rearrange control panel 2022-12-21 15:29:57 +00:00
ec040824f6 fix frontmatter/endmatter 2022-12-21 02:05:26 +00:00
517da57a0c All broken logbooks now parsing correctly. 2022-12-20 23:48:56 +00:00
5ee3ebad3e converting 1988 logboog 2022-12-20 21:53:56 +00:00
05df2e084c converting 1987 logbook 2022-12-20 19:59:36 +00:00
dc3a61addd convert old logbooks to modern format 2022-12-20 16:38:32 +00:00
9169abdb05 2019 blog edits 2022-12-20 15:18:07 +00:00
81e95291e8 More surveyors in list 2022-12-20 12:48:39 +00:00
f24f283a07 attempted speedup, explicit dates wallet objects 2022-12-20 00:07:55 +00:00
bb14c94ab1 Updates to make 2018 blog merge work (faster) 2022-12-19 20:13:26 +00:00
7e9bb73777 Vital fix to stop parsing terminating too early 2022-12-19 11:38:34 +00:00
43a98b4421 Not quite getting all the blog post contents 2022-12-19 00:33:32 +00:00
f1d5df9933 fix author display for logbook entry 2022-12-18 21:20:30 +00:00
8ce86aabee strip spaces from titles 2022-12-18 20:36:11 +00:00
d1b94763b4 Fixing wiki-parsing for 2009 logbook 2022-12-18 19:33:56 +00:00
73b710d53f fix more logbook parsing 2022-12-17 17:05:55 +00:00
0a4471e039 Fixed round-trip import-export-import bugs 2022-12-17 03:02:08 +00:00
f80e4efed8 parse several UK caving blogs per year - working 2022-12-16 19:57:56 +00:00
5e9fd7fd77 bug in python 3.9? 2022-12-15 01:06:54 +00:00
5cc6c26606 blog parsing working 2022-12-15 00:35:48 +00:00
cb50528e2d exptl parse UK Caving blog 2022-12-14 23:46:14 +00:00
6dd8e5a75c ignore soft links 2022-12-10 17:11:39 +00:00
0e47909704 tidy and comments 2022-12-10 13:00:57 +00:00
cabcada0b8 2003 logbook export/re-import as now HTML format 2022-12-09 23:45:07 +00:00
17b2b7b89c fix comments and 2019 LB parsing 2022-12-07 18:22:09 +00:00
1eab261b30 fix bugs made visible by py 3.11 2022-11-23 21:59:42 +00:00
Philip Sargent
b06d1dae42 Convert.format() to f-strings with flynt 2022-11-23 10:48:39 +00:00
Philip Sargent
45a640dfe9 Convert .format() to f-strings 2022-11-23 10:41:14 +00:00
Philip Sargent
ca9a3b5c7b tidy up 2022-11-23 10:36:02 +00:00
Philip Sargent
0b32d51ba3 bugfix 2022-11-23 00:49:47 +00:00
Philip Sargent
1a9e17a7e8 remove entry-type and tidy cache bits 2022-11-23 00:36:44 +00:00
Philip Sargent
995df16bec bugfix length declaration 2022-11-21 16:52:10 +00:00
Philip Sargent
259f85742a moved parser settings 2022-11-21 16:47:25 +00:00
Philip Sargent
a795707552 cache tidy and move settings into parser 2022-11-21 16:41:52 +00:00
Philip Sargent
bcb61f9cd9 remove cache and setdatesfromlogbook 2022-11-21 16:26:30 +00:00
Philip Sargent
4260b0f092 Removed misguided ObjStore as we do need multiuser db 2022-11-21 00:04:33 +00:00
Philip Sargent
4514eda311 make compatible with python 3.11 as well as 3.10 2022-11-18 20:42:03 +00:00
Philip Sargent
725c5ad0cd Updating comments 2022-11-17 01:24:39 +00:00
Philip Sargent
0b89979418 bug found by python 3.11 2022-11-15 23:56:35 +00:00
Philip Sargent
96281c33e8 updating venv generation 2022-11-15 23:56:17 +00:00
Philip Sargent
43bf2620f1 dump3d --legs future possibility 2022-11-15 22:25:39 +00:00
5b3f91d3e5 bugfixes 2022-10-27 17:23:41 +01:00
73e57a19df fixes for WSL1 on new machine 2022-10-27 16:29:11 +01:00
275ce87e30 OS config for a new dev machine 2022-10-27 12:30:59 +01:00
Philip Sargent
d9ed90b729 update for old PC settings 2022-10-26 00:20:47 +01:00
Philip Sargent
d82c521f4f direct link to lower table 2022-10-19 14:00:08 +03:00
Philip Sargent
2cafa32c7e links to other years wallets 2022-10-18 23:28:38 +03:00
Philip Sargent
830150ade6 Making page templates autoadjust to the current year 2022-10-15 21:28:56 +03:00
Philip Sargent
55ac98ebe1 Add survex trips to logbook mentions 2022-10-15 19:33:30 +03:00
Philip Sargent
454c2c2830 Fix links to scans directly from the master drawings list 2022-10-15 18:37:46 +03:00
Philip Sargent
2fa298cae9 cures weird bug 2022-10-15 17:26:09 +03:00
Philip Sargent
3b106a3803 fix PCTEXT better in dis-laying tunnel files 2022-10-15 17:25:41 +03:00
Philip Sargent
da09bc7968 Render tunnel files as XML in webpage, not just text 2022-10-15 14:07:15 +03:00
Philip Sargent
e0ac09d5ec add 'lastvisit' field to entrances, for the date 2022-10-12 23:12:55 +03:00
Philip Sargent
45f06293f5 Add 'foreign friends' to names alias list 2022-10-12 23:10:48 +03:00
Philip Sargent
004a3e2db1 comment out hr and top heading, never needed and disrupt layout 2022-10-12 23:09:58 +03:00
Philip Sargent
b81b4ef2ef Add date of update to the generated html file 2022-10-12 22:09:58 +03:00
Philip Sargent
52c0ab213a Person twiddles 2022-10-11 21:47:18 +03:00
Philip Sargent
c3bfd50cf1 Update link to new person wallets on person page 2022-10-11 21:33:13 +03:00
Philip Sargent
39683cc413 TIdy and docum of cave entry code 2022-10-11 21:01:02 +03:00
Philip Sargent
47e2c6e214 more text on aliases page 2022-10-10 22:12:42 +03:00
Philip Sargent
ff8eaa241e *team parsing much improved. Copes with everything now. 2022-10-10 15:40:21 +03:00
Philip Sargent
52a035e4cf more fixes 2022-10-10 01:08:37 +03:00
Philip Sargent
8c8b6966a7 sort output, accept more comma use 2022-10-10 00:28:57 +03:00
Philip Sargent
861980a8e9 More fixes to name resolution checking 2022-10-09 23:50:32 +03:00
Philip Sargent
3c31c333f2 Widen the recognizer capabilities for names 2022-10-09 02:32:34 +03:00
Expo on server
235bd86af3 ./pre-run.sh does not fixup git work 2022-10-09 00:32:26 +01:00
Philip Sargent
e6ca20b1ed new report to make aliases visible 2022-10-09 00:17:53 +03:00
Philip Sargent
b470ab66e2 Now tests that loser repo is clean and survex runs on 1623.svx and 1626.svx 2022-10-08 20:43:01 +03:00
Philip Sargent
e9790e70d6 abbrv. names now accepted when parsing logbooks, survex 2022-10-08 01:52:10 +03:00
Philip Sargent
55bc042798 bugfixes 2022-10-08 00:48:21 +03:00
Philip Sargent
4e9680a3ad big changes to cope with survexblock not yet dated, no *date yet 2022-10-07 23:48:41 +03:00
Philip Sargent
bec262bb2d comments 2022-10-07 23:47:45 +03:00
Philip Sargent
74b3147076 fix for running troggle not on master git server 2022-10-07 23:47:30 +03:00
Philip Sargent
f51d1e114e small chnages to name resolution 2022-10-07 23:47:05 +03:00
Philip Sargent
c76cd38d76 use generator when reading individual survex files too, saves anothe 6MB 2022-10-07 11:41:46 +03:00
Philip Sargent
b4c4f2aefc reduce mem use by 21.2MB by using a generator 2022-10-07 10:57:30 +03:00
Philip Sargent
d16226c879 bug patch for duplicate SUrvexFile object 2022-10-06 21:55:31 +03:00
Philip Sargent
1f70b77735 fix crash when people put a list of cave ids in a wallet 2022-10-06 21:37:09 +03:00
Philip Sargent
4a34986598 error msg fix 2022-10-06 21:03:14 +03:00
Philip Sargent
70709c505c Fixing bugs and better error msgs 2022-10-06 21:02:15 +03:00
Philip Sargent
8d08a67302 strip spaces in pending caves list 2022-10-06 12:51:43 +03:00
Philip Sargent
29c5c82337 polishing outputs for importing unseen survex files 2022-10-05 23:18:11 +03:00
Philip Sargent
7e47fe1f30 Parse all files, not just those in the *include tree 2022-10-05 21:11:18 +03:00
Philip Sargent
9e5bdace2c make cache work even if timestamps wrong 2022-10-05 21:10:05 +03:00
Philip Sargent
a6e60c0bf7 working on loading all the non*inlcuded svx files 2022-10-04 00:00:55 +03:00
Philip Sargent
c8163ab0cd fix bug for wallet with empty fpath 2022-10-03 21:18:35 +03:00
Philip Sargent
4495be2083 explanation of column headings 2022-10-03 20:35:23 +03:00
Philip Sargent
fe28d9ba39 Add survex files,wallets and same-day LBEs to the logbook entry 2022-09-27 23:59:25 +03:00
Philip Sargent
b60e1f2493 rename data issue tag 2022-09-27 21:37:45 +03:00
Philip Sargent
78a62a1551 error msg was incorrect. fix. 2022-09-26 00:18:41 +03:00
Philip Sargent
f0195682f2 Now shows cave id even if no *ref 2022-09-25 22:39:01 +03:00
Philip Sargent
2f64e2d4c1 FIx pending caves which had got a bit garbled 2022-09-25 21:43:00 +03:00
Philip Sargent
829e18baef Make scans in wallet subfolders clickable 2022-09-25 21:42:21 +03:00
Philip Sargent
760dbc588a Make scans in subfolders somewhat visible 2022-09-24 00:34:39 +03:00
Philip Sargent
f3ecdd6d87 Cleaner monitoring output when importing wallets and scans 2022-09-24 00:17:51 +03:00
Philip Sargent
6e3fdd35c1 Replaced maintenance headache with cleaner folder walking 2022-09-23 23:43:34 +03:00
Philip Sargent
c3672b476c test fixed to match new code 2022-09-23 21:23:15 +03:00
Philip Sargent
9d56e467cd fix broken upload form 2022-09-23 21:07:51 +03:00
Philip Sargent
97b0ce8c96 removing technical debt, replace convoluted code 2022-09-23 00:49:40 +03:00
Philip Sargent
aa20692ad6 bugfixes and enabling older wallets to be found and listed 2022-09-22 22:41:42 +03:00
Philip Sargent
af88cb4d0f Show list of folders in a wallet 2022-09-22 19:42:44 +03:00
Philip Sargent
b4cf2bac95 more complete list of caves linked to wallets 2022-09-22 01:37:25 +03:00
Philip Sargent
5c0835e076 create links from cave ids 2022-09-22 00:25:02 +03:00
Philip Sargent
e2b280ccdc fix mistaken error messages 2022-09-22 00:23:47 +03:00
Philip Sargent
1971f51b52 find more wallets than we thought we had 2022-09-22 00:23:22 +03:00
Philip Sargent
11b1d41a55 increase entires to 64 2022-09-22 00:22:09 +03:00
Philip Sargent
86ea33bbce Correct and validate JSON dates when they are read from file 2022-09-20 23:06:45 +03:00
Philip Sargent
71bd07e70e Handling and fixing bad dates in JSON input 2022-09-20 22:52:31 +03:00
Philip Sargent
94b49adc4e added free text field to wallet JSON 2022-09-20 22:05:35 +03:00
Philip Sargent
36995ec051 handling survex files not linked in completely 2022-09-20 02:36:40 +03:00
Philip Sargent
61f9863a06 bug fixes and coping with a list of cave ids in JSON 2022-09-20 01:02:06 +03:00
Philip Sargent
47878d264b Make survex file more obvious in table 2022-09-19 23:10:09 +03:00
Philip Sargent
0611c3f00f documn improvements 2022-09-19 21:54:51 +03:00
Philip Sargent
13b57d2bb6 year list for wallets by year 2022-09-19 21:54:32 +03:00
Philip Sargent
2648bada30 remove URL field from wallet as seen and edited 2022-09-19 20:55:34 +03:00
Philip Sargent
d2c6c4d7fb find perps guilty of bad *ref brhaviour 2022-09-18 23:53:04 +03:00
Philip Sargent
b5f8c5294e depry detects uneeded dependencies 2022-09-18 20:28:23 +03:00
Philip Sargent
9cd009f8ba typo, bugfix 2022-09-16 23:22:45 +03:00
Philip Sargent
68865a80ef Fixing bad date parsing, better warning msgs 2022-09-16 22:54:22 +03:00
Philip Sargent
ddfc677a1e bugfix for missing dates 2022-09-16 21:26:03 +03:00
Philip Sargent
0ab3a4ff44 comments added 2022-09-15 22:55:45 +03:00
Philip Sargent
f12d0bd580 Remove unneeded code now svx files have been edited 2022-09-15 22:55:16 +03:00
Philip Sargent
e28f04a51c add link to Help on using wallets 2022-09-14 01:20:00 +03:00
Philip Sargent
9410dda69e List the logbook trips and other svx files of the same date 2022-09-14 00:31:37 +03:00
Philip Sargent
04696b7b80 better link text 2022-09-13 00:08:37 +03:00
Philip Sargent
a41cd8eb24 oops. breaking chnage. fixed. 2022-09-12 22:51:33 +03:00
Philip Sargent
29dc99c21f tidy bad git messages in tests 2022-09-12 22:47:31 +03:00
Philip Sargent
dfc903208e more useful links ion wallets pages 2022-09-12 22:47:12 +03:00
Philip Sargent
beecb4b0ac remove redundant code 2022-09-12 22:46:45 +03:00
Philip Sargent
182df351b9 Extra useful links on wallets pages 2022-09-12 22:20:14 +03:00
Philip Sargent
fd57071411 Fixed test to undo side-effect git commit 2022-09-12 21:28:07 +03:00
Philip Sargent
785845598f catch crashes when no data has been imported 2022-09-12 20:50:57 +03:00
Philip Sargent
6452a7beed fix green block for survex files on table 2022-08-31 12:09:07 +03:00
Philip Sargent
5c667c1826 update dev environment 2022-08-31 09:28:23 +03:00
Philip Sargent
dc2b8ad431 fixes for crashes,svx files in wallets 2022-08-31 09:27:14 +03:00
Philip Sargent
3af1112847 fix wallet date from survexfile 2022-08-30 20:46:17 +03:00
Philip Sargent
0853bbdd19 Many fixes and speedups 2022-08-30 17:58:49 +03:00
Philip Sargent
6daa96b69e correcting output comment 2022-08-30 17:30:46 +03:00
Philip Sargent
9aaadafc13 populate with people 2022-08-25 17:29:57 +03:00
Philip Sargent
6c384492be fix missing .svx as not an error 2022-08-25 17:29:43 +03:00
Philip Sargent
ab184bccf3 comment updates 2022-08-25 16:31:38 +03:00
Philip Sargent
79672dd4b3 bugfix 2022-08-25 16:12:13 +03:00
Philip Sargent
760abe1a9e cope with swapped people/title 2022-08-25 15:54:00 +03:00
Philip Sargent
8f03e590cc update test to match new wallet json location 2022-08-25 14:38:14 +03:00
Expo on server
57c4732566 Fix erroring code in core/views/caves.py 2022-08-25 03:31:54 +01:00
Philip Sargent
17bbbd6eab get the survexfile path when editing a naked wallet 2022-08-24 19:08:08 +03:00
Philip Sargent
7e9fd0f353 Better display of wallet names copied from svx files 2022-08-24 18:28:15 +03:00
Philip Sargent
8ca50d8fd4 bugfix which was deleting metadata 2022-08-24 17:01:20 +03:00
Philip Sargent
43b6b590e8 fix bleed through of previous metadata onto another wallet 2022-08-24 16:22:15 +03:00
Philip Sargent
e98ffced98 better explanation text 2022-08-24 15:07:19 +03:00
Expo on server
d37bacb91a Clarify databasereset help on subfunction use 2022-08-24 12:42:01 +01:00
Philip Sargent
96b2c6c9ed fix url for cave edit page in error msg 2022-08-24 14:15:40 +03:00
Philip Sargent
b8cd8c4785 wallets form edits 2022-08-24 13:40:49 +03:00
Philip Sargent
a30a2b9ef9 bugfix 2022-08-20 09:45:28 +03:00
Philip Sargent
e195497829 better commit msg 2022-08-16 21:58:13 +03:00
Philip Sargent
03cda8a897 update prompt from 2019 to 2022 2022-08-16 21:21:03 +03:00
Philip Sargent
13e3da8d26 bugfix 2022-08-16 20:57:34 +03:00
Philip Sargent
ee7e3b6d41 make field longer 2022-08-16 20:54:27 +03:00
Philip Sargent
d05294adaf better, non-real prompt 2022-08-16 20:52:34 +03:00
Philip Sargent
f1aa6a9794 better hint for svx file name input 2022-08-16 20:47:24 +03:00
Philip Sargent
41c68aef26 detecting empty wallets where we only have JSON and no files 2022-08-16 20:02:28 +03:00
Philip Sargent
e94dc6eb6f remove more "None" text 2022-08-16 17:49:55 +03:00
Philip Sargent
aaba4fd2a9 minor refactoring 2022-08-16 17:42:37 +03:00
Philip Sargent
1a49e5347f cleaner table for None values 2022-08-16 17:42:13 +03:00
Philip Sargent
51f5261bfc bad bug in not clearing out previous data. fixed 2022-08-16 16:48:19 +03:00
Philip Sargent
b2d8b21822 update 2019 to 2022 2022-08-16 16:26:19 +03:00
Philip Sargent
b2a26be8c8 change photo to GPS guide: more useful 2022-08-16 15:28:27 +03:00
Philip Sargent
dcc36f3286 Docum for creating empty wallet 2022-08-16 14:19:25 +03:00
Philip Sargent
3c13f62bd1 re-fettled scan upload, creates Wallet object earlier 2022-08-14 23:40:56 +03:00
Philip Sargent
284e044a03 Fix wallets scan upload faults 2022-08-14 22:52:14 +03:00
Philip Sargent
b093d00ff4 match therion files to wallets, scans names therein 2022-08-14 01:47:53 +03:00
Philip Sargent
8e93680146 personrole is not just about roles 2022-08-13 23:57:57 +03:00
Philip Sargent
8fa25c815a fix apparent error when running on dev system 2022-08-13 23:57:37 +03:00
Philip Sargent
edfba8d355 git commit edits to wallet data 2022-08-13 23:56:56 +03:00
Philip Sargent
1eadc931cb Bugfix for git add for uploaded drawings 2022-08-13 21:14:57 +03:00
f3002a694d New troggle config for Barbie Xubuntu pink 2022-08-13 16:14:47 +01:00
Philip Sargent
5149cf1ece add test for renaming single photo 2022-08-11 23:44:19 +03:00
Philip Sargent
1bbfd1e517 bugfix in photo upload, untidy 2022-08-11 23:35:53 +03:00
Philip Sargent
e35616a611 look in filesystem not database for file location 2022-08-11 22:18:58 +03:00
Philip Sargent
a0a1927437 removed outdated text 2022-08-11 21:57:23 +03:00
Philip Sargent
3607b9f140 enable photo file rename 2022-08-11 21:19:52 +03:00
Philip Sargent
25c425cff8 QMs grayed out for survex files 2014 and earlier 2022-08-07 23:41:45 +03:00
Philip Sargent
7f335e082c prevent error message repetition in DataIssues 2022-08-07 23:26:31 +03:00
Philip Sargent
9220dbf2e6 bugfix 2022-08-07 22:52:29 +03:00
Philip Sargent
f33c6cc057 bugfix in new wallet 2022-08-06 22:23:39 +03:00
Philip Sargent
186eb20fb3 Make drawings repo the MASTER for contents.json 2022-08-06 21:27:36 +03:00
Philip Sargent
ac22a984ee missing from Barbie git 2022-08-06 20:02:17 +03:00
Philip Sargent
61c04a1fb9 removing links to most old-style wallets pages 2022-08-01 17:46:54 +03:00
Philip Sargent
0fd3cf43e8 formatting 2022-08-01 17:32:49 +03:00
Martin Green
c1aaf07885 Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2022-08-01 16:05:17 +02:00
Martin Green
f491264b9e Allow entrances to be edited with the correct parent url. Commit changes to caves when adding a new entrance. Order entrances alphabetically 2022-08-01 16:04:22 +02:00
Philip Sargent
eed35d01a8 tick lists now on 3 wallets reports 2022-08-01 15:55:20 +03:00
Philip Sargent
df42b1ccb3 remove debugging print 2022-08-01 03:10:07 +03:00
Philip Sargent
129ea3cc5b debugging ticklist 2022-08-01 02:50:19 +03:00
Martin Green
fa6758b9a0 edit entrances within the correct url parent 2022-07-31 21:29:17 +02:00
Philip Sargent
5da1fce41f tidy links 2022-07-31 19:33:14 +03:00
Philip Sargent
a2a5e9200e wallets per person - slow implementation 2022-07-31 18:58:46 +03:00
Martin Green
94252a94fe Edit caves in the same parent URL as the final file 2022-07-31 17:08:28 +02:00
Philip Sargent
c1ba6a39a5 Wallets by year and by cave 2022-07-31 01:02:02 +03:00
Philip Sargent
724234949f Populate blank wallet fields with survex data 2022-07-29 20:55:19 +03:00
Philip Sargent
bc3da1182b starting jsn population when we know the data 2022-07-29 17:49:07 +03:00
Philip Sargent
7872e98cb2 fixing pending caves system to be cleaner 2022-07-28 18:36:57 +03:00
Philip Sargent
c29e240c2b creating new wallet now copies nd commits 2022-07-28 18:36:40 +03:00
Philip Sargent
93622b111f obscure bug fixed for lines ;*include 2022-07-28 15:15:11 +03:00
Philip Sargent
9a461c31a8 adding people 2022-07-28 02:37:44 +03:00
Philip Sargent
fea69c0371 Extend wallets by cave report 2022-07-28 01:48:22 +03:00
Philip Sargent
dd0fcc28dd update todo strings 2022-07-27 23:24:53 +03:00
Philip Sargent
3d7cb78e47 copies all wallet data to drawings repo as backup 2022-07-27 23:24:53 +03:00
Philip Sargent
1468c49723 remove unused SCANS_URL 2022-07-27 23:24:52 +03:00
Philip Sargent
c39fb30707 new urls and dummy functions and rename 2022-07-27 23:24:51 +03:00
Martin Green
91568b7151 Allow HTML to be blank and determine the new files need git commiting. 2022-07-26 17:09:15 +01:00
Martin Green
7090bab632 closed form for search item in right hand menu 2022-07-26 15:56:31 +01:00
Philip Sargent
039792e320 improve reifying process 2022-07-25 15:03:58 +03:00
Philip Sargent
cddcb0e321 fix minor bug in setting dummy entrance 2022-07-25 11:31:43 +03:00
Philip Sargent
f9a7ba7927 alias as separate error type 2022-07-25 04:17:06 +03:00
Philip Sargent
7785843597 error msg when no .pos file 2022-07-25 04:10:28 +03:00
Expo on server
c5b9cd57f2 deleted transient file 2022-07-25 02:10:18 +01:00
Philip Sargent
3577d8cb68 big rewrite of cave alias lookup system 2022-07-25 02:58:13 +03:00
Philip Sargent
9c090f0383 test now matches model schema 2022-07-25 02:57:31 +03:00
Philip Sargent
476ee482fa Pending caves with 1626 properly 2022-07-25 02:57:00 +03:00
Philip Sargent
25d5361da4 1626 as well as 1623 2022-07-25 02:56:12 +03:00
Philip Sargent
de7388bdc5 GetCave:Lookup neeeds work 2022-07-24 21:38:14 +03:00
Philip Sargent
5007393536 better error handling 2022-07-23 20:05:58 +03:00
Philip Sargent
a1e538e93a making it work with 1626 no schonberg 2022-07-23 19:26:47 +03:00
Philip Sargent
7288bd9da3 add comment on point where it crashes 2022-07-22 13:42:04 +03:00
Philip Sargent
f194126fb5 better error description 2022-07-22 13:41:47 +03:00
Philip Sargent
3b1b96c4c8 EXTEND MESSAGE FILED. cRASHES mARIAdb 2022-07-22 13:41:28 +03:00
Philip Sargent
31b912f3ca bugfixes 2022-07-22 12:40:42 +03:00
Philip Sargent
38eb65ac0e remove unused code 2022-07-22 11:23:00 +03:00
Philip Sargent
796dbf1438 more dead chicken waving 2022-07-21 21:52:10 +03:00
Philip Sargent
f46942fadf typo again 2022-07-21 21:04:49 +03:00
Philip Sargent
3a52d790f0 typo 2022-07-21 21:03:54 +03:00
Philip Sargent
ce7dfd6510 working on MariaDB crash on server 2022-07-21 21:01:57 +03:00
Philip Sargent
312ecdcfe1 need to see exception with all the renaming going on 2022-07-21 19:51:04 +03:00
Philip Sargent
c747664a26 Better links for 2022 2022-07-21 19:34:52 +03:00
Philip Sargent
931c33cfdb Clean DataIssues output, new therionrefs.log file 2022-07-21 19:01:04 +03:00
Philip Sargent
f895a7e44c wallets now sorted as well as deduplicated 2022-07-21 11:10:04 +03:00
Philip Sargent
5161fce32e remove duplicate lines, add heading link 2022-07-21 10:50:15 +03:00
Philip Sargent
8245ee103e wallets for just one cave 2022-07-21 10:32:11 +03:00
Philip Sargent
3e869ae76a fix variables needed for error message 2022-07-21 09:40:35 +03:00
Philip Sargent
dd0a448f90 fix 3d file download on cave page 2022-07-21 01:22:07 +03:00
Philip Sargent
3ab8a5d1ad layout tidy 2022-07-21 00:40:03 +03:00
Philip Sargent
83bbda7c40 bugfix 2022-07-21 00:07:52 +03:00
Philip Sargent
d058942084 revert, this was a bad idea 2022-07-20 21:04:59 +03:00
Philip Sargent
0a158db97d Trial QM tick mechanism in survex files 2022-07-20 20:47:29 +03:00
Philip Sargent
de37eea167 typo 290 instead of 291 2022-07-20 17:25:36 +03:00
Philip Sargent
a215ebd62c fix QM regex for number and rearrange url code 2022-07-20 17:02:38 +03:00
Philip Sargent
549c1649b4 QMs now have working url to survexfile & tick description 2022-07-20 14:44:56 +03:00
Philip Sargent
2a7f1506c9 track down url resoution error 2022-07-20 10:08:23 +03:00
Philip Sargent
9a395eafef aise exception in cave descriptionb rendering 2022-07-20 10:04:00 +03:00
Philip Sargent
2e14be61a2 bugfix 2022-07-19 20:54:46 +03:00
Philip Sargent
6883ff49a0 Add fields to QM model 2022-07-19 20:54:28 +03:00
Philip Sargent
d9d75b3aee another attempt to avoid non-null parent pseudo error 2022-07-19 20:00:35 +03:00
Philip Sargent
1395ac76e9 Attempt fix to MariaDB crash in databasereset 2022-07-19 19:48:11 +03:00
Philip Sargent
b79eb9a969 better error msg 2022-07-19 19:18:42 +03:00
Philip Sargent
23462df49c bugfix 2022-07-19 19:06:56 +03:00
Philip Sargent
3db9c16082 add Homecoming to QMs list 2022-07-18 19:19:30 +03:00
Philip Sargent
6ec7071ffc Fix display of expoyear 2022-07-18 19:19:06 +03:00
Philip Sargent
4efeefe6c9 git commit when editing survex files online 2022-07-18 18:42:21 +03:00
Philip Sargent
5b7c105c5f missed a bit of refactoring 2022-07-18 18:06:23 +03:00
Philip Sargent
dd00ff69aa refactor to put Martins git stuff in utils 2022-07-18 17:37:22 +03:00
Philip Sargent
ee9b808461 moved writetrogglefile() to core.utils 2022-07-18 16:57:13 +03:00
Philip Sargent
8484f26ee9 Fix URL links and better name display 2022-07-18 16:16:58 +03:00
Philip Sargent
deec330990 test for loser git repo sanity 2022-07-18 15:46:57 +03:00
Philip Sargent
145540caf5 more weirdness in circumventing MariaDB/Django misunderstandings 2022-07-17 16:08:01 +03:00
Philip Sargent
b7035f1574 more helpful message 2022-07-17 16:07:27 +03:00
Philip Sargent
6efbec7750 Date and People checks 2022-07-17 15:41:05 +03:00
Philip Sargent
037a50cf47 read 1623/264 as 1623-264 etc 2022-07-17 15:28:20 +03:00
Philip Sargent
bb65ffaee6 bugfix 2022-07-17 15:22:26 +03:00
Philip Sargent
b20e6c5a58 Complaints now on wallet page 2022-07-17 15:01:53 +03:00
Philip Sargent
7c82c2d97c rename 2022-07-17 15:01:25 +03:00
Philip Sargent
810e058c07 new complaints messages for wallet 2022-07-17 15:00:37 +03:00
Philip Sargent
8aab01c126 cleaner zeroth cave setting 2022-07-15 16:44:02 +03:00
Philip Sargent
73e9ae54fa cleaner survexdirectory creation 2022-07-15 16:17:40 +03:00
Martin Green
d4c213e0b3 Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2022-07-15 14:06:43 +01:00
Martin Green
3748840e23 Removed extranious characters where there is one unnnumbered entrance. 2022-07-15 14:05:48 +01:00
Philip Sargent
02cf9b1c22 fixing Beckas complaint 2022-07-15 16:04:07 +03:00
Martin Green
ef27901125 Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2022-07-15 13:43:50 +01:00
Martin Green
a1560c60c6 Added kataster number to cave heading 2022-07-15 13:42:58 +01:00
Philip Sargent
b8355cbf8d fix bugs and tidyup in recent changes 2022-07-15 15:11:49 +03:00
Philip Sargent
86a18c3ebc catch nonUTF8 survex files, DataIssues url editor 2022-07-15 14:09:32 +03:00
Martin Green
5582d545a1 Allow QMS to be rendered to a string, if the case that an optional parameter is missing 2022-07-11 23:29:59 +01:00
Martin Green
c416de6e1e Allow user to see a caves edit link even if the user is not logged in. Such that they can be prompted to log in if required. 2022-07-11 21:12:53 +01:00
Philip Sargent
91c9cf0c31 2019 logbook error fix 2022-07-09 01:55:11 +03:00
Philip Sargent
278a84a485 better error msg 2022-07-09 01:54:48 +03:00
Philip Sargent
8d31ab763d improve date parse eror messages 2022-07-09 01:30:49 +03:00
Philip Sargent
a4b1c7b142 remove getqms 2022-07-08 22:20:29 +03:00
Philip Sargent
776f9f7833 remove getqms 2022-07-08 22:19:56 +03:00
Philip Sargent
9803ebe2e8 fix bug in Area creation 2022-07-08 22:19:07 +03:00
Philip Sargent
ca5586fc42 Report badly formatted ;QM lines 2022-07-08 20:08:42 +03:00
Philip Sargent
d3572e18c3 QM reports all working 2022-07-06 17:35:08 +03:00
Philip Sargent
7dc3cc3b91 fix for individual QM display from survex 2022-07-06 15:38:53 +03:00
Philip Sargent
ee4237b14c cleaner template pages 2022-07-06 13:44:40 +03:00
Philip Sargent
848043f7f4 Linkt to QMs on cave page 2022-07-06 11:39:19 +03:00
Philip Sargent
da4d7d6d5e shorten slug to fit 2022-07-06 11:10:50 +03:00
Philip Sargent
0ea3ed1ef2 Not quite so broken QMs from survex files 2022-07-05 22:40:58 +03:00
Philip Sargent
2bd617b543 Fixed QM report for survex-imported QMs 2022-07-05 20:24:51 +03:00
Philip Sargent
96101252bd Documn link 2022-07-05 17:40:31 +03:00
Philip Sargent
9d4a97fc19 Tidy HTML output 2022-07-05 17:02:43 +03:00
Philip Sargent
c9a33a4010 bug fix for forgotten href 2022-07-05 16:34:08 +03:00
Philip Sargent
87fd260051 import diagnostics 2022-07-05 16:30:42 +03:00
Philip Sargent
5d7d2b82b2 Fixing non-null error, even though it should be allowed 2022-07-05 15:57:49 +03:00
Philip Sargent
779afc2f2a QM report pages now not crashing, working.. 2022-07-05 15:38:23 +03:00
Philip Sargent
33eb91346c CaveView - how to install 2022-07-05 14:16:21 +03:00
Philip Sargent
a11541eb58 prefetch_related initial attempts 2022-07-05 14:14:03 +03:00
Martin Green
dbe6d10fff Revert "Added some test pages showing different ways pages could be edited. This probably wants removing soon"
This reverts commit 2af88353f3.
2022-06-28 00:24:57 +01:00
Martin Green
2af88353f3 Added some test pages showing different ways pages could be edited. This probably wants removing soon 2022-06-28 00:18:24 +01:00
Martin Green
82fe350493 Added HTMLarea widget to the edit entrance form 2022-06-27 00:34:08 +01:00
Martin Green
47d1662033 Added help writing HTML in the cave editing form. Made the HTML previews optional 2022-06-26 21:29:46 +01:00
Martin Green
4e5d8d1d76 Refactored code, with an aim of allowing more than one HTMLarea on a page 2022-06-26 18:29:20 +01:00
Martin Green
f1fcef2a6f Refactorising CodeMirror HTML editor, with an ultimate aim to make it reusable. However more work if required... 2022-06-26 14:16:42 +01:00
Martin Green
8f0ea8ed82 Fix for adding images whilst editing, for where the t directory does not exist and at the root directory of expoweb 2022-06-26 11:20:14 +01:00
Martin Green
5fbe0b31c2 Require a login if public and check for CSRF cookies for uploading images 2022-06-26 01:15:00 +01:00
Martin Green
24a016e76a Fixed spelling of a variable name 2022-06-25 23:36:53 +01:00
Martin Green
5de88ce92d Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2022-06-25 23:19:28 +01:00
Martin Green
20583b04c0 Allowed user to select/upload images when editing. When uploaded thumbnails and description pages are automatically created. Git commiting can now handle multiple files at once. 2022-06-25 23:17:19 +01:00
Philip Sargent
2f1ba9cb54 install updates 2022-06-25 21:34:42 +03:00
Philip Sargent
451326789b updated packages and settings 2022-06-25 20:01:43 +03:00
Philip Sargent
859ae9d825 update pip inside venv 2022-06-25 20:00:19 +03:00
Philip Sargent
364a636fa0 Updated pip packages 2022-06-25 19:37:37 +03:00
Philip Sargent
293eb10ffd New OS and venv tool 2022-06-25 19:28:01 +03:00
Martin Green
b3d9e81499 Implement redirects after login (using the next parameter) 2022-06-25 16:13:02 +01:00
Martin Green
74a5125cf9 Allow for PosixPaths to work with GetListDir 2022-06-25 16:08:19 +01:00
Martin Green
d607b30953 Do not allow for the main menu to be overriden, instead display old menu at bottom of page. To do this the id of the main menu was changed from links to menulinks 2022-06-25 01:07:17 +01:00
Martin Green
abdea22899 Allow for slightly different wording in git output 2022-06-25 01:05:29 +01:00
Martin Green
48f82aaaca Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2022-06-24 21:58:21 +01:00
Martin Green
5ac2e24cc2 Removed jQuery 2022-06-24 21:58:00 +01:00
Philip Sargent
d6db942626 Useful datamanagement link 2022-06-24 23:18:10 +03:00
Martin Green
7db7c67065 Added link to parent cave in menu 2022-06-24 19:28:31 +01:00
Martin Green
54f47c58db Adding the latest stable jquert, which is used in the 161 names page, to replace the previous frameset implimentation. 2022-06-24 17:09:46 +01:00
Martin Green
ceb6d2fef1 Added a sub menu when in the handbook directory. Imcreased width of edit preview 2022-06-24 15:48:35 +01:00
Martin Green
b38412b145 Added come mirror for the edit page, including some buttons to make html 2022-06-24 14:39:09 +01:00
Martin Green
ef68db080a Add git commit messages when editing via website. Make sure cust menus are not deleted. 2022-06-23 21:31:57 +01:00
Martin Green
97a9f2aae6 The editing system was accidentally deleting customised sidebar menus. This will stop the happening 2022-06-23 20:03:05 +01:00
Martin Green
2f42f488ab Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2022-06-23 19:02:10 +01:00
Martin Green
f1e800d8bf Move saving and comitting code to a seperate library 2022-06-23 18:48:29 +01:00
Philip Sargent
16c6aed65f Fix missing images 2022-06-23 19:18:21 +03:00
Philip Sargent
77cf3455a6 Intercept NoReverseMatch eceptions more helpfully 2022-06-23 19:01:57 +03:00
Philip Sargent
4fa8d18621 utf8 encoding checks when reading files in the view 2022-06-23 19:01:25 +03:00
Philip Sargent
6de9181390 Put inside if clause if attribute does not exist 2022-06-23 18:44:53 +03:00
Philip Sargent
bd8d450542 UTF-8 check inserted into databasereset 2022-06-23 16:12:13 +03:00
Philip Sargent
7b0d90182b Added utf8 test to test suite 2022-06-23 16:03:50 +03:00
Philip Sargent
b5f2d0641d Provide dummy expedition_id to keep MariaDB happy 2022-06-22 23:08:32 +03:00
Philip Sargent
4662d10c4e apache now using system locale 2022-06-22 20:22:42 +03:00
Philip Sargent
13a63b64d4 sanitized recent localsettings as on server 2022-06-22 20:17:33 +03:00
Martin Green
4d8125a2fd removed rest of endocings 2022-06-22 09:10:56 +01:00
Martin Green
ea880915b0 Removed encoding of file paths as encoding now correct 2022-06-22 09:08:01 +01:00
Martin Green
836387057a Now the servers locale is utf8, try opening files spectifying path using a text string 2022-06-22 08:52:04 +01:00
Martin Green
f0a9c33795 bug fix to previous test 2022-06-21 22:45:11 +01:00
Martin Green
843bfa8ba6 test to find out locale set in the WSGI enivroment 2022-06-21 22:43:06 +01:00
Martin Green
654f8e8c6c bug fix to prev commit 2022-06-20 22:12:00 +01:00
Martin Green
c6272e4103 Refactorise saving code. Do not save and git change if there are no changes 2022-06-20 22:09:10 +01:00
Martin Green
3420422f29 bug fix to setting encoding 2022-06-20 21:38:46 +01:00
Martin Green
a664e8ce8c Made it such that opening files for reading and writing when editing to use utf8 encoding 2022-06-20 21:35:51 +01:00
Martin Green
491fba7d64 test 2022-06-19 01:57:08 +01:00
Martin Green
3d35cf713f test 2022-06-19 01:56:28 +01:00
Martin Green
b75a91ed70 test 2022-06-19 01:55:01 +01:00
Martin Green
02a3d6a359 test 2022-06-19 01:53:13 +01:00
Martin Green
8372d9d85c test 2022-06-19 01:52:09 +01:00
Martin Green
945373df67 test 2022-06-19 01:50:05 +01:00
Martin Green
26e952154e test 2022-06-19 01:44:57 +01:00
Martin Green
e33ce724c0 test 2022-06-19 01:41:48 +01:00
Martin Green
86b24c9dfe test 2022-06-19 01:39:30 +01:00
Martin Green
3465e9bd16 test 2022-06-19 01:37:51 +01:00
Martin Green
c9d7931ccb test 2022-06-19 01:35:32 +01:00
Martin Green
aad6b70736 test 2022-06-19 01:33:08 +01:00
Martin Green
d560b17ab6 test 2022-06-19 01:16:53 +01:00
Martin Green
18dbb847e3 test 2022-06-19 01:12:49 +01:00
Martin Green
84693b6524 test 2022-06-19 01:04:47 +01:00
Martin Green
5ac6bfd49a test 2022-06-19 01:03:45 +01:00
Martin Green
5666f1e9a7 test 2022-06-19 01:02:41 +01:00
Martin Green
b39a57786d test 2022-06-19 00:59:54 +01:00
Martin Green
4fe306d35f test 2022-06-19 00:57:04 +01:00
Martin Green
60b2e5e8c7 utf8 edit pages 2022-06-19 00:54:50 +01:00
Martin Green
18a58c1042 test 2022-06-19 00:49:07 +01:00
Martin Green
d9cfbc19ed test 2022-06-19 00:32:25 +01:00
Martin Green
372c7e0804 test 2022-06-19 00:27:10 +01:00
Martin Green
5f34a78d94 test 2022-06-19 00:25:48 +01:00
Martin Green
f0cfed2ef6 Future proof for filesystem encoding changing in the future 2022-06-18 23:43:21 +01:00
Martin Green
59a45871fd utf debugging 2022-06-18 23:37:37 +01:00
Martin Green
328347f8af debugging 2022-06-18 23:26:37 +01:00
Martin Green
845e70465e bug fix 2022-06-18 23:24:21 +01:00
Martin Green
6bcf70bb8b refactorisation to make debugging easier 2022-06-18 23:13:40 +01:00
Martin Green
41dfe08d2a try coverting path from utf8 2022-06-18 22:48:30 +01:00
Martin Green
38d23fd76b Attempting to fix utf8 urls by not type converting to string 2022-06-18 22:41:00 +01:00
Philip Sargent
bf6c6e56a6 fixing to work with python3.10 on a machine where 3.9 is default 2022-05-19 22:38:28 +03:00
Philip Sargent
b259e43de2 bad CSS from typo 2022-05-19 16:13:35 +03:00
Philip Sargent
1556ccd7f6 programmers note 2022-05-19 15:59:44 +03:00
Philip Sargent
a7baf4f3e6 restore Sit Index menu item 2022-05-19 15:58:54 +03:00
Philip Sargent
f0634ff164 specify default encoding explicitly 2022-04-28 00:30:43 +03:00
Philip Sargent
322d454d41 revert 2022-04-27 23:43:15 +03:00
Philip Sargent
cafde67c02 ISO-8859-1 fallback 1 2022-04-27 23:25:37 +03:00
Philip Sargent
362aedc2ac back to how it was 2022-04-27 23:07:02 +03:00
Philip Sargent
b3b10b0db7 ugh 2022-04-27 23:00:42 +03:00
Philip Sargent
3528587890 raise exception on live system 2022-04-27 22:58:43 +03:00
Philip Sargent
3bd308effa more superficial fixings 2022-04-27 22:35:20 +03:00
Philip Sargent
fbffbf0909 hack to make borken file less unreadable 2022-04-27 22:29:50 +03:00
Philip Sargent
f05e885517 workaround security update on distsortreversed
Due to Django security update CVE-2021-45116 which removed the capability of resolving a method in a template when called dictsortreversed
2022-04-23 22:42:46 +03:00
Philip Sargent
9ead6b00f9 warning text for broken table in page, pending fix 2022-04-20 23:18:05 +03:00
Philip Sargent
00eb978f5f fixed test broken by recent update 2022-04-20 21:22:38 +03:00
Philip Sargent
c9931fd45e survey legs calc fixed 2022-04-18 23:33:04 +03:00
Philip Sargent
3813b21dcf regularising _URL and _ROOT idiom 2022-04-18 22:48:49 +03:00
Philip Sargent
ccd386ff4e Better error message with permissions problems 2022-04-12 22:42:36 +03:00
Philip Sargent
d29f3030a4 remove redundant and old setting 2022-04-12 21:05:28 +03:00
Expo on server
fe53b08f35 Update the 'pagenotfound' page to reflect what users see. 2022-04-09 22:59:47 +01:00
Philip Sargent
5a64d9d3d0 test checks that localsettings is not out of step with code too 2022-04-07 01:20:44 +03:00
Philip Sargent
4b1012cbb4 comment out unused code prior to deletion 2022-04-07 01:13:54 +03:00
Philip Sargent
c0c4fb72ca local to new laptop 2022-04-06 21:07:43 +03:00
Philip Sargent
ed71fa48f1 cleaning unused settings 2022-04-06 21:01:31 +03:00
Philip Sargent
18c2892967 Make more robust to WSL chmod failures for tests 2022-04-06 20:43:26 +03:00
Philip Sargent
71ed0815cc Revert "update oddity with VS Code and WSL2"
This reverts commit 41b2bcee4f.

CR LF != LF issue
2022-04-05 10:38:52 +03:00
Philip Sargent
41b2bcee4f update oddity with VS Code and WSL2 2022-04-02 00:03:53 +03:00
1f3f60a6a3 Now easier to fix by hand 2022-03-31 00:21:42 +01:00
a9ef96f84e whackety whack 2022-03-31 00:07:47 +01:00
3390a62020 whack, whack.. 2022-03-31 00:06:54 +01:00
9461eed380 mole whacking 2022-03-30 23:56:40 +01:00
aeb210bd30 typo 2022-03-30 23:54:38 +01:00
d7246cbb98 UTF-8 failure thing 2022-03-30 23:53:57 +01:00
785500241e better debug 2022-03-30 21:29:52 +01:00
Philip Sargent
dddb9b1f57 Struggling to use venv pip with WSL2 Ubuntu-20.04 2022-03-30 02:17:08 +01:00
7f16bca7f7 Better error messaged and url 2022-03-29 15:31:25 +01:00
Philip Sargent
efeb0efd1e umlauts and edit this page 2022-03-25 02:05:10 +00:00
Philip Sargent
406259a8a2 make 1999 work like other years 2022-03-25 02:04:44 +00:00
Philip Sargent
7fd9497d5c bugfix 2022-03-24 21:20:53 +00:00
Philip Sargent
3617f9b6d9 bugfix and docum 2022-03-24 20:59:36 +00:00
Philip Sargent
1589188988 enable wallet view even if not logged in 2022-03-24 20:45:15 +00:00
Philip Sargent
a514355e5e to do updated 2022-03-24 01:16:43 +00:00
Philip Sargent
be410d4d9d minor refactoring 2022-03-24 01:05:50 +00:00
Philip Sargent
13ffe1fcc6 url to full logbooks fixed in logbookentry 2022-03-23 23:35:42 +00:00
Philip Sargent
9ccf5912d4 restored logbook cacheing 2022-03-23 22:55:59 +00:00
Philip Sargent
4c7deadb9a documenting fossils 2022-03-23 22:55:43 +00:00
Philip Sargent
42b615d16b survex legs bug fix 2022-03-23 20:05:38 +00:00
Philip Sargent
70efb10ece reordered main menu 2022-03-23 11:32:36 +00:00
Philip Sargent
8fd4f818b5 better err text for mysterious error 2022-03-22 02:24:26 +00:00
Philip Sargent
f1b206ad34 fixing bugs after wookey session 2022-03-22 02:22:15 +00:00
Philip Sargent
48171ae824 better fix 2022-03-18 20:45:40 +00:00
Philip Sargent
28fb4d1e94 |Another subtle bug 2022-03-18 20:43:01 +00:00
Philip Sargent
1d504e4066 bugfix 2022-03-18 20:09:49 +00:00
Philip Sargent
6a18511dd0 Fixing URLs for cave descriptions 2022-03-18 20:00:15 +00:00
Philip Sargent
6f32364675 fixed get_absolute_url error 2022-03-18 14:18:16 +00:00
Philip Sargent
3b997a32bf bugfix if no svx file 2022-03-18 12:55:08 +00:00
Philip Sargent
8b889ade5f Fix scanned walletindex pages 2022-03-18 12:26:32 +00:00
Philip Sargent
af7fc8f243 use new upload page for most wallets 2022-03-18 11:28:35 +00:00
Philip Sargent
e4ee4abce8 missing print msg 2022-03-18 10:21:25 +00:00
Philip Sargent
2544bc5f3d extra cross link URL to wallet reports 2022-03-18 02:49:45 +00:00
Philip Sargent
19d017a457 Edit contents.json online 2022-03-17 00:41:29 +00:00
Philip Sargent
e34f162688 Test photo upload 2022-03-16 12:43:39 +00:00
Philip Sargent
60fc66cdf5 package updates for Django 3.2 2022-03-16 11:02:54 +00:00
Philip Sargent
d3ddcba313 bug fixes 2022-03-15 23:00:23 +00:00
Philip Sargent
251e3bf844 Bug fixes 2022-03-15 20:53:55 +00:00
Philip Sargent
6bdd9be092 contnets.json now visible on form 2022-03-15 19:15:45 +00:00
Philip Sargent
3390f51049 Form creates wallet folder and contents.json 2022-03-15 17:04:43 +00:00
Philip Sargent
fac748d2e2 Better table titles 2022-03-13 23:48:22 +00:00
Philip Sargent
ad1283662d Django 3.2 package settings 2022-03-13 13:26:49 +00:00
Philip Sargent
bb8a92fff1 settings to enable Upload Photos 2022-03-13 11:26:29 +00:00
Philip Sargent
b65639df05 Upload form for Photos 2022-03-13 01:01:00 +00:00
Philip Sargent
f99ebf84e9 running cavern on svx files improved 2022-03-11 16:22:37 +00:00
Philip Sargent
8e78dd4a2e update menu 2022-03-10 22:59:47 +00:00
Philip Sargent
822f8a1699 Fix URL bug 2022-03-10 18:58:58 +00:00
Philip Sargent
488ce46d73 File upload forms descriptions 2022-03-08 22:59:04 +00:00
Philip Sargent
f32df567f2 Updated troggle menu with 2022 caves 2022-03-08 09:34:52 +00:00
Philip Sargent
d6cc32ee9a Detect more survex errors 2022-03-07 16:23:20 +00:00
Philip Sargent
3ac617431f Make .3d files in same dir as .svx 2022-03-06 01:29:45 +00:00
Philip Sargent
7a58aac08e Drawings uploads git works 2022-03-05 22:16:03 +00:00
Philip Sargent
a3a65524b8 better errors for drawings parsing & upload 2022-03-05 20:29:01 +00:00
Philip Sargent
88f5df0f19 More detailed debug output 2022-03-05 18:02:01 +00:00
Philip Sargent
5fe436e76a Add git status test for 3 repos 2022-03-05 17:42:12 +00:00
Philip Sargent
d7fd6b00ae Detect unwriteable file permissions earlier 2022-03-05 17:05:15 +00:00
Philip Sargent
32377f4e6c Cave import & reports fixes 2022-03-05 12:20:26 +00:00
Philip Sargent
1b9fccc2a4 Upversioned packages. Also now Dj4.0 capable. 2022-03-04 14:54:49 +00:00
Philip Sargent
dc4374cb9e Update to new Django admin styles for v3.x 2022-03-03 14:18:51 +00:00
Philip Sargent
7f41017ce3 git merge failure caught in svx files 2022-03-03 00:26:04 +00:00
Philip Sargent
02d58d440e WORKING both py3.9.10 & 3.8.10 (dj2.2.25) 2022-03-02 23:19:48 +00:00
Philip Sargent
73b26ec206 uses venv & links script 2022-03-02 23:18:39 +00:00
Philip Sargent
601fc2cffc WORKING Dj2.2.24 & 2.2.25 py3.7 2022-03-02 21:15:24 +00:00
Philip Sargent
af50d4912d Catch error if unfixed merges in survex files 2022-03-01 01:30:09 +00:00
Philip Sargent
8bd20f9600 Prospecting guide disabled - 100s bad URLs 2022-02-28 15:46:19 +00:00
Philip Sargent
6d435ee473 more comments 2022-02-26 23:20:59 +00:00
Philip Sargent
7f542b8936 LIBDIR automatically gets right python version 2022-02-25 18:33:34 +00:00
Philip Sargent
2c13c1b5f3 remove 'testing' from menu template too 2022-02-23 23:04:00 +00:00
Philip Sargent
29c929aba4 Update title to 2022 2022-02-23 22:52:55 +00:00
Philip Sargent
a87ef54492 remove 'testing' in search field 2022-02-23 22:51:37 +00:00
Philip Sargent
32e6d5f891 Update to-do lists and README text 2022-02-20 00:21:56 +00:00
Philip Sargent
ab8813e389 capture git subprocess errors 2021-12-30 23:27:42 +00:00
Philip Sargent
21ad6ecffb New debug page for subprocess runs 2021-12-30 22:46:34 +00:00
Philip Sargent
b359937eab remove chmod attempt 2021-12-30 21:13:34 +00:00
Philip Sargent
c0545b8777 separate chmod from context 2021-12-30 20:21:47 +00:00
Philip Sargent
4470c5abbd chmod after write 2021-12-30 20:08:24 +00:00
Philip Sargent
c3a54858d5 chmod with context handler 2021-12-30 20:03:34 +00:00
Philip Sargent
0a3037f077 let exceptions bubble up 2021-12-30 19:46:44 +00:00
Philip Sargent
84e165b8fc Move exception handling to calling View 2021-12-30 19:28:33 +00:00
Philip Sargent
5bad82b4f0 bug fix 2021-12-30 19:10:13 +00:00
Philip Sargent
d1e6125d15 add git commit to file saving in 3 places 2021-12-30 19:07:17 +00:00
Philip Sargent
26454bf6c6 first attempt EtP fix for cave pages 2021-12-30 14:15:08 +00:00
Philip Sargent
1da2be03e6 Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2021-12-30 01:01:07 +00:00
Philip Sargent
5aac280618 Bug fix and extra comment 2021-12-30 00:56:09 +00:00
Philip Sargent
928c451040 msg that control panel not working 2021-12-30 00:55:42 +00:00
9b44ba3ef2 precompile regexes 2021-12-19 14:24:20 +00:00
Philip Sargent
02e475642a fix final \n on edited files 2021-12-07 23:46:55 +00:00
Philip Sargent
406b4590a9 fix tests to match new error messages 2021-12-05 21:45:06 +00:00
Philip Sargent
b3aa99f008 Better error msgs for bad slugs 2021-12-05 21:23:06 +00:00
Philip Sargent
bb97b7c862 Catch permissions error. 2021-12-05 17:45:45 +00:00
Philip Sargent
1aef81dccc testing WSL2 & docm addn 2021-12-05 17:11:12 +00:00
8a43cf7dfb logbook cache reading broken - disabled 2021-11-11 22:57:49 +02:00
2391b5a504 Django 'command' system docm 2021-11-11 19:34:59 +02:00
e61bc7416e to-do list updates 2021-11-07 00:36:44 +02:00
64f89be6a9 docm .3d file generation for CaveView 2021-11-06 23:57:51 +02:00
b72706356d fixed mistaken DataIssue report 2021-11-06 23:37:31 +02:00
73ffb509f7 CaveView status is now documented 2021-11-06 22:59:10 +02:00
5723f57fc5 Add crossrefs to handbook UTM pages, laser points 2021-11-06 00:15:24 +02:00
c38aa357b7 Better error msg for overwriting 3d files 2021-11-05 23:51:10 +02:00
df43aae33d 2021 docm update re logbook imports 2021-11-05 23:01:10 +02:00
b461b87df6 fix unneeded runs of survex on survex mport 2021-11-05 22:59:54 +02:00
7575e8c16f fix old comments 2021-10-31 19:42:06 +02:00
2869f228d4 fix side effects in tests: git and file upload 2021-10-31 19:25:45 +02:00
252fcc4716 git install test and tidying 2021-10-31 18:01:14 +02:00
36f92c5c9c jslib docum 2021-10-31 17:59:11 +02:00
f13a98e53b moved to handbook 2021-10-29 22:34:49 +03:00
3f6fb260a4 moving docm from README to handbook 2021-10-29 22:18:36 +03:00
bf5d0556fc remove broken and ancient AERW map images 2021-10-26 19:00:18 +03:00
c774b14e04 remove unused JS code after checking it is redundant 2021-10-26 01:02:27 +03:00
b6bbec235c Remove refs to absent and unused JS & CSS 2021-10-25 01:00:02 +03:00
5533029072 tried old jquery CSS 2021-10-25 00:38:24 +03:00
5807e4a873 tidying unused and unavailable JSLIB bits 2021-10-25 00:04:02 +03:00
f9e8cf60bc Caveview docum added 2021-10-24 19:17:02 +03:00
9294c8c2f1 remove unneeded LIBDIR 2021-10-24 19:16:01 +03:00
0d7cbbea37 sanitize passwords before push to git on server 2021-10-23 21:07:16 +03:00
0fb6f1e4ed text moved from README.txt to handbook on expoweb 2021-10-23 00:08:39 +03:00
9130160bd6 new tests for CAVERN and SURVEXPORT 2021-05-13 23:15:30 +03:00
6410cc1090 , replace raise with error msg 2021-05-13 21:46:29 +03:00
ac11c56ca0 update to WSL on different machine 2021-05-13 00:13:11 +03:00
515a639fd0 update re git commit within testsuite 2021-05-13 00:10:53 +03:00
4503751907 improving README for a new dev install 2021-05-13 00:00:39 +03:00
Philip Sargent
3cc9fe4dd9 fix for server 2021-05-09 01:13:53 +01:00
Philip Sargent
e42cb582c7 1988, 1989 still bad 2021-05-09 00:55:37 +01:00
Philip Sargent
39cd616c90 survexstations also tabulated 2021-05-07 23:46:11 +01:00
Philip Sargent
8c5fdf5021 Entrance locations new report - url to cave 2021-05-07 23:21:57 +01:00
Philip Sargent
1ff723554c Northings and Easting report 2021-05-07 22:42:10 +01:00
Philip Sargent
41ed15f47f 1987 crashes too.. 2021-05-07 21:43:46 +01:00
Philip Sargent
d916d4125c 1989 crashes mysql too. duh. 2021-05-07 21:22:40 +01:00
Philip Sargent
4877a7ddc4 omit 1988 logbook, crashes mysql 2021-05-07 21:00:06 +01:00
Philip Sargent
c6bcb5fde9 wgs84 lat long for entrances 2021-05-07 20:44:58 +01:00
Philip Sargent
4cd7367a7e remove commented out bits 2021-05-07 19:38:26 +01:00
Philip Sargent
47d9d7d242 Parse all logbooks 2021-05-06 21:07:19 +01:00
Philip Sargent
c3c222e045 docm on JS files 2021-05-05 17:56:05 +01:00
Philip Sargent
d374779c47 dwg upload and django admin extra search 2021-05-05 00:35:10 +01:00
Philip Sargent
44b6770b6a oops. finished update on rename 2021-05-04 21:03:04 +01:00
Philip Sargent
1638f97d0c moved functions between files 2021-05-04 20:57:16 +01:00
Philip Sargent
b3fcd7765e renamed to uploadfiles 2021-05-04 20:56:44 +01:00
Philip Sargent
dc3379c186 fix end slash issue 2021-05-04 15:48:11 +01:00
Philip Sargent
b4abd7b6bc menu update 2021-05-04 15:44:46 +01:00
Philip Sargent
6d341a3cfe removed field from model 2021-05-04 15:43:10 +01:00
Philip Sargent
1d9d96f467 IFRAMES chnaged to DENY 2021-05-04 14:17:07 +01:00
Philip Sargent
56c3517328 fixed url ambiguity by rename 2021-05-04 14:16:48 +01:00
Philip Sargent
90bb0759a0 Drawing files upload form 2021-05-04 02:46:56 +01:00
Philip Sargent
9ae2e18fe6 delete redundant logbook dump 2021-05-03 23:45:02 +01:00
Philip Sargent
8ad791c594 rearranged config files 2021-05-03 22:47:57 +01:00
Philip Sargent
e6adced39d removed menu link to edit database object directly 2021-05-03 21:21:28 +01:00
Philip Sargent
fd95bb8198 split surveys->scans + drawings 2021-05-03 20:36:29 +01:00
Philip Sargent
9b9f6720e0 not found now does 404 & moved login 2021-05-03 20:35:35 +01:00
Philip Sargent
254b465755 git integration with Save this page 2021-05-03 00:52:51 +01:00
Philip Sargent
5a085ba7ba another todo quote 2021-05-02 22:48:25 +01:00
Philip Sargent
4782f3b184 fixed test mistake & bug in Edit This 2021-05-02 22:47:59 +01:00
Philip Sargent
51da26564f chnage img fix to import, not display 2021-05-02 15:50:20 +01:00
Philip Sargent
a9ffae9b87 Fix images in single logbook entries 2021-05-02 14:50:46 +01:00
Philip Sargent
3393db0fbc Bigger buttons, phone compatible 2021-05-01 18:35:08 +01:00
Philip Sargent
100209ea16 add cave column to wallets report 2021-05-01 00:19:04 +01:00
Philip Sargent
425b534c30 add wallet column to expo report 2021-05-01 00:18:39 +01:00
Philip Sargent
63640db81f remove unused templatetags load 2021-05-01 00:18:13 +01:00
Philip Sargent
03160f3863 Fix upload file test 2021-04-30 23:22:33 +01:00
Philip Sargent
7368942488 remove unused templatetags code 2021-04-30 23:21:38 +01:00
Philip Sargent
9a69ce50f9 remove unused templatetag code 2021-04-30 22:48:53 +01:00
Philip Sargent
b545f8ed40 cleaned & removed defunct wiki_to_html 2021-04-30 22:44:03 +01:00
Philip Sargent
be0148d146 removing cruft, renaming badly named things 2021-04-30 21:32:53 +01:00
Philip Sargent
8f1d6e2cc2 file upload integration test working 2021-04-30 18:02:05 +01:00
Philip Sargent
fde30685a8 bugfix 2021-04-30 03:52:30 +01:00
Philip Sargent
bdf535fcbf Scan Upload working nicely 2021-04-30 03:44:53 +01:00
Philip Sargent
03a5f5989e chipping away bug in personexpedition, remove role 2021-04-30 00:24:36 +01:00
Philip Sargent
e5cf1b5289 download logbook in standard HTML works 2021-04-28 02:43:09 +01:00
Philip Sargent
62799d196b tabs to spaces 2021-04-28 00:50:36 +01:00
Philip Sargent
cb6619a90a buxfixes 2021-04-28 00:50:26 +01:00
Philip Sargent
b9fad1f4fb new path() interacts badly with include(). fixed 2021-04-28 00:48:20 +01:00
Philip Sargent
5e478c7eb0 Imports in control panel work again 2021-04-27 20:44:24 +01:00
Philip Sargent
821aaa1f66 Changing to new path() url function (initial) 2021-04-27 19:02:11 +01:00
Philip Sargent
942cbdd4b2 clean out broken QM bits 2021-04-27 15:38:20 +01:00
Philip Sargent
13f3057185 bugfixes 2021-04-27 14:51:04 +01:00
Philip Sargent
81d58f1275 delete: never implemented properly 2021-04-27 14:50:26 +01:00
Philip Sargent
e236e792ec todo: parsing caves 2021-04-27 00:32:01 +01:00
Philip Sargent
9e7414e0e0 remove autologbooks function 2021-04-27 00:31:23 +01:00
Philip Sargent
e6eeaf1674 two caves no longer pending 2021-04-26 23:47:08 +01:00
Philip Sargent
49b9225b6e rename scansfolder to wallet 2021-04-26 19:50:03 +01:00
Philip Sargent
7f64670f36 reanme manyscansfolders to manywallets 2021-04-26 19:22:29 +01:00
Philip Sargent
7dd5840353 reanem tunnelcontains to dwgcontains 2021-04-26 18:54:17 +01:00
Philip Sargent
72df5d5213 /tunneldata/ to /drawings/ 2021-04-26 18:45:21 +01:00
Philip Sargent
d43ce1bdb2 rename TUNNEL_DATA as DRAWINGS_DATA 2021-04-26 18:42:10 +01:00
Philip Sargent
bd647b99ec rename tunnelname as dwgname 2021-04-26 18:37:59 +01:00
Philip Sargent
0997fd0901 rename ScansFolder class as Wallet 2021-04-26 18:18:16 +01:00
Philip Sargent
dc840c9bc7 tunnelpath to dwgpath 2021-04-26 18:11:14 +01:00
Philip Sargent
37403a7234 renamed tunnel to drawing or dwg 2021-04-26 18:08:42 +01:00
Philip Sargent
f0d291f527 rename surveyscansfolder(s) to scanwallet(s) 2021-04-26 17:46:23 +01:00
Philip Sargent
b8803c8e5b rename surveyscansingle 2021-04-26 17:40:48 +01:00
Philip Sargent
9e11c0814e missing entrance .html file now handled differently 2021-04-26 17:23:23 +01:00
Philip Sargent
72fa8a5883 Making entrances work for pending caves 2021-04-26 02:10:45 +01:00
Philip Sargent
a656ada67a Fixing cave edit form and cave creation parser 2021-04-25 04:04:53 +01:00
Philip Sargent
20c42b14bf update to MariaDB management 2021-04-25 01:48:03 +01:00
Philip Sargent
4e59c8791f copied comments from the html template file to the xml template too 2021-04-25 01:47:34 +01:00
Philip Sargent
8128870d57 more robust logbooks parsing 2021-04-24 01:23:55 +01:00
Philip Sargent
b979bdb560 slug too long for field 2021-04-23 16:31:52 +01:00
Philip Sargent
b7659a477c Deep fix, nonunique ids in logbookentries fixed 2021-04-23 16:11:50 +01:00
Philip Sargent
343d6cf350 delete old forms, templates. fix logdataissues 2021-04-23 11:43:25 +01:00
Philip Sargent
dbd186e299 make ?reload private and clean old error msgs 2021-04-23 03:07:21 +01:00
Philip Sargent
1a4be0f02e stop file logging from tests 2021-04-23 03:05:22 +01:00
Philip Sargent
8f89b022c7 drawing file upload form working 2021-04-22 02:45:28 +01:00
Philip Sargent
74403d28e9 fix field in search box so no need to delete it 2021-04-21 22:09:42 +01:00
Philip Sargent
1968db62ad archeology on the logbook entry editing forms 2021-04-21 22:09:20 +01:00
Philip Sargent
bcdb3572fa Add new per-module ToDo texts 2021-04-21 19:08:42 +01:00
Philip Sargent
18938c9fca more attempts to recognise scotsmen 2021-04-20 23:57:51 +01:00
Philip Sargent
8f0e7435d6 renaming 'tunnel' to 'dwg' in urls and views 2021-04-20 23:57:19 +01:00
Philip Sargent
bad5484d12 fix for missing scotsmen 2021-04-20 23:14:10 +01:00
Philip Sargent
b4ba3c40eb catch unknown scotsman error 2021-04-20 22:58:41 +01:00
Philip Sargent
3b0c6ef2ea Better labels for objects in admin console 2021-04-20 19:47:08 +01:00
Philip Sargent
7a6578e205 Now Django 3.2 compatible without deprcation warnings. 2021-04-20 19:46:32 +01:00
Philip Sargent
a2083c5310 disabling Google FLoC 2021-04-19 01:47:12 +01:00
Philip Sargent
879f6c288e Make troggle compatible with Django 3.1 2021-04-19 01:32:18 +01:00
Philip Sargent
e17a21defd Tests work on cave, person, expedition pages 2021-04-18 01:58:24 +01:00
Philip Sargent
eea74406c9 fix template bug for newentrance 2021-04-17 23:59:11 +01:00
Philip Sargent
d4317b5fd3 better error pages 2021-04-17 21:24:37 +01:00
Philip Sargent
25b8fc2e1d test suite with users logins 2021-04-17 20:45:38 +01:00
Philip Sargent
f8b613e0aa prospect and moving code to better places 2021-04-17 01:41:06 +01:00
Philip Sargent
4ad7033285 working, but very faint 2021-04-16 21:47:40 +01:00
Philip Sargent
eca0bcc6d8 oops 2021-04-16 21:29:32 +01:00
Philip Sargent
fa1df39923 stopo prospecting map crashing 2021-04-16 21:28:44 +01:00
Philip Sargent
49277216ba Fixed cave sort-order in cave index 2021-04-16 16:01:35 +01:00
Philip Sargent
16ef4fa9fb split out prospecting guide code 2021-04-16 03:05:39 +01:00
Philip Sargent
9695e49024 add link to all expedition pages back to expoweb /year/ page 2021-04-16 01:56:43 +01:00
Philip Sargent
540ce7c076 bug fix in error message 2021-04-15 18:06:04 +01:00
Philip Sargent
27491c933a enabled mugshots & blurb in people pages 2021-04-15 17:51:01 +01:00
Philip Sargent
7124d978d3 add 'del' and 'delfirst' options 2021-04-15 14:27:16 +01:00
Philip Sargent
0fee2bb165 add labels to templates to help debugging 2021-04-15 12:55:13 +01:00
Philip Sargent
3e50d0edca renaming CSS files for clarity 2021-04-15 12:34:51 +01:00
Philip Sargent
38a63641bc abort messages when parsing caves 2021-04-15 01:52:09 +01:00
Philip Sargent
5c4a33873f cull old CSS 2021-04-15 01:51:42 +01:00
Philip Sargent
c2c7de4c59 more cave parsing data fixes 2021-04-14 22:50:47 +01:00
Philip Sargent
d598a6d0f5 better integration of svx file DatIssues 2021-04-14 21:08:06 +01:00
Philip Sargent
db3addc819 Detects missing svx and description files 2021-04-14 18:24:08 +01:00
Philip Sargent
d8b1d59b12 Cave and Entrance forms tuned to user needs 2021-04-14 16:28:30 +01:00
Philip Sargent
54d98f58f3 docum and defaults in template cave-data xml 2021-04-14 01:52:42 +01:00
Philip Sargent
4a13232467 stop being so verbose 2021-04-14 00:12:27 +01:00
Philip Sargent
ba0f573618 restored cave edit capability 2021-04-14 00:11:59 +01:00
Philip Sargent
2f03f77ce4 rename function more accurately 2021-04-13 23:52:56 +01:00
Philip Sargent
daf58e9e45 replace assert() with message logging 2021-04-13 22:27:01 +01:00
Philip Sargent
2467065ac3 actually needed it seems. 2021-04-13 02:29:24 +01:00
Philip Sargent
0820d7c0dc Docstrings for all modules 2021-04-13 01:37:42 +01:00
Philip Sargent
267741fa8b fixing typos and changes in importing 2021-04-13 01:13:08 +01:00
Philip Sargent
7bc73d1ca8 move models_survex to models/survex.py 2021-04-13 00:50:12 +01:00
Philip Sargent
957169d9aa move models_caves to models/caves.py 2021-04-13 00:47:17 +01:00
Philip Sargent
5b3b0e67e9 create core/models/ directroy 2021-04-13 00:43:57 +01:00
Philip Sargent
304bbd230a deprecated non-raw regex 2021-04-13 00:18:30 +01:00
Philip Sargent
ca1df94be5 moved clever slash middleware & unused.py 2021-04-13 00:14:15 +01:00
Philip Sargent
2a1710596a moving save_carefully() 2021-04-13 00:11:08 +01:00
Philip Sargent
b602f3ae13 creating core/utils.py 2021-04-12 23:58:48 +01:00
Philip Sargent
5024abc812 add url field to DataIssue 2021-04-12 01:28:54 +01:00
Philip Sargent
dbd9b1a095 Enable svx view if url just misses off .svx 2021-04-12 01:16:49 +01:00
Philip Sargent
f6f83c6f70 data issues much easier to read 2021-04-12 01:00:47 +01:00
Philip Sargent
bc9b4f508b Public Import Errors webpage 2021-04-11 20:00:09 +01:00
Philip Sargent
7f5ac93cc6 url dispatcher tidying 2021-04-11 03:02:06 +01:00
Philip Sargent
5d4ad93c51 Better FileNotFound in expofiles 2021-04-10 15:30:29 +01:00
Philip Sargent
a7e59b2bb0 clear cache on parsing & 2.2.19 notes 2021-04-10 02:12:13 +01:00
Philip Sargent
876868506f tidy obsolete troggle/code/reset_db 2021-04-10 01:14:23 +01:00
Philip Sargent
6dc54adec8 Cache enabled for 'expedition' pages 2021-04-10 01:07:49 +01:00
Philip Sargent
16a6e05849 Dj2.2.19 LTS tested. 2021-04-08 01:37:59 +01:00
Philip Sargent
f16d9a5848 Therion renaming missed one 2021-04-08 01:22:09 +01:00
Philip Sargent
cb5b80353d Therion files now handled 2021-04-08 01:09:06 +01:00
Philip Sargent
b7d54111ba Import Therion files too 2021-04-07 21:53:43 +01:00
Philip Sargent
bf74913486 compatible with Dj2.1.5 2021-04-07 21:53:17 +01:00
Philip Sargent
e3a341eb22 chnage maintenance menus & move tests 2021-04-07 16:04:27 +01:00
Philip Sargent
785d6360cd Now compat with Dj2.0.13 & 1.11.29 2021-04-06 22:50:57 +01:00
Philip Sargent
05ed8af158 remove 'register' bad link 2021-04-06 01:19:50 +01:00
Philip Sargent
d1cd72c5f8 New user login/logoff system using standard Dj 2021-04-06 00:49:09 +01:00
Philip Sargent
6d6bec35f2 fix incorrect folder when showing index.html 2021-04-05 15:48:48 +01:00
Philip Sargent
9db1a8490c fix bug in parsing bad HTML pages e.g.expo 82 2021-04-05 14:49:06 +01:00
Philip Sargent
409037bdf3 tiny tidyings 2021-04-05 14:01:15 +01:00
Philip Sargent
53fef14024 transaction incompatible with migrate Django 2+ 2021-04-04 01:44:41 +01:00
Philip Sargent
c08356876d missed a wiki_markup ref 2021-04-03 21:59:18 +01:00
Philip Sargent
4d7e3d6866 no permission for this on expo server 2021-04-03 21:09:16 +01:00
Philip Sargent
ab5512e9d6 bugger, missed this edit 2021-04-03 20:54:33 +01:00
Philip Sargent
f6ae46e352 3d CaveView regeneates .3d file in cache 2021-04-03 20:52:35 +01:00
Philip Sargent
7ee7a05ea1 typos in templates 2021-04-03 00:35:31 +01:00
Philip Sargent
e559a1dabd commentary in prospecting guide 2021-04-03 00:35:10 +01:00
Philip Sargent
8707e4a819 fix missing slug field in pending caves 2021-04-03 00:34:34 +01:00
Philip Sargent
912e447200 fix password import error 2021-04-03 00:33:55 +01:00
Philip Sargent
52c1dabd0e survex_file field inconsistency detection & edit 2021-04-02 23:21:23 +01:00
Philip Sargent
bd8d59b343 restoring wiki_markup where still used 2021-04-02 23:17:54 +01:00
Philip Sargent
ea221281a3 remove unused {% load link %} 2021-04-02 20:54:18 +01:00
Philip Sargent
cc5b4fa650 remove {% load wiki_markup %} 2021-04-02 20:41:42 +01:00
Philip Sargent
663d4a2a02 JSLIB and tidy path settings 2021-04-02 19:22:53 +01:00
Philip Sargent
371542fb1e Caveview enabled - local copy 3MB 2021-04-02 19:02:10 +01:00
Philip Sargent
b71f2c4ebb rename wiki folder 2021-04-02 15:52:56 +01:00
Philip Sargent
d841faa057 login decorator moved into views & .gitignore 2021-04-02 15:51:14 +01:00
Philip Sargent
c8cc1673e0 enable non-cave html and images redirection 2021-04-01 21:44:03 +01:00
Philip Sargent
d6409b22c2 Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2021-04-01 20:46:35 +01:00
Expo on server
35697b9af5 ignoire localsettings AGAIN 2021-04-01 20:46:26 +01:00
Philip Sargent
7374244806 Merge branch 'python3-new' of ssh://expo.survex.com/home/expo/troggle into python3-new 2021-04-01 20:27:52 +01:00
Expo on server
391790d648 ignoire localsettings AGAIN 2021-04-01 20:27:23 +01:00
Philip Sargent
f752f934b6 fix cave description view 2021-04-01 20:08:57 +01:00
Philip Sargent
573dba4712 ignore localsettings.py again 2021-04-01 02:57:35 +01:00
Philip Sargent
51de825189 making PHOTOS files served correctly by troggle 2021-04-01 02:50:30 +01:00
Philip Sargent
4c0ad53b3a culling unused JS 2021-04-01 02:44:49 +01:00
Philip Sargent
8f790309ce tests for new /site_media/ management 2021-03-31 23:41:46 +01:00
Philip Sargent
2690203912 new method for /site-media/, /static/, /photos/ 2021-03-31 23:19:48 +01:00
Philip Sargent
9d8a44696b remove garbage & duplicated code 2021-03-31 22:13:51 +01:00
Philip Sargent
7cccf4daf1 move *_views files to /views/* 2021-03-31 21:51:17 +01:00
Philip Sargent
e1cf43c260 trailing slashes fixed 2021-03-31 20:18:46 +01:00
Philip Sargent
a6ed0a964e making flat files delivery more robust 2021-03-31 17:57:43 +01:00
Philip Sargent
3452c2c5d4 flatpages to expopages 2021-03-31 16:14:36 +01:00
Philip Sargent
577bd51613 Moved secrets to credentials.py 2021-03-31 13:00:09 +01:00
Philip Sargent
b3b2356a7e expopages now troggle/core/views_expo 2021-03-30 21:48:36 +01:00
Philip Sargent
b75baffdcf delete unused profiles app 2021-03-30 21:09:01 +01:00
Philip Sargent
cacae6a9cd rename flatpages as expopages to reduce confusion 2021-03-30 21:05:27 +01:00
Philip Sargent
0f024b27f0 Replace assert() with DataIssue message 2021-03-29 02:06:19 +01:00
Philip Sargent
c81f17c24b more tests for files served from several places 2021-03-28 23:48:36 +01:00
Philip Sargent
623483f3b1 Fixing multiple caves with same kataser no 2021-03-28 23:47:47 +01:00
Philip Sargent
0ecaa9b8ee Disable "secure" (i.e. SSL trabsport only) cookies 2021-03-28 15:40:07 +01:00
Philip Sargent
a99020078c tidy render() calls 2021-03-28 03:48:24 +01:00
Philip Sargent
a4c892b696 fixed serving expofiles from test server 2021-03-28 03:48:04 +01:00
Philip Sargent
c4cd2178f7 we will never test or host on naked Windows 2021-03-27 23:28:12 +00:00
Philip Sargent
c7475cda83 merge expeditions and statistics pages 2021-03-27 20:05:15 +00:00
Philip Sargent
ffaaea497c re-ordering middleware and logon system 2021-03-27 18:22:07 +00:00
Philip Sargent
e7947069a2 should all be working, but isn't 2021-03-26 23:40:34 +00:00
Philip Sargent
0abd8aedff layout tidying 2021-03-26 21:20:08 +00:00
Philip Sargent
dba0fd8b20 remove survexblock webpage - redundant 2021-03-26 21:19:31 +00:00
Philip Sargent
ec83c1ff12 csrf continued 2021-03-26 19:42:58 +00:00
Philip Sargent
1c7e99e91b attempting to enable csrf cookie robustly 2021-03-26 17:33:58 +00:00
Philip Sargent
f5e799d632 new remote expofiles option 2021-03-26 13:51:00 +00:00
Philip Sargent
2e068d3fbb move mistake to expoweb 2021-03-26 13:30:40 +00:00
Philip Sargent
713db304e2 deleting unused old utilities 2021-03-26 13:14:52 +00:00
Philip Sargent
3487c22da3 Survex 1624, 1626, 1627 now displayed robustly 2021-03-26 02:01:29 +00:00
Philip Sargent
65c3cb31d7 improved display of survex files for a cave 2021-03-25 20:23:25 +00:00
Philip Sargent
80874887cc 404 fix attempt 2021-03-25 16:15:58 +00:00
Philip Sargent
8723d62add Survex files subdirectories displayed differently 2021-03-25 16:15:26 +00:00
Philip Sargent
213ada4ae9 unused app pending deletion 2021-03-25 16:13:58 +00:00
Philip Sargent
70684a29c6 1982 giving problems. Caved ID issue suspected. 2021-03-24 22:00:51 +00:00
Philip Sargent
06c4d026f8 skip years crashing parser 2021-03-24 21:40:52 +00:00
Philip Sargent
65be64c756 type data added to report 2021-03-24 21:16:06 +00:00
Philip Sargent
2fe2c0515f update push procedure and fix order in pathsreport 2021-03-24 20:38:43 +00:00
Philip Sargent
ecbef84c37 sanitised server settings 2021-03-24 17:34:40 +00:00
Philip Sargent
39194704f5 pathlib updates 2021-03-24 17:32:45 +00:00
Philip Sargent
9a91487375 pathlib for path management & cavelist fixes 2021-03-24 15:46:35 +00:00
Philip Sargent
7f37327bcd Fixing cave list webpage 2021-03-24 00:55:36 +00:00
Philip Sargent
a9fa251fee now robust re svx in folders unofficial numbers 2021-03-23 17:35:41 +00:00
Philip Sargent
4e00645851 fix if empty directory present & display 144, 40 2021-03-23 16:36:55 +00:00
Philip Sargent
87b30741fc more mimetypes for flatfiles 2021-03-22 02:27:19 +00:00
Philip Sargent
a0f504d1e2 new self-adjusting paths 2021-03-22 02:26:46 +00:00
Philip Sargent
24bab23508 server setup docum 2021-03-22 02:26:11 +00:00
Philip Sargent
a0c3ef8ea1 comments on urls resolution re apache & bugfix 2021-03-21 01:37:52 +00:00
Philip Sargent
b4b343b578 survex syntax colouring - local copies 2021-03-21 01:36:08 +00:00
Philip Sargent
18b570d750 remote /expofiles/ now for runserver dev 2021-03-21 01:33:59 +00:00
Philip Sargent
314f600523 Dj1.11.29 running - trimmed unneeded packages 2021-03-17 21:09:44 +00:00
Philip Sargent
6ac65cf893 Buxfix for cave search not finding any cave file 2021-03-17 20:58:25 +00:00
Philip Sargent
5836c6ff90 Importing old logbooks 2021-02-06 00:18:48 +00:00
Philip Sargent
a4d7183260 Added link to Kataster list on link to new cave form 2020-08-02 23:54:14 +01:00
Philip Sargent
d61c2b20c8 Deleted archaisms and new comments 2020-08-02 23:53:35 +01:00
Philip Sargent
3dcc8883cd Updated Troggle Article 2020-07-31 04:44:29 +01:00
Philip Sargent
3574dd4b1e Fix skipped import error messages for drawings 2020-07-29 22:54:53 +01:00
Philip Sargent
95b9daca80 remove commented out code, more comments 2020-07-29 22:54:09 +01:00
Philip Sargent
42456e8e98 fix server instructions + comment in stats output 2020-07-28 01:46:00 +01:00
Philip Sargent
0094cf7054 clean troggle menu and drawingfiles layout 2020-07-28 01:22:06 +01:00
Philip Sargent
d4c79ab66b add docutils needed and SVX_URL 2020-07-28 00:08:35 +01:00
Philip Sargent
57b8242f7e utf-8 templates .gitignore 2020-07-28 00:08:34 +01:00
Expo on server
a624cc8a68 restoring .gitignore 2020-07-28 00:06:07 +01:00
Expo on server
b5b0e4191a Remove generated lines-of-templates.txt file 2020-07-27 01:52:36 +01:00
Philip Sargent
0403c68429 enabling django/admin/ auto documentn. functions 2020-07-26 23:38:17 +01:00
Philip Sargent
f1ceb38f5f fix for no comma after lat item in django template 2020-07-26 21:11:29 +01:00
Philip Sargent
0cf3b869af First implementation of html API, both TSV and JSON 2020-07-26 20:48:25 +01:00
Philip Sargent
69b843a824 Removing editLogbookEntry capability 2020-07-26 03:22:37 +01:00
Philip Sargent
924c5a3bf8 Delete commented-out code 2020-07-26 02:26:04 +01:00
Philip Sargent
809633bdd3 Fixed QMs in Admin control panel &remv. OtherCave 2020-07-23 02:16:08 +01:00
Philip Sargent
64727e0d3a Commented-out unused CaveDescription object 2020-07-23 01:24:06 +01:00
Philip Sargent
2a0aee5bf5 remove NewSubCave 2020-07-23 01:08:45 +01:00
Philip Sargent
c65544a377 differences between sqlite and MariaDB 2020-07-22 23:51:50 +01:00
Philip Sargent
a6ed0997e8 No speedup for database init. 2020-07-22 23:44:25 +01:00
Philip Sargent
721341604c Speed up migrations and init 2020-07-22 23:43:07 +01:00
Philip Sargent
3e3cae507c More transactions enabled. 2020-07-22 23:36:46 +01:00
Philip Sargent
1ef5924f0c Two more transactions 2020-07-22 23:27:25 +01:00
Philip Sargent
070157eacb TRansX speedup for import + remove fossil profiles 2020-07-22 23:14:10 +01:00
Philip Sargent
fbf5daff0e gitignor generated files 2020-07-22 23:14:10 +01:00
Philip Sargent
427afa9ebd Removing foissil: subcave and flatpages-redirects 2020-07-22 23:14:09 +01:00
Philip Sargent
190514597b apache restart 2020-07-22 23:14:09 +01:00
Expo on server
92de606bc6 removing files which are generated 2020-07-22 23:14:02 +01:00
Philip Sargent
5aed96c5a6 mistake 2020-07-21 00:18:02 +01:00
Philip Sargent
5bc2c132fa fix makes prospecting_guide work 2020-07-21 00:15:53 +01:00
Expo on server
f7db908cb2 generated files should be in gitignore 2020-07-20 23:51:15 +01:00
Philip Sargent
1bc82dea15 make survexblock titles 200 chars 2020-07-20 23:25:49 +01:00
Philip Sargent
f131509c56 3dtopos to survexpos + comments 2020-07-20 22:53:26 +01:00
Expo on server
8e77a70ad6 remove unused SVX_URL variable 2020-07-20 20:11:07 +01:00
Expo on server
867486e72e remove leftover diff file 2020-07-20 20:10:31 +01:00
Philip Sargent
28130de9cb avoiding problem with WSGI populate() error 2020-07-20 18:31:50 +01:00
Philip Sargent
1523586b37 test2 option and gitignore updates 2020-07-20 13:04:30 +01:00
Expo on server
d7838e2a42 migraitons files should be in gitign9ore 2020-07-20 12:54:32 +01:00
Philip Sargent
eb923af44f webpage tests created (no database) 2020-07-19 01:23:07 +01:00
Philip Sargent
edd5a3efd9 Module documentation docstrings 2020-07-18 16:23:54 +01:00
Philip Sargent
90dfa516da *team format updates 2020-07-09 18:06:03 +01:00
Philip Sargent
37620b4dbc *units factor x and feet 2020-07-08 00:00:56 +01:00
Philip Sargent
71b5383090 parse 2006 logbook from html 2020-07-07 19:07:45 +01:00
Philip Sargent
52afb9f466 units conversion not quite working 2020-07-07 02:46:18 +01:00
Philip Sargent
efc43b0863 *units in feet and metres, subcaves 2020-07-07 01:35:58 +01:00
Philip Sargent
ff3cdb10dc extra error printout and remove old code 2020-07-06 21:46:58 +01:00
Philip Sargent
d27a74c97b per svxfile debug printing enabled 2020-07-06 21:46:19 +01:00
Philip Sargent
d2833d26cc fix schema and try cache caves import 2020-07-06 20:27:31 +01:00
Philip Sargent
8530b0643d person attribution of surveyed length working 2020-07-06 01:24:43 +01:00
Philip Sargent
3f9971d2ee title and wallet folders working in /survexfile/258 2020-07-05 17:22:26 +01:00
Philip Sargent
5be41c8163 splays and alias splays implemented 2020-07-04 13:31:46 +01:00
Philip Sargent
51d0daafdd QM placeholder logbook entries sorted out 2020-07-04 01:10:53 +01:00
Philip Sargent
5ed6271c08 rename variables and leglength calc 2020-07-04 01:10:17 +01:00
Philip Sargent
abbe8d467b refactored LinearLoad(), output unchanged 2020-07-03 18:08:59 +01:00
Philip Sargent
fd6f0b0a35 stack-based state of *data fixed 2020-07-03 17:22:15 +01:00
Philip Sargent
67f66b72e8 State push/pop working 2020-07-03 14:53:36 +01:00
Philip Sargent
e54436e818 chaos monkey 2020-07-02 16:26:05 +01:00
Philip Sargent
9a514e7d3f rebuild all .3d files and progress on compass/clino/tape 2020-07-02 16:25:51 +01:00
Philip Sargent
6cd660982c More informative html in templates 2020-07-02 16:24:39 +01:00
Philip Sargent
df434cd399 SurvexBlocks now importing in deatil 2020-07-01 22:49:38 +01:00
Philip Sargent
8cc768e5b6 fix survexdirectories to ref files properly 2020-07-01 17:41:09 +01:00
Philip Sargent
5feb07e3f6 Creates folders as needed on editing new svx file 2020-07-01 00:20:27 +01:00
Philip Sargent
514887d19f Fix needed for pending caves with no xml file 2020-06-30 17:59:53 +01:00
Philip Sargent
ae892a07d4 ignore autogenerated db schema & migrations files 2020-06-30 17:34:35 +01:00
Philip Sargent
f76e0d3a16 rename Tunnel files to Drawings files - phase 1 2020-06-30 15:52:29 +01:00
Philip Sargent
0a57ac3132 all SurvexDirectory set OK, pending caves made 2020-06-30 15:39:24 +01:00
Philip Sargent
6b0275d035 CASCADE on delete removed from key foregin keys 2020-06-30 15:26:03 +01:00
Philip Sargent
be2b17ea85 More debugging and warnings 2020-06-30 15:24:42 +01:00
Philip Sargent
c4e2ae2395 add memory footprint display 2020-06-30 15:22:41 +01:00
Philip Sargent
39f042240d Fix SurvexDirectory import 2020-06-29 21:16:13 +01:00
Philip Sargent
a60a495c83 Creating forgotten caves & better GetCaveLookup() 2020-06-29 21:15:42 +01:00
Philip Sargent
459ed11b58 avoiding problem in KH QMs import 2020-06-28 15:57:40 +01:00
Philip Sargent
bf1c683fd0 fixing parent blocks & titles 2020-06-28 14:42:26 +01:00
Philip Sargent
122cdd7fc8 replace GetCaveByReference 2020-06-28 01:50:34 +01:00
Philip Sargent
899ba13df4 working and refactored 2020-06-27 19:00:26 +01:00
Philip Sargent
467baec7da Renaming functions 2020-06-27 18:00:24 +01:00
Philip Sargent
4716eaa4b6 Working. More fault checking. 2020-06-27 17:55:59 +01:00
Philip Sargent
c55716df08 move function (correctly this time) 2020-06-27 12:08:02 +01:00
Philip Sargent
ca6f7ed587 move function 2020-06-27 12:04:34 +01:00
Philip Sargent
e2713cfe2d recursive scan *import to make linear filelist 2020-06-27 00:50:40 +01:00
Philip Sargent
030c49ff7c rewritten QM loading from SVX files 2020-06-25 03:17:56 +01:00
Philip Sargent
d3654266ee Better error msgs, one bug fix 2020-06-25 02:10:20 +01:00
Philip Sargent
04f14c91f0 rearrange ref and comment detection 2020-06-24 22:46:18 +01:00
Philip Sargent
664c18ebbe refactor team and ignore sections 2020-06-24 19:07:11 +01:00
Philip Sargent
3645c98685 extract *date function 2020-06-24 17:55:42 +01:00
Philip Sargent
45bbfce4d3 extract *ref, ;ref and ;QMs to functions 2020-06-24 14:49:39 +01:00
Philip Sargent
bb69cc073a start refactor survex import 2020-06-24 14:10:13 +01:00
Philip Sargent
dc5a53376d exploring recusrive behaviour 2020-06-24 02:33:43 +01:00
Philip Sargent
6bf762b72f bin Makesurvexstation, survextitle, survexEquate 2020-06-24 01:57:20 +01:00
Philip Sargent
d6c4ffca5a tunnelfile.scans name change for compatibility 2020-06-24 00:36:32 +01:00
Philip Sargent
c91aa4be47 Simple renaming too-similar variables 2020-06-24 00:18:01 +01:00
Philip Sargent
9cd70b31ac simple rename survexscansfolder to scansfolder 2020-06-23 23:46:33 +01:00
Philip Sargent
b64c779a58 rename SurvexScansFolders and tidy survex parser 2020-06-23 23:34:08 +01:00
Philip Sargent
2e7cf188af cosmetic and moving a funciton 2020-06-23 22:44:06 +01:00
Philip Sargent
674cea629d clean up import statements: more specific 2020-06-22 00:03:23 +01:00
Philip Sargent
8199e67b79 re-ordered middlkeware 2020-06-21 00:06:03 +01:00
Philip Sargent
7b260006bf dj.-reg. 2.5.2 all tested. 2020-06-20 23:26:50 +01:00
Philip Sargent
f3232cc5df More security, middleware upgrade, dj-reg.2.5 2020-06-20 23:08:34 +01:00
Philip Sargent
477a289c2e Working with django-registration==2.4 2020-06-20 20:42:10 +01:00
Philip Sargent
77c80d1a69 remove in-memory phase of data import 2020-06-20 19:55:23 +01:00
Philip Sargent
f608fc186e Fixup after rebase and pre- scripts fixed 2020-06-20 17:19:50 +01:00
Philip Sargent
e697466557 Cleanup secrets management, pre-run checks. 2020-06-20 16:51:07 +01:00
Philip Sargent
b35a0b0d26 Fully working dj 1.11.29 2020-06-19 16:39:05 +01:00
Philip Sargent
2c469718f6 caves, scans, survex work in databaseRest 2020-06-19 00:26:15 +01:00
Philip Sargent
4a51de95c4 Django 1.11.19 runs clean on pre-built db. 2020-06-18 22:44:41 +01:00
Philip Sargent
ee1d4bb600 static files icons into troggle repo 2020-06-18 21:51:19 +01:00
Philip Sargent
d9c6986a89 static files redone 2020-06-18 21:50:16 +01:00
Philip Sargent
bd6490631f edit this page working 2020-06-18 15:54:40 +01:00
Philip Sargent
640e1e3b5e cleaner warnings but site_media still not ok 2020-06-18 12:10:42 +01:00
Philip Sargent
f4231456e7 admin urls 2020-06-18 11:48:50 +01:00
Philip Sargent
222d85f052 regex deprecation warning 2020-06-18 10:59:11 +01:00
Philip Sargent
ee92182163 n_delete=... soon to be required 2020-06-18 00:20:47 +01:00
Philip Sargent
55dd577275 New url dispatcher OK 1.9.13 2020-06-17 22:55:51 +01:00
Philip Sargent
4941d230e2 TEMPLATES done for dj 1.9.13 2020-06-17 21:27:01 +01:00
Philip Sargent
660479d692 django 1.9.13 initial 2020-06-17 01:00:50 +01:00
Philip Sargent
b153fafa9f django 1.8.19 2020-06-16 22:16:48 +01:00
Philip Sargent
adc43324f3 move TEMPLATE to localsettings 2020-06-16 19:30:06 +01:00
Philip Sargent
f6bd08029f remove useless nulls on ManyToMany 2020-06-16 19:28:24 +01:00
Philip Sargent
94e5a06a15 clean up survexlegs 2020-06-16 19:27:32 +01:00
Philip Sargent
8fc0ba136f removed jgtfileupload 2020-06-16 16:48:19 +01:00
Philip Sargent
9f5e779b5e remove Survey & virtual survey wallet - never used 2020-06-16 16:17:35 +01:00
Philip Sargent
1b693da5ed break recursive import cycle 2020-06-16 16:07:36 +01:00
Philip Sargent
4c44a504ed preparing for django 1.8 2020-06-16 11:14:10 +01:00
Philip Sargent
453af2851b Stop storing all SurvexStations 2020-06-15 03:28:51 +01:00
Philip Sargent
30e560d808 Dump django.sites, .redirects, registration, extensions 2020-06-14 20:02:52 +01:00
Philip Sargent
277f60e3e2 autogenerated schema 2020-06-14 19:35:18 +01:00
Philip Sargent
77ca2d8830 server config 2020-06-14 10:12:07 +01:00
Philip Sargent
d4deea2019 remove tinyMCE more 2020-06-14 10:05:25 +01:00
Philip Sargent
38fa552c00 Disable TinyMCE 2020-06-13 23:16:19 +01:00
Philip Sargent
f8fa426adb rearrange for clarity 2020-06-13 01:27:42 +01:00
Philip Sargent
38beb34a38 cleaner import statements 2020-06-13 01:26:59 +01:00
Philip Sargent
fb0438d352 bugfix returning multiple object catch 2020-06-13 01:26:28 +01:00
Philip Sargent
44fe6a8b89 cleanup and better DatIssue msgs 2020-06-13 01:24:46 +01:00
Philip Sargent
269b8840ad import fixes & statistics table 2020-06-12 18:10:07 +01:00
Philip Sargent
b9a223c049 Fix to /caves/ != /caves 2020-06-12 14:54:00 +01:00
Philip Sargent
db37710b90 fixes: stopped storing survex legs 2020-06-12 14:52:00 +01:00
Philip Sargent
092c8bb913 stopped storing survex legs 2020-06-12 14:06:03 +01:00
Philip Sargent
d807e3de7d Object storage as alternative to SQL 2020-06-08 21:33:32 +01:00
Philip Sargent
8c965015f3 added static setup 2020-06-08 00:12:50 +01:00
Philip Sargent
538a3b6ca8 fixed circular ref on setup & in-memory db 2020-06-08 00:11:09 +01:00
Philip Sargent
9237a6262e Make import robust against duplicate kataster numbers 2020-06-07 17:49:58 +01:00
Philip Sargent
fcfda644d3 Fix un-cleared db error (partial) 2020-06-07 16:16:35 +01:00
Philip Sargent
75bac01f3a Fix bad pages for clashing kataster numbers 2020-06-07 16:13:59 +01:00
Philip Sargent
72fd57ef76 Rearranged caveindex page 2020-06-07 16:12:52 +01:00
Philip Sargent
fda50ed570 attempt to simplify wnt horribly wrong 2020-06-06 22:51:55 +01:00
Philip Sargent
f8a3c8f5bc Bugfix for capitalised filename extensions 2020-06-05 00:38:05 +01:00
Philip Sargent
681bfcb4c4 removing redundant functions 2020-06-04 23:53:36 +01:00
Philip Sargent
27816724f8 moved 2 funct, deletion of FileAbstraction pending 2020-06-04 23:38:57 +01:00
Philip Sargent
ac9ac5e397 Remove unused Survey object 2020-06-04 23:16:26 +01:00
Philip Sargent
43c6e2f2e1 dlete todo page, partly fix other url pages 2020-06-04 23:00:58 +01:00
Philip Sargent
b7fea2042f merge exptl & stats, delete millenial & eyecandy 2020-06-04 21:57:04 +01:00
Philip Sargent
c6d68749e0 Comment-out all ScannedImage objects 2020-06-04 19:32:26 +01:00
Philip Sargent
ae89a707ec Unit tests outline implemented 2020-06-03 21:57:05 +01:00
Philip Sargent
973c6f4ef8 update svx template & fix CRLF 2020-06-02 21:38:29 +01:00
Philip Sargent
4dd0a5ddf2 import syntax fix 2020-06-02 21:38:01 +01:00
Philip Sargent
90dc3dac3b Change troggle horizontal menu items 2020-06-01 17:41:41 +01:00
Philip Sargent
8c4c2ad1cf Progress dots on importing data 2020-06-01 00:42:48 +01:00
Philip Sargent
f949bb8dc0 python3 fixes for djsngo admin pages 2020-05-31 22:35:36 +01:00
Philip Sargent
c863bf6e1d Oops. Remove CSV download pages 2020-05-31 21:38:19 +01:00
Philip Sargent
5d89cf9474 Delete SURVEYS.CSV code 2020-05-31 21:03:40 +01:00
Philip Sargent
09aedecc3b Unicode fix for SVX display and edit page 2020-05-31 20:46:12 +01:00
Philip Sargent
fe515e9f01 Troggle code documentation pointers 2020-05-31 20:44:09 +01:00
Philip Sargent
69d2c0887c Adding progress dots to import print output and fix SURVEY_SCANS 2020-05-31 19:23:07 +01:00
Philip Sargent
8e577022b2 Reducing input print output 2020-05-31 19:21:54 +01:00
Philip Sargent
3088727fd4 unicode fix for python3 2020-05-31 19:00:44 +01:00
Philip Sargent
b33ad5833e delete duplication 2020-05-30 20:48:17 +01:00
Philip Sargent
3264b6edef bug fix in logbook parser 2020-05-30 20:31:20 +01:00
Philip Sargent
58c2650162 Style chnage to troggle pages for python3 2020-05-30 12:35:47 +01:00
Philip Sargent
01e098339e Imposrt mad more specific 2020-05-30 12:35:15 +01:00
Philip Sargent
d857cc9084 format tidy & normalise paths in survex *inlcude 2020-05-30 02:35:05 +01:00
Philip Sargent
4205821bac allow STATIC and tinyMCE to work with runserver 2020-05-30 02:34:33 +01:00
Philip Sargent
0776978c9c Import rejigging to fix circular refs 2020-05-30 01:11:02 +01:00
Philip Sargent
6568cb8900 import fix to allow manage.py to run 2020-05-28 22:42:50 +01:00
Philip Sargent
6a755598b2 Moved classes to models_caves and fixed imports 2020-05-28 04:54:53 +01:00
Philip Sargent
df3917a677 Expunge cavetab 2020-05-28 02:20:50 +01:00
Philip Sargent
d2192ffd21 delete duplication 2020-05-28 02:09:36 +01:00
Philip Sargent
cb4128436c expung imagekit and clean import lists 2020-05-28 01:38:35 +01:00
Philip Sargent
6cc578435c Refactor to avoid loading unused surveystations 2020-05-28 01:16:45 +01:00
Philip Sargent
73637ba53d Clean install with python3 2020-05-27 01:04:37 +01:00
Philip Sargent
c9657aeb8c preparing to clean up LoadPos 2020-05-26 16:41:11 +01:00
Expo on server
dfb7cc88cd Allow being unable to open local LOGFILE. 2020-05-26 02:26:51 +01:00
Expo on server
227120fd57 Add check to avoid running databaseReset as root accidentally 2020-05-26 02:25:30 +01:00
Philip Sargent
8b74ff4bb6 __unicode__ to __str__ 2to3 conversion 2020-05-26 02:21:36 +01:00
Philip Sargent
f4099c6929 fix py3 bug and make settings import clearer 2020-05-26 02:21:03 +01:00
Philip Sargent
6ae5c0d912 remove old imagekit files 2020-05-26 02:19:46 +01:00
Philip Sargent
44d190e91c partial fix to make OK on python3.8 2020-05-25 01:49:02 +01:00
Philip Sargent
0a864c7f87 2to3 sort comparison key change 2020-05-25 01:46:52 +01:00
Philip Sargent
50d753a87b Convert codebase for python3 usage 2020-05-24 20:56:27 +01:00
Philip Sargent
35f85c55f1 Update requirements list 2020-05-24 20:55:18 +01:00
Philip Sargent
b69bdcd126 tidying and prep for python3 2020-05-24 13:35:47 +01:00
Philip Sargent
49d5857b36 tabs and spaces format fix 2020-05-24 13:31:38 +01:00
Philip Sargent
40ad04b79f unused code commented out 2020-05-24 13:30:39 +01:00
Philip Sargent
a3e564855a removing imagekit 2020-05-22 01:28:45 +01:00
Philip Sargent
15d0d05185 bugfix 2020-05-20 13:40:09 +01:00
Philip Sargent
819eca5dea cleaning options list 2020-05-20 12:45:10 +01:00
Philip Sargent
edbe793c68 added profile option 2020-05-20 12:18:12 +01:00
Philip Sargent
e017c6effc Indented msgs for recursive file traversal 2020-05-15 21:45:23 +01:00
Philip Sargent
d4ac28af18 Remove PHOTOS_ROOT and DPhoto class 2020-05-15 21:32:55 +01:00
Philip Sargent
931aa4e3cb add mysql startup documentation 2020-05-14 19:37:46 +01:00
Philip Sargent
cc4017e481 fix renaming reload to reinit 2020-05-14 17:33:33 +01:00
Philip Sargent
38adb9a52f typo 2020-05-14 17:27:51 +01:00
Philip Sargent
ccc5813b3f indent recursion and update comments 2020-05-14 17:21:34 +01:00
Philip Sargent
314d0e8b71 skip fast pass option added as default 2020-05-13 23:11:47 +01:00
Philip Sargent
0338889905 tryng django 1.7 recommended change syncdb to migrate 2020-05-13 22:13:18 +01:00
Philip Sargent
876cd8909f still not expunged MySQL connection 2020-05-13 21:55:44 +01:00
Philip Sargent
ac7cb45f61 more thorough reset before running :memory: 2020-05-13 21:52:28 +01:00
Philip Sargent
f326bf9148 more thorough reset between dbs 2020-05-13 21:25:17 +01:00
Philip Sargent
b1596c0ac4 Merge branch 'master' of ssh://expo.survex.com/home/expo/troggle 2020-05-13 19:59:46 +01:00
Expo on server
13d3f37f05 menu update 2020-05-13 19:59:41 +01:00
Philip Sargent
e4290c4ab0 adding *ref to troggle svx parser 2020-05-13 19:57:07 +01:00
Expo on server
2918b4b92c Add simple search function to default menu 2020-05-02 04:14:32 +01:00
Philip Sargent
39c622d5bf dbReset now loads into memory first (fast err checking), then into db 2020-04-30 23:15:57 +01:00
Philip Sargent
76a6b501f3 LoadPos not-found cache working 2020-04-28 22:51:18 +01:00
Philip Sargent
ecf92e2079 getting the LoadPos to work better 2020-04-28 21:50:53 +01:00
Philip Sargent
b4c0c4d219 Understanding and speeding up LoadPos 2020-04-28 18:26:08 +01:00
Philip Sargent
4be8c81291 reducing clutter in output 2020-04-28 01:18:57 +01:00
Philip Sargent
a8460065a4 Thorough spring clean and profiling 2020-04-27 23:51:41 +01:00
Philip Sargent
2b39dec560 installation notes 2020-04-26 00:49:29 +01:00
0b85a9d330 adding sync to databaseRest and cleaning a template 2020-04-19 23:35:41 +01:00
b123f6ada7 Dumps loaded data into a .sql file 2020-04-16 20:36:42 +01:00
e5c288c764 get the profile display working & bug fix 2020-04-15 23:29:59 +01:00
9db7d8e589 Made a jobqueue to time how long importing takes 2020-04-15 04:09:28 +01:00
5e48687347 More tidying 2020-04-14 20:46:45 +01:00
09bbf81915 Tidy formatting prior to adding some new stuff 2020-04-14 20:19:41 +01:00
78f8ea2b5b bug fixed for new logbook 2020-04-13 17:35:58 +01:00
e08b4275a9 2010 is html format not wiki format.
Or at least, now it is.
2020-04-12 23:03:00 +01:00
ac9f3cf061 New cacheing for parsed logbooks. All logbooks load in 75 seconds now. 2020-04-12 22:29:30 +01:00
98fd314a62 Prevent that annoying popup from Google offering to translate the page from German 2020-04-11 18:10:09 +01:00
79a31a41f9 Fixed bad import of surveyscans references from tunnel files 2020-04-11 00:36:27 +01:00
6aae9083c3 implemened NOEDIT as a meta tag and fixed double-menus problem 2020-04-10 13:13:23 +01:00
d71e31417b scanned image files importing 2020-04-09 02:40:32 +01:00
fbe6c0c859 rearrange main menu 2020-04-03 01:11:30 +01:00
53b797fb53 Validation of mugshot or blrub file added 2020-04-01 19:58:31 +01:00
98eb9173ee rename troggle log back to what it was 2020-03-31 23:39:52 +01:00
ecfa95310d Documenting installation 2020-03-14 20:08:44 +00:00
0e75a9163b Documenting use of apache 2020-03-12 17:40:03 +00:00
Expo on server
59633d94f5 Remove mention of obsolete EMAIL_HOST_USER to correspond with change made in pathreport.py 2020-03-09 17:44:29 +00:00
53206ad1d7 Removed EMAIL_HOST entirely 2020-03-09 16:52:51 +00:00
9aa91bf3e2 remove EMAIL_HOST global name 2020-03-09 16:48:51 +00:00
867479e05d Fixing my earlier mistake these are xml not html 2020-03-02 17:08:49 +00:00
bb1f69dd90 stuff generated on server 2020-02-29 12:08:22 +00:00
d219f7b966 another missing code 2020-02-27 01:35:12 +00:00
3f812e5275 comment out missing code 2020-02-27 01:33:19 +00:00
cdef395f89 New troggle report on defined directory paths 2020-02-27 00:58:09 +00:00
Philip Sargent
66f6a9ce90 Troggle on Windows 10 using WSL 2020-02-25 14:31:52 +00:00
Philip Sargent
b07c888c7a debug for crashing tunnel import 2020-02-25 14:22:50 +00:00
Philip Sargent
d170a3c36e add shortcut for logbooks & note explaining notability metric 2020-02-24 21:49:01 +00:00
429c21a8e9 installing on WSL ubuntu on Windows 10 2020-02-22 00:04:41 +00:00
Philip Sargent
8c10908353 Revert "Merge branch 'RW_rebuild' of ssh://expo@expo.survex.com/home/expo/troggle"
This reverts commit e0963a1c39.
2020-02-21 16:31:54 +00:00
Philip Sargent
e0963a1c39 Merge branch 'RW_rebuild' of ssh://expo@expo.survex.com/home/expo/troggle
# Conflicts:
#	core/models_millenial.py
#	core/views_caves.py
#	databaseResetM.py
#	parsers/cavesM.py
#	urls.py
2020-02-21 16:27:34 +00:00
Sam Wenham
e77aa9fb84 Changes needed to stop the survex parser having to go through the data twice
Taken from the Django 1.10 upgrade branch
2020-02-21 15:57:07 +00:00
Philip Sargent
f5fe2d9e33 typo 2020-02-21 14:00:33 +00:00
Philip Sargent
5006342b7b forgot a bit 2020-02-21 13:59:14 +00:00
Philip Sargent
3ce8b67b4f added rebuild command option 2020-02-21 13:57:04 +00:00
Sam Wenham
52cec290d9 We don't want troggle trying to write out the files 2020-02-20 18:42:31 +00:00
Philip Sargent
a559151c57 Merge remote-tracking branch 'origin/master' 2020-02-20 15:29:30 +00:00
Philip Sargent
2fc60f9f74 Fixing logbooks with parse errors 2020-02-20 15:26:33 +00:00
Wookey
3b1fcb7feb Merge branch 'master' of ssh://expo.survex.com/~/troggle 2020-02-20 15:02:14 +00:00
Wookey
2838f540d1 Minor text and whitespace fixes 2020-02-20 15:01:50 +00:00
Wookey
f5ec5a61a9 Move survex parsing later in the process as it tends to run out of memory 2020-02-20 14:57:37 +00:00
Philip Sargent
44caf35fd8 typo 2020-02-20 14:15:28 +00:00
Philip Sargent
c5055e7f34 backport order of operations in reset() and change logbook parser to do paragraphs differently 2020-02-20 14:13:38 +00:00
Philip Sargent
de14ecea22 Fixing back mistaken chnage 2020-02-20 01:42:52 +00:00
Philip Sargent
f5174a3248 typo 2020-02-19 22:52:00 +00:00
Philip Sargent
f0889ce0f8 typos fix and more description 2020-02-19 22:51:07 +00:00
Philip Sargent
b6dc711c14 making in-code documentation strings match what actually happens 2020-02-19 22:14:00 +00:00
Philip Sargent
04fb2e8701 DOCTYPE update for template for generated files 2020-02-19 21:48:37 +00:00
Philip Sargent
c1439bed8d Adding <pre> and </pre> to the logbook entry display so that all the paragraphs are not munged into one when displayed. Untested. 2020-02-19 21:47:13 +00:00
Philip Sargent
a88f326ee6 added year 2019 to logbook parsing 2020-02-17 01:39:00 +00:00
56618dbe65 fix CUCC url in template and add years to 2020 2019-12-23 19:40:44 +00:00
Expo on server
71ef710d09 Fix the location of the cave view javascript 2019-12-08 10:53:43 +00:00
Sam Wenham
c74852b60b Merge branch 'master' of ssh://expo.survex.com/~/troggle
# Conflicts:
#	README.txt
2019-07-29 11:36:24 +01:00
2d7892e3b1 Merge remote-tracking branch 'troggle/master' 2019-07-02 19:04:13 +01:00
Sam Wenham
8edeb2f622 Merge branch 'master' of ssh://expo.survex.com/~/troggle 2019-07-02 18:15:13 +01:00
Expo on server
d157a081b1 Remove .hgignore
Change mode on modelvis.py
2019-07-02 18:14:19 +01:00
Sam Wenham
fcc57cf365 Fix description of localsettingsdocker 2019-07-02 17:52:40 +01:00
12c8ab41bf changes because we do not use svn anymore
Signed-off-by: psargent <philip.sargent@gmail.com>
2019-06-27 01:24:38 +01:00
Rad
9a7a1728a4 working maps: cave -> desc, survey -> cave, expedition -> person. Added /millnialpeople/ page. 2019-02-28 18:46:40 +00:00
Rad
240c7eff10 survex parser added 2019-02-28 18:07:50 +00:00
561 changed files with 143454 additions and 11646 deletions

75
.gitignore vendored
View File

@@ -1,16 +1,69 @@
# use glob syntax
syntax: glob
# Virtual environments
.venv
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info
*.pyc
db*
localsettings.py
*~
parsing_log.txt
troggle
troggle_log.txt
.idea/*
*.orig
media/images/*
.vscode/*
*.sql
*.sqlite
*.prof
*~
.idea/*
.swp
imagekit-off/
.vscode/*
_1623.3d
_1623.err
_1623.pos
_1623.svx
_16230.svx
_troggle_import_root.svx
troggle_import_root.log
cave-lookup.json
core/migrations/*
db*
desktop.ini
diffsettings.txt
ignored-files.log
import_profile.json
lines-of-python.txt
lines-of-templates.txt
loadlogbk.log
loadsurvexblks.log
logbktrips.shelve
memdump.sql
parsing_log.txt
svxblks.log
svxlinear.log
troggle
troggle-inspectdb.py
troggle-sqlite.sql
troggle.log
troggle.sqlite
troggle.sqlite-journal
troggle_log.txt
tunnel-import.log
secret_credentials.py
localsettings.py
media/jslib/*
!media/jslib/readme.txt
_test_response.html
therionrefs.log
_1623-and-1626.svx
_1623-and-1626-no-schoenberg-hs.svx
troggle.sqlite-journal - Shortcut.lnk
troggle.sqlite - Shortcut.lnk
javascript
mvscript.sh

View File

@@ -1,16 +0,0 @@
# use glob syntax
syntax: glob
*.pyc
db*
localsettings.py
*~
parsing_log.txt
troggle
troggle_log.txt
.idea/*
*.orig
media/images/*
.vscode/*
.swp
imagekit-off/

807
1623-renaming-script.txt Normal file
View File

@@ -0,0 +1,807 @@
cd /home/philip/expo/expoweb/1623
mkdir -p 2023-ASH-06/i
mkdir -p 2023-ASH-06/l
mkdir -p 2023-ASH-06/t
mkdir -p 307/i
mkdir -p 307/l
mkdir -p 307/t
mkdir -p 2023-ASH-13/i
mkdir -p 2023-ASH-13/l
mkdir -p 2023-ASH-13/t
mkdir -p 2018-pf-03/i
mkdir -p 2018-pf-03/l
mkdir -p 2018-pf-03/t
mkdir -p 2023-ASH-07/i
mkdir -p 2023-ASH-07/l
mkdir -p 2023-ASH-07/t
mkdir -p 2013-BL-01/i
mkdir -p 2013-BL-01/l
mkdir -p 2013-BL-01/t
mkdir -p 2023-ASH-03/i
mkdir -p 2023-ASH-03/l
mkdir -p 2023-ASH-03/t
mkdir -p 2017-AA-01/i
mkdir -p 2017-AA-01/l
mkdir -p 2017-AA-01/t
mkdir -p 2023-ASH-02/i
mkdir -p 2023-ASH-02/l
mkdir -p 2023-ASH-02/t
mkdir -p 306/i
mkdir -p 306/l
mkdir -p 306/t
mkdir -p 2012-sw-01/i
mkdir -p 2012-sw-01/l
mkdir -p 2012-sw-01/t
mkdir -p 315/i
mkdir -p 315/l
mkdir -p 315/t
mkdir -p 2018-NTU-01/i
mkdir -p 2018-NTU-01/l
mkdir -p 2018-NTU-01/t
mkdir -p 303/i
mkdir -p 303/l
mkdir -p 303/t
mkdir -p 2023-ASH-12/i
mkdir -p 2023-ASH-12/l
mkdir -p 2023-ASH-12/t
mkdir -p 2023-ASH-11/i
mkdir -p 2023-ASH-11/l
mkdir -p 2023-ASH-11/t
mkdir -p 311/i
mkdir -p 311/l
mkdir -p 311/t
mkdir -p 2017-AMS-02/i
mkdir -p 2017-AMS-02/l
mkdir -p 2017-AMS-02/t
mkdir -p 2013-06/i
mkdir -p 2013-06/l
mkdir -p 2013-06/t
mkdir -p 2023-ASH-01/i
mkdir -p 2023-ASH-01/l
mkdir -p 2023-ASH-01/t
mkdir -p 2017-NR-01/i
mkdir -p 2017-NR-01/l
mkdir -p 2017-NR-01/t
mkdir -p 308/i
mkdir -p 308/l
mkdir -p 308/t
mkdir -p 2012-sw-03/i
mkdir -p 2012-sw-03/l
mkdir -p 2012-sw-03/t
mkdir -p 2023-ASH-04/i
mkdir -p 2023-ASH-04/l
mkdir -p 2023-ASH-04/t
mkdir -p 2023-BL-11/i
mkdir -p 2023-BL-11/l
mkdir -p 2023-BL-11/t
mkdir -p 2023-ASH-14/i
mkdir -p 2023-ASH-14/l
mkdir -p 2023-ASH-14/t
mkdir -p 309/i
mkdir -p 309/l
mkdir -p 309/t
mkdir -p 2023-ASH-10/i
mkdir -p 2023-ASH-10/l
mkdir -p 2023-ASH-10/t
cd /home/philip/expo/expoweb/1623
mv l/"2012-sw-01_i1.html" 2012-sw-01/l
sed -i 's|\/1623\/i\/|/1623/2012-sw-01/i/|g' 2012-sw-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2012-sw-01/i/|g" 2012-sw-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2012-sw-01/i/|g' ../entrance_data/'1623-2012-sw-01.html'
sed -i "s|\/1623\/i\/|/1623/2012-sw-01/i/|g" ../entrance_data/'1623-2012-sw-01.html'
sed -i 's|\/1623\/l\/|/1623/2012-sw-01/l/|g' ../entrance_data/'1623-2012-sw-01.html'
sed -i "s|\/1623\/l\/|/1623/2012-sw-01/l/|g" ../entrance_data/'1623-2012-sw-01.html'
sed -i 's|\/1623\/t\/|/1623/2012-sw-01/t/|g' ../entrance_data/'1623-2012-sw-01.html'
sed -i "s|\/1623\/t\/|/1623/2012-sw-01/t/|g" ../entrance_data/'1623-2012-sw-01.html'
mv t/"2012-sw-01_i1.jpg" 2012-sw-01/t
mv i/"2012-sw-01_i1.jpg" 2012-sw-01/i
mv l/"2012-sw-03_i2.html" 2012-sw-03/l
sed -i 's|\/1623\/i\/|/1623/2012-sw-03/i/|g' 2012-sw-03/l/*.html
sed -i "s|\/1623\/i\/|/1623/2012-sw-03/i/|g" 2012-sw-03/l/*.html
sed -i 's|\/1623\/i\/|/1623/2012-sw-03/i/|g' ../entrance_data/'1623-2012-sw-03.html'
sed -i "s|\/1623\/i\/|/1623/2012-sw-03/i/|g" ../entrance_data/'1623-2012-sw-03.html'
sed -i 's|\/1623\/l\/|/1623/2012-sw-03/l/|g' ../entrance_data/'1623-2012-sw-03.html'
sed -i "s|\/1623\/l\/|/1623/2012-sw-03/l/|g" ../entrance_data/'1623-2012-sw-03.html'
sed -i 's|\/1623\/t\/|/1623/2012-sw-03/t/|g' ../entrance_data/'1623-2012-sw-03.html'
sed -i "s|\/1623\/t\/|/1623/2012-sw-03/t/|g" ../entrance_data/'1623-2012-sw-03.html'
mv l/"2012-sw-03_i1.html" 2012-sw-03/l
sed -i 's|\/1623\/i\/|/1623/2012-sw-03/i/|g' 2012-sw-03/l/*.html
sed -i "s|\/1623\/i\/|/1623/2012-sw-03/i/|g" 2012-sw-03/l/*.html
sed -i 's|\/1623\/i\/|/1623/2012-sw-03/i/|g' ../entrance_data/'1623-2012-sw-03.html'
sed -i "s|\/1623\/i\/|/1623/2012-sw-03/i/|g" ../entrance_data/'1623-2012-sw-03.html'
sed -i 's|\/1623\/l\/|/1623/2012-sw-03/l/|g' ../entrance_data/'1623-2012-sw-03.html'
sed -i "s|\/1623\/l\/|/1623/2012-sw-03/l/|g" ../entrance_data/'1623-2012-sw-03.html'
sed -i 's|\/1623\/t\/|/1623/2012-sw-03/t/|g' ../entrance_data/'1623-2012-sw-03.html'
sed -i "s|\/1623\/t\/|/1623/2012-sw-03/t/|g" ../entrance_data/'1623-2012-sw-03.html'
mv t/"2012-sw-03_i1.jpg" 2012-sw-03/t
mv i/"2012-sw-03_i1.jpg" 2012-sw-03/i
mv t/"2012-sw-03_i2.jpg" 2012-sw-03/t
mv i/"2012-sw-03_i2.jpg" 2012-sw-03/i
mv i/"2013wallet23.jpg" 2013-06/i
mv l/"2013wallet23.html" 2013-06/l
sed -i 's|\/1623\/i\/|/1623/2013-06/i/|g' 2013-06/l/*.html
sed -i "s|\/1623\/i\/|/1623/2013-06/i/|g" 2013-06/l/*.html
sed -i 's|\/1623\/i\/|/1623/2013-06/i/|g' ../cave_data/'1623-2013-06.html'
sed -i "s|\/1623\/i\/|/1623/2013-06/i/|g" ../cave_data/'1623-2013-06.html'
sed -i 's|\/1623\/l\/|/1623/2013-06/l/|g' ../cave_data/'1623-2013-06.html'
sed -i "s|\/1623\/l\/|/1623/2013-06/l/|g" ../cave_data/'1623-2013-06.html'
sed -i 's|\/1623\/t\/|/1623/2013-06/t/|g' ../cave_data/'1623-2013-06.html'
sed -i "s|\/1623\/t\/|/1623/2013-06/t/|g" ../cave_data/'1623-2013-06.html'
mv l/"2013-BL-01.html" 2013-BL-01/l
sed -i 's|\/1623\/i\/|/1623/2013-BL-01/i/|g' 2013-BL-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2013-BL-01/i/|g" 2013-BL-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2013-BL-01/i/|g' ../cave_data/'1623-2013-BL-01.html'
sed -i "s|\/1623\/i\/|/1623/2013-BL-01/i/|g" ../cave_data/'1623-2013-BL-01.html'
sed -i 's|\/1623\/l\/|/1623/2013-BL-01/l/|g' ../cave_data/'1623-2013-BL-01.html'
sed -i "s|\/1623\/l\/|/1623/2013-BL-01/l/|g" ../cave_data/'1623-2013-BL-01.html'
sed -i 's|\/1623\/t\/|/1623/2013-BL-01/t/|g' ../cave_data/'1623-2013-BL-01.html'
sed -i "s|\/1623\/t\/|/1623/2013-BL-01/t/|g" ../cave_data/'1623-2013-BL-01.html'
mv t/"2013-BL-01.jpg" 2013-BL-01/t
mv i/"2013-BL-01.jpg" 2013-BL-01/i
mv l/"aa-1-2017_with-tag.html" 2017-AA-01/l
sed -i 's|\/1623\/i\/|/1623/2017-AA-01/i/|g' 2017-AA-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2017-AA-01/i/|g" 2017-AA-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2017-AA-01/i/|g' ../entrance_data/'1623-2017-AA-01.html'
sed -i "s|\/1623\/i\/|/1623/2017-AA-01/i/|g" ../entrance_data/'1623-2017-AA-01.html'
sed -i 's|\/1623\/l\/|/1623/2017-AA-01/l/|g' ../entrance_data/'1623-2017-AA-01.html'
sed -i "s|\/1623\/l\/|/1623/2017-AA-01/l/|g" ../entrance_data/'1623-2017-AA-01.html'
sed -i 's|\/1623\/t\/|/1623/2017-AA-01/t/|g' ../entrance_data/'1623-2017-AA-01.html'
sed -i "s|\/1623\/t\/|/1623/2017-AA-01/t/|g" ../entrance_data/'1623-2017-AA-01.html'
mv t/"aa-1-2017_with-tag.jpg" 2017-AA-01/t
mv i/"aa-1-2017_with-tag.jpg" 2017-AA-01/i
mv l/"aa-1-2017_looking-down.html" 2017-AA-01/l
sed -i 's|\/1623\/i\/|/1623/2017-AA-01/i/|g' 2017-AA-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2017-AA-01/i/|g" 2017-AA-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2017-AA-01/i/|g' ../entrance_data/'1623-2017-AA-01.html'
sed -i "s|\/1623\/i\/|/1623/2017-AA-01/i/|g" ../entrance_data/'1623-2017-AA-01.html'
sed -i 's|\/1623\/l\/|/1623/2017-AA-01/l/|g' ../entrance_data/'1623-2017-AA-01.html'
sed -i "s|\/1623\/l\/|/1623/2017-AA-01/l/|g" ../entrance_data/'1623-2017-AA-01.html'
sed -i 's|\/1623\/t\/|/1623/2017-AA-01/t/|g' ../entrance_data/'1623-2017-AA-01.html'
sed -i "s|\/1623\/t\/|/1623/2017-AA-01/t/|g" ../entrance_data/'1623-2017-AA-01.html'
mv t/"aa-1-2017_looking-down.jpg" 2017-AA-01/t
mv i/"aa-1-2017_looking-down.jpg" 2017-AA-01/i
mv t/"ent081-20170807.jpg" 2017-AMS-02/t
mv i/"ent081-20170807.jpg" 2017-AMS-02/i
mv l/"near-ent-2017-ams-02.html" 2017-AMS-02/l
sed -i 's|\/1623\/i\/|/1623/2017-AMS-02/i/|g' 2017-AMS-02/l/*.html
sed -i "s|\/1623\/i\/|/1623/2017-AMS-02/i/|g" 2017-AMS-02/l/*.html
sed -i 's|\/1623\/i\/|/1623/2017-AMS-02/i/|g' ../entrance_data/'1623-2017-AMS-02.html'
sed -i "s|\/1623\/i\/|/1623/2017-AMS-02/i/|g" ../entrance_data/'1623-2017-AMS-02.html'
sed -i 's|\/1623\/l\/|/1623/2017-AMS-02/l/|g' ../entrance_data/'1623-2017-AMS-02.html'
sed -i "s|\/1623\/l\/|/1623/2017-AMS-02/l/|g" ../entrance_data/'1623-2017-AMS-02.html'
sed -i 's|\/1623\/t\/|/1623/2017-AMS-02/t/|g' ../entrance_data/'1623-2017-AMS-02.html'
sed -i "s|\/1623\/t\/|/1623/2017-AMS-02/t/|g" ../entrance_data/'1623-2017-AMS-02.html'
mv t/"near-ent-2017-ams-02.jpg" 2017-AMS-02/t
mv i/"near-ent-2017-ams-02.jpg" 2017-AMS-02/i
mv l/"ent081-20170807.html" 2017-AMS-02/l
sed -i 's|\/1623\/i\/|/1623/2017-AMS-02/i/|g' 2017-AMS-02/l/*.html
sed -i "s|\/1623\/i\/|/1623/2017-AMS-02/i/|g" 2017-AMS-02/l/*.html
sed -i 's|\/1623\/i\/|/1623/2017-AMS-02/i/|g' ../entrance_data/'1623-2017-AMS-02.html'
sed -i "s|\/1623\/i\/|/1623/2017-AMS-02/i/|g" ../entrance_data/'1623-2017-AMS-02.html'
sed -i 's|\/1623\/l\/|/1623/2017-AMS-02/l/|g' ../entrance_data/'1623-2017-AMS-02.html'
sed -i "s|\/1623\/l\/|/1623/2017-AMS-02/l/|g" ../entrance_data/'1623-2017-AMS-02.html'
sed -i 's|\/1623\/t\/|/1623/2017-AMS-02/t/|g' ../entrance_data/'1623-2017-AMS-02.html'
sed -i "s|\/1623\/t\/|/1623/2017-AMS-02/t/|g" ../entrance_data/'1623-2017-AMS-02.html'
mv l/"2017-NR-01_03.html" 2017-NR-01/l
sed -i 's|\/1623\/i\/|/1623/2017-NR-01/i/|g' 2017-NR-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2017-NR-01/i/|g" 2017-NR-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2017-NR-01/i/|g' ../entrance_data/'1623-2017-NR-01.html'
sed -i "s|\/1623\/i\/|/1623/2017-NR-01/i/|g" ../entrance_data/'1623-2017-NR-01.html'
sed -i 's|\/1623\/l\/|/1623/2017-NR-01/l/|g' ../entrance_data/'1623-2017-NR-01.html'
sed -i "s|\/1623\/l\/|/1623/2017-NR-01/l/|g" ../entrance_data/'1623-2017-NR-01.html'
sed -i 's|\/1623\/t\/|/1623/2017-NR-01/t/|g' ../entrance_data/'1623-2017-NR-01.html'
sed -i "s|\/1623\/t\/|/1623/2017-NR-01/t/|g" ../entrance_data/'1623-2017-NR-01.html'
mv t/"2017-NR-01_03.jpg" 2017-NR-01/t
mv i/"2017-NR-01_03.jpg" 2017-NR-01/i
mv t/"2017-NR-01_04.jpg" 2017-NR-01/t
mv i/"2017-NR-01_04.jpg" 2017-NR-01/i
mv l/"2017-NR-01_04.html" 2017-NR-01/l
sed -i 's|\/1623\/i\/|/1623/2017-NR-01/i/|g' 2017-NR-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2017-NR-01/i/|g" 2017-NR-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2017-NR-01/i/|g' ../entrance_data/'1623-2017-NR-01.html'
sed -i "s|\/1623\/i\/|/1623/2017-NR-01/i/|g" ../entrance_data/'1623-2017-NR-01.html'
sed -i 's|\/1623\/l\/|/1623/2017-NR-01/l/|g' ../entrance_data/'1623-2017-NR-01.html'
sed -i "s|\/1623\/l\/|/1623/2017-NR-01/l/|g" ../entrance_data/'1623-2017-NR-01.html'
sed -i 's|\/1623\/t\/|/1623/2017-NR-01/t/|g' ../entrance_data/'1623-2017-NR-01.html'
sed -i "s|\/1623\/t\/|/1623/2017-NR-01/t/|g" ../entrance_data/'1623-2017-NR-01.html'
mv t/"2018-ntu-01_looking_down_shaft-and-rift.jpg" 2018-NTU-01/t
mv i/"2018-ntu-01_looking_down_shaft-and-rift.jpg" 2018-NTU-01/i
mv t/"2018-ntu-01_tag_arrows.jpg" 2018-NTU-01/t
mv i/"2018-ntu-01_tag_arrows.jpg" 2018-NTU-01/i
mv t/"2018-ntu-01_neil_view_west.jpg" 2018-NTU-01/t
mv i/"2018-ntu-01_neil_view_west.jpg" 2018-NTU-01/i
mv l/"2018-ntu-01_looking_down_shaft-and-rift.html" 2018-NTU-01/l
sed -i 's|\/1623\/i\/|/1623/2018-NTU-01/i/|g' 2018-NTU-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2018-NTU-01/i/|g" 2018-NTU-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2018-NTU-01/i/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/i\/|/1623/2018-NTU-01/i/|g" ../entrance_data/'1623-2018-NTU-01.html'
sed -i 's|\/1623\/l\/|/1623/2018-NTU-01/l/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/l\/|/1623/2018-NTU-01/l/|g" ../entrance_data/'1623-2018-NTU-01.html'
sed -i 's|\/1623\/t\/|/1623/2018-NTU-01/t/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/t\/|/1623/2018-NTU-01/t/|g" ../entrance_data/'1623-2018-NTU-01.html'
mv l/"2018-ntu-01_tag_arrows.html" 2018-NTU-01/l
sed -i 's|\/1623\/i\/|/1623/2018-NTU-01/i/|g' 2018-NTU-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2018-NTU-01/i/|g" 2018-NTU-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2018-NTU-01/i/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/i\/|/1623/2018-NTU-01/i/|g" ../entrance_data/'1623-2018-NTU-01.html'
sed -i 's|\/1623\/l\/|/1623/2018-NTU-01/l/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/l\/|/1623/2018-NTU-01/l/|g" ../entrance_data/'1623-2018-NTU-01.html'
sed -i 's|\/1623\/t\/|/1623/2018-NTU-01/t/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/t\/|/1623/2018-NTU-01/t/|g" ../entrance_data/'1623-2018-NTU-01.html'
mv l/"2018-ntu-01_neil_view_west.html" 2018-NTU-01/l
sed -i 's|\/1623\/i\/|/1623/2018-NTU-01/i/|g' 2018-NTU-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2018-NTU-01/i/|g" 2018-NTU-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2018-NTU-01/i/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/i\/|/1623/2018-NTU-01/i/|g" ../entrance_data/'1623-2018-NTU-01.html'
sed -i 's|\/1623\/l\/|/1623/2018-NTU-01/l/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/l\/|/1623/2018-NTU-01/l/|g" ../entrance_data/'1623-2018-NTU-01.html'
sed -i 's|\/1623\/t\/|/1623/2018-NTU-01/t/|g' ../entrance_data/'1623-2018-NTU-01.html'
sed -i "s|\/1623\/t\/|/1623/2018-NTU-01/t/|g" ../entrance_data/'1623-2018-NTU-01.html'
mv t/"2018-pf-03_and_pf-02_arrows.jpg" 2018-pf-03/t
mv i/"2018-pf-03_and_pf-02_arrows.jpg" 2018-pf-03/i
mv l/"2018-pf-03_and_pf-02_arrows.html" 2018-pf-03/l
sed -i 's|\/1623\/i\/|/1623/2018-pf-03/i/|g' 2018-pf-03/l/*.html
sed -i "s|\/1623\/i\/|/1623/2018-pf-03/i/|g" 2018-pf-03/l/*.html
sed -i 's|\/1623\/i\/|/1623/2018-pf-03/i/|g' ../entrance_data/'1623-2018-pf-03.html'
sed -i "s|\/1623\/i\/|/1623/2018-pf-03/i/|g" ../entrance_data/'1623-2018-pf-03.html'
sed -i 's|\/1623\/l\/|/1623/2018-pf-03/l/|g' ../entrance_data/'1623-2018-pf-03.html'
sed -i "s|\/1623\/l\/|/1623/2018-pf-03/l/|g" ../entrance_data/'1623-2018-pf-03.html'
sed -i 's|\/1623\/t\/|/1623/2018-pf-03/t/|g' ../entrance_data/'1623-2018-pf-03.html'
sed -i "s|\/1623\/t\/|/1623/2018-pf-03/t/|g" ../entrance_data/'1623-2018-pf-03.html'
mv l/"2023-ASH-01-entrance1.html" 2023-ASH-01/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-01/i/|g' 2023-ASH-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-01/i/|g" 2023-ASH-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-01/i/|g' ../entrance_data/'1623-2023-ASH-01a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-01/i/|g" ../entrance_data/'1623-2023-ASH-01a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-01/l/|g' ../entrance_data/'1623-2023-ASH-01a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-01/l/|g" ../entrance_data/'1623-2023-ASH-01a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-01/t/|g' ../entrance_data/'1623-2023-ASH-01a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-01/t/|g" ../entrance_data/'1623-2023-ASH-01a.html'
mv l/"2023-ASH-01-entrance2.html" 2023-ASH-01/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-01/i/|g' 2023-ASH-01/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-01/i/|g" 2023-ASH-01/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-01/i/|g' ../entrance_data/'1623-2023-ASH-01a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-01/i/|g" ../entrance_data/'1623-2023-ASH-01a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-01/l/|g' ../entrance_data/'1623-2023-ASH-01a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-01/l/|g" ../entrance_data/'1623-2023-ASH-01a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-01/t/|g' ../entrance_data/'1623-2023-ASH-01a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-01/t/|g" ../entrance_data/'1623-2023-ASH-01a.html'
mv t/"2023-ASH-01-entrance2.jpg" 2023-ASH-01/t
mv i/"2023-ASH-01-entrance2.jpg" 2023-ASH-01/i
mv t/"2023-ASH-01-entrance1.jpg" 2023-ASH-01/t
mv i/"2023-ASH-01-entrance1.jpg" 2023-ASH-01/i
mv l/"2023-ASH-02-entrance1.html" 2023-ASH-02/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-02/i/|g' 2023-ASH-02/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-02/i/|g" 2023-ASH-02/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-02/i/|g' ../entrance_data/'1623-2023-ASH-02a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-02/i/|g" ../entrance_data/'1623-2023-ASH-02a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-02/l/|g' ../entrance_data/'1623-2023-ASH-02a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-02/l/|g" ../entrance_data/'1623-2023-ASH-02a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-02/t/|g' ../entrance_data/'1623-2023-ASH-02a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-02/t/|g" ../entrance_data/'1623-2023-ASH-02a.html'
mv t/"2023-ASH-02-entrance1.jpg" 2023-ASH-02/t
mv i/"2023-ASH-02-entrance1.jpg" 2023-ASH-02/i
mv l/"2023-ASH-02-entrance2.html" 2023-ASH-02/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-02/i/|g' 2023-ASH-02/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-02/i/|g" 2023-ASH-02/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-02/i/|g' ../entrance_data/'1623-2023-ASH-02a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-02/i/|g" ../entrance_data/'1623-2023-ASH-02a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-02/l/|g' ../entrance_data/'1623-2023-ASH-02a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-02/l/|g" ../entrance_data/'1623-2023-ASH-02a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-02/t/|g' ../entrance_data/'1623-2023-ASH-02a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-02/t/|g" ../entrance_data/'1623-2023-ASH-02a.html'
mv t/"2023-ASH-02-entrance2.jpg" 2023-ASH-02/t
mv i/"2023-ASH-02-entrance2.jpg" 2023-ASH-02/i
mv l/"2023-ASH-03-entrance2.html" 2023-ASH-03/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-03/i/|g' 2023-ASH-03/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-03/i/|g" 2023-ASH-03/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-03/i/|g' ../entrance_data/'1623-2023-ASH-03a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-03/i/|g" ../entrance_data/'1623-2023-ASH-03a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-03/l/|g' ../entrance_data/'1623-2023-ASH-03a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-03/l/|g" ../entrance_data/'1623-2023-ASH-03a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-03/t/|g' ../entrance_data/'1623-2023-ASH-03a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-03/t/|g" ../entrance_data/'1623-2023-ASH-03a.html'
mv t/"2023-ASH-03-entrance2.jpg" 2023-ASH-03/t
mv i/"2023-ASH-03-entrance2.jpg" 2023-ASH-03/i
mv l/"2023-ASH-03-entrance1.html" 2023-ASH-03/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-03/i/|g' 2023-ASH-03/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-03/i/|g" 2023-ASH-03/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-03/i/|g' ../entrance_data/'1623-2023-ASH-03a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-03/i/|g" ../entrance_data/'1623-2023-ASH-03a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-03/l/|g' ../entrance_data/'1623-2023-ASH-03a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-03/l/|g" ../entrance_data/'1623-2023-ASH-03a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-03/t/|g' ../entrance_data/'1623-2023-ASH-03a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-03/t/|g" ../entrance_data/'1623-2023-ASH-03a.html'
mv t/"2023-ASH-03-entrance1.jpg" 2023-ASH-03/t
mv i/"2023-ASH-03-entrance1.jpg" 2023-ASH-03/i
mv t/"2023-ASH-04-entrance2.jpg" 2023-ASH-04/t
mv i/"2023-ASH-04-entrance2.jpg" 2023-ASH-04/i
mv t/"2023-ASH-04-entrance1.jpg" 2023-ASH-04/t
mv i/"2023-ASH-04-entrance1.jpg" 2023-ASH-04/i
mv l/"2023-ASH-04-entrance1.html" 2023-ASH-04/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-04/i/|g' 2023-ASH-04/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-04/i/|g" 2023-ASH-04/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-04/i/|g' ../entrance_data/'1623-2023-ASH-04a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-04/i/|g" ../entrance_data/'1623-2023-ASH-04a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-04/l/|g' ../entrance_data/'1623-2023-ASH-04a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-04/l/|g" ../entrance_data/'1623-2023-ASH-04a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-04/t/|g' ../entrance_data/'1623-2023-ASH-04a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-04/t/|g" ../entrance_data/'1623-2023-ASH-04a.html'
mv l/"2023-ASH-04-entrance2.html" 2023-ASH-04/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-04/i/|g' 2023-ASH-04/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-04/i/|g" 2023-ASH-04/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-04/i/|g' ../entrance_data/'1623-2023-ASH-04a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-04/i/|g" ../entrance_data/'1623-2023-ASH-04a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-04/l/|g' ../entrance_data/'1623-2023-ASH-04a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-04/l/|g" ../entrance_data/'1623-2023-ASH-04a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-04/t/|g' ../entrance_data/'1623-2023-ASH-04a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-04/t/|g" ../entrance_data/'1623-2023-ASH-04a.html'
mv t/"2023-ASH-06-entrance2.jpg" 2023-ASH-06/t
mv i/"2023-ASH-06-entrance2.jpg" 2023-ASH-06/i
mv l/"2023-ASH-06-entrance1.html" 2023-ASH-06/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-06/i/|g' 2023-ASH-06/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-06/i/|g" 2023-ASH-06/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-06/i/|g' ../entrance_data/'1623-2023-ASH-06a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-06/i/|g" ../entrance_data/'1623-2023-ASH-06a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-06/l/|g' ../entrance_data/'1623-2023-ASH-06a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-06/l/|g" ../entrance_data/'1623-2023-ASH-06a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-06/t/|g' ../entrance_data/'1623-2023-ASH-06a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-06/t/|g" ../entrance_data/'1623-2023-ASH-06a.html'
mv l/"2023-ASH-06-entrance2.html" 2023-ASH-06/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-06/i/|g' 2023-ASH-06/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-06/i/|g" 2023-ASH-06/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-06/i/|g' ../entrance_data/'1623-2023-ASH-06a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-06/i/|g" ../entrance_data/'1623-2023-ASH-06a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-06/l/|g' ../entrance_data/'1623-2023-ASH-06a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-06/l/|g" ../entrance_data/'1623-2023-ASH-06a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-06/t/|g' ../entrance_data/'1623-2023-ASH-06a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-06/t/|g" ../entrance_data/'1623-2023-ASH-06a.html'
mv t/"2023-ASH-06-entrance1.jpg" 2023-ASH-06/t
mv i/"2023-ASH-06-entrance1.jpg" 2023-ASH-06/i
mv l/"2023-ASH-07-entrance1.html" 2023-ASH-07/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-07/i/|g' 2023-ASH-07/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-07/i/|g" 2023-ASH-07/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-07/i/|g' ../entrance_data/'1623-2023-ASH-07a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-07/i/|g" ../entrance_data/'1623-2023-ASH-07a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-07/l/|g' ../entrance_data/'1623-2023-ASH-07a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-07/l/|g" ../entrance_data/'1623-2023-ASH-07a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-07/t/|g' ../entrance_data/'1623-2023-ASH-07a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-07/t/|g" ../entrance_data/'1623-2023-ASH-07a.html'
mv t/"2023-ASH-07-entrance1.jpg" 2023-ASH-07/t
mv i/"2023-ASH-07-entrance1.jpg" 2023-ASH-07/i
mv t/"2023-ASH-07-entrance2.jpg" 2023-ASH-07/t
mv i/"2023-ASH-07-entrance2.jpg" 2023-ASH-07/i
mv l/"2023-ASH-07-entrance2.html" 2023-ASH-07/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-07/i/|g' 2023-ASH-07/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-07/i/|g" 2023-ASH-07/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-07/i/|g' ../entrance_data/'1623-2023-ASH-07a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-07/i/|g" ../entrance_data/'1623-2023-ASH-07a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-07/l/|g' ../entrance_data/'1623-2023-ASH-07a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-07/l/|g" ../entrance_data/'1623-2023-ASH-07a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-07/t/|g' ../entrance_data/'1623-2023-ASH-07a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-07/t/|g" ../entrance_data/'1623-2023-ASH-07a.html'
mv l/"2023-ASH-10-entrance2.html" 2023-ASH-10/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-10/i/|g' 2023-ASH-10/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-10/i/|g" 2023-ASH-10/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-10/i/|g' ../entrance_data/'1623-2023-ASH-10a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-10/i/|g" ../entrance_data/'1623-2023-ASH-10a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-10/l/|g' ../entrance_data/'1623-2023-ASH-10a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-10/l/|g" ../entrance_data/'1623-2023-ASH-10a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-10/t/|g' ../entrance_data/'1623-2023-ASH-10a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-10/t/|g" ../entrance_data/'1623-2023-ASH-10a.html'
mv t/"2023-ASH-10-entrance1.jpg" 2023-ASH-10/t
mv i/"2023-ASH-10-entrance1.jpg" 2023-ASH-10/i
mv t/"2023-ASH-10-entrance2.jpg" 2023-ASH-10/t
mv i/"2023-ASH-10-entrance2.jpg" 2023-ASH-10/i
mv l/"2023-ASH-10-entrance1.html" 2023-ASH-10/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-10/i/|g' 2023-ASH-10/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-10/i/|g" 2023-ASH-10/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-10/i/|g' ../entrance_data/'1623-2023-ASH-10a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-10/i/|g" ../entrance_data/'1623-2023-ASH-10a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-10/l/|g' ../entrance_data/'1623-2023-ASH-10a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-10/l/|g" ../entrance_data/'1623-2023-ASH-10a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-10/t/|g' ../entrance_data/'1623-2023-ASH-10a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-10/t/|g" ../entrance_data/'1623-2023-ASH-10a.html'
mv t/"2023-ASH-11-entrance2.jpg" 2023-ASH-11/t
mv i/"2023-ASH-11-entrance2.jpg" 2023-ASH-11/i
mv l/"2023-ASH-11-entrance2.html" 2023-ASH-11/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-11/i/|g' 2023-ASH-11/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-11/i/|g" 2023-ASH-11/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-11/i/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-11/i/|g" ../entrance_data/'1623-2023-ASH-11a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-11/l/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-11/l/|g" ../entrance_data/'1623-2023-ASH-11a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-11/t/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-11/t/|g" ../entrance_data/'1623-2023-ASH-11a.html'
mv l/"2023-ASH-11-entrance4.html" 2023-ASH-11/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-11/i/|g' 2023-ASH-11/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-11/i/|g" 2023-ASH-11/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-11/i/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-11/i/|g" ../entrance_data/'1623-2023-ASH-11a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-11/l/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-11/l/|g" ../entrance_data/'1623-2023-ASH-11a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-11/t/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-11/t/|g" ../entrance_data/'1623-2023-ASH-11a.html'
mv l/"2023-ASH-11-entrance3.html" 2023-ASH-11/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-11/i/|g' 2023-ASH-11/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-11/i/|g" 2023-ASH-11/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-11/i/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-11/i/|g" ../entrance_data/'1623-2023-ASH-11a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-11/l/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-11/l/|g" ../entrance_data/'1623-2023-ASH-11a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-11/t/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-11/t/|g" ../entrance_data/'1623-2023-ASH-11a.html'
mv l/"2023-ASH-11-entrance1.html" 2023-ASH-11/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-11/i/|g' 2023-ASH-11/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-11/i/|g" 2023-ASH-11/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-11/i/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-11/i/|g" ../entrance_data/'1623-2023-ASH-11a.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-11/l/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-11/l/|g" ../entrance_data/'1623-2023-ASH-11a.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-11/t/|g' ../entrance_data/'1623-2023-ASH-11a.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-11/t/|g" ../entrance_data/'1623-2023-ASH-11a.html'
mv t/"2023-ASH-11-entrance1.jpg" 2023-ASH-11/t
mv i/"2023-ASH-11-entrance1.jpg" 2023-ASH-11/i
mv t/"2023-ASH-11-entrance3.jpg" 2023-ASH-11/t
mv i/"2023-ASH-11-entrance3.jpg" 2023-ASH-11/i
mv t/"2023-ASH-11-entrance4.jpg" 2023-ASH-11/t
mv i/"2023-ASH-11-entrance4.jpg" 2023-ASH-11/i
mv l/"2023-ASH-12-entrance1.html" 2023-ASH-12/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-12/i/|g' 2023-ASH-12/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-12/i/|g" 2023-ASH-12/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-12/i/|g' ../entrance_data/'1623-2023-ASH-12.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-12/i/|g" ../entrance_data/'1623-2023-ASH-12.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-12/l/|g' ../entrance_data/'1623-2023-ASH-12.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-12/l/|g" ../entrance_data/'1623-2023-ASH-12.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-12/t/|g' ../entrance_data/'1623-2023-ASH-12.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-12/t/|g" ../entrance_data/'1623-2023-ASH-12.html'
mv t/"2023-ASH-12-entrance1.jpg" 2023-ASH-12/t
mv i/"2023-ASH-12-entrance1.jpg" 2023-ASH-12/i
mv t/"2023-ASH-12-entrance2.jpg" 2023-ASH-12/t
mv i/"2023-ASH-12-entrance2.jpg" 2023-ASH-12/i
mv l/"2023-ASH-12-entrance2.html" 2023-ASH-12/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-12/i/|g' 2023-ASH-12/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-12/i/|g" 2023-ASH-12/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-12/i/|g' ../entrance_data/'1623-2023-ASH-12.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-12/i/|g" ../entrance_data/'1623-2023-ASH-12.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-12/l/|g' ../entrance_data/'1623-2023-ASH-12.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-12/l/|g" ../entrance_data/'1623-2023-ASH-12.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-12/t/|g' ../entrance_data/'1623-2023-ASH-12.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-12/t/|g" ../entrance_data/'1623-2023-ASH-12.html'
mv l/"2023-ASH-13-entrance1.html" 2023-ASH-13/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-13/i/|g' 2023-ASH-13/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-13/i/|g" 2023-ASH-13/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-13/i/|g' ../entrance_data/'1623-2023-ASH-13.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-13/i/|g" ../entrance_data/'1623-2023-ASH-13.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-13/l/|g' ../entrance_data/'1623-2023-ASH-13.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-13/l/|g" ../entrance_data/'1623-2023-ASH-13.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-13/t/|g' ../entrance_data/'1623-2023-ASH-13.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-13/t/|g" ../entrance_data/'1623-2023-ASH-13.html'
mv l/"2023-ASH-13-entrance2.html" 2023-ASH-13/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-13/i/|g' 2023-ASH-13/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-13/i/|g" 2023-ASH-13/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-13/i/|g' ../entrance_data/'1623-2023-ASH-13.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-13/i/|g" ../entrance_data/'1623-2023-ASH-13.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-13/l/|g' ../entrance_data/'1623-2023-ASH-13.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-13/l/|g" ../entrance_data/'1623-2023-ASH-13.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-13/t/|g' ../entrance_data/'1623-2023-ASH-13.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-13/t/|g" ../entrance_data/'1623-2023-ASH-13.html'
mv t/"2023-ASH-13-entrance2.jpg" 2023-ASH-13/t
mv i/"2023-ASH-13-entrance2.jpg" 2023-ASH-13/i
mv t/"2023-ASH-13-entrance1.jpg" 2023-ASH-13/t
mv i/"2023-ASH-13-entrance1.jpg" 2023-ASH-13/i
mv l/"2023-ASH-13and14-entrances.html" 2023-ASH-14/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-14/i/|g' 2023-ASH-14/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-14/i/|g" 2023-ASH-14/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-14/i/|g' ../entrance_data/'1623-2023-ASH-14.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-14/i/|g" ../entrance_data/'1623-2023-ASH-14.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-14/l/|g' ../entrance_data/'1623-2023-ASH-14.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-14/l/|g" ../entrance_data/'1623-2023-ASH-14.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-14/t/|g' ../entrance_data/'1623-2023-ASH-14.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-14/t/|g" ../entrance_data/'1623-2023-ASH-14.html'
mv t/"2023-ASH-14-entrance1.jpg" 2023-ASH-14/t
mv i/"2023-ASH-14-entrance1.jpg" 2023-ASH-14/i
mv l/"2023-ASH-14-entrance1.html" 2023-ASH-14/l
sed -i 's|\/1623\/i\/|/1623/2023-ASH-14/i/|g' 2023-ASH-14/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-ASH-14/i/|g" 2023-ASH-14/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-ASH-14/i/|g' ../entrance_data/'1623-2023-ASH-14.html'
sed -i "s|\/1623\/i\/|/1623/2023-ASH-14/i/|g" ../entrance_data/'1623-2023-ASH-14.html'
sed -i 's|\/1623\/l\/|/1623/2023-ASH-14/l/|g' ../entrance_data/'1623-2023-ASH-14.html'
sed -i "s|\/1623\/l\/|/1623/2023-ASH-14/l/|g" ../entrance_data/'1623-2023-ASH-14.html'
sed -i 's|\/1623\/t\/|/1623/2023-ASH-14/t/|g' ../entrance_data/'1623-2023-ASH-14.html'
sed -i "s|\/1623\/t\/|/1623/2023-ASH-14/t/|g" ../entrance_data/'1623-2023-ASH-14.html'
mv t/"2023-ASH-13and14-entrances.jpg" 2023-ASH-14/t
mv i/"2023-ASH-13and14-entrances.jpg" 2023-ASH-14/i
mv t/"2023-BL-11-sketch.jpg" 2023-BL-11/t
mv i/"2023-BL-11-sketch.jpg" 2023-BL-11/i
mv t/"20230802_165708.jpg" 2023-BL-11/t
mv i/"20230802_165708.jpg" 2023-BL-11/i
mv t/"20230802_165823.jpg" 2023-BL-11/t
mv i/"20230802_165823.jpg" 2023-BL-11/i
mv l/"20230802_165708.html" 2023-BL-11/l
sed -i 's|\/1623\/i\/|/1623/2023-BL-11/i/|g' 2023-BL-11/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-BL-11/i/|g" 2023-BL-11/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-BL-11/i/|g' ../entrance_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/i\/|/1623/2023-BL-11/i/|g" ../entrance_data/'1623-2023-BL-11.html'
sed -i 's|\/1623\/l\/|/1623/2023-BL-11/l/|g' ../entrance_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/l\/|/1623/2023-BL-11/l/|g" ../entrance_data/'1623-2023-BL-11.html'
sed -i 's|\/1623\/t\/|/1623/2023-BL-11/t/|g' ../entrance_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/t\/|/1623/2023-BL-11/t/|g" ../entrance_data/'1623-2023-BL-11.html'
mv l/"2023-BL-11-sketch.html" 2023-BL-11/l
sed -i 's|\/1623\/i\/|/1623/2023-BL-11/i/|g' 2023-BL-11/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-BL-11/i/|g" 2023-BL-11/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-BL-11/i/|g' ../cave_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/i\/|/1623/2023-BL-11/i/|g" ../cave_data/'1623-2023-BL-11.html'
sed -i 's|\/1623\/l\/|/1623/2023-BL-11/l/|g' ../cave_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/l\/|/1623/2023-BL-11/l/|g" ../cave_data/'1623-2023-BL-11.html'
sed -i 's|\/1623\/t\/|/1623/2023-BL-11/t/|g' ../cave_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/t\/|/1623/2023-BL-11/t/|g" ../cave_data/'1623-2023-BL-11.html'
mv l/"20230802_165823.html" 2023-BL-11/l
sed -i 's|\/1623\/i\/|/1623/2023-BL-11/i/|g' 2023-BL-11/l/*.html
sed -i "s|\/1623\/i\/|/1623/2023-BL-11/i/|g" 2023-BL-11/l/*.html
sed -i 's|\/1623\/i\/|/1623/2023-BL-11/i/|g' ../entrance_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/i\/|/1623/2023-BL-11/i/|g" ../entrance_data/'1623-2023-BL-11.html'
sed -i 's|\/1623\/l\/|/1623/2023-BL-11/l/|g' ../entrance_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/l\/|/1623/2023-BL-11/l/|g" ../entrance_data/'1623-2023-BL-11.html'
sed -i 's|\/1623\/t\/|/1623/2023-BL-11/t/|g' ../entrance_data/'1623-2023-BL-11.html'
sed -i "s|\/1623\/t\/|/1623/2023-BL-11/t/|g" ../entrance_data/'1623-2023-BL-11.html'
mv t/"2023-ASH-15-entrance3.jpg" 303/t
mv i/"2023-ASH-15-entrance3.jpg" 303/i
mv l/"2023-ASH-15-entrance3.html" 303/l
sed -i 's|\/1623\/i\/|/1623/303/i/|g' 303/l/*.html
sed -i "s|\/1623\/i\/|/1623/303/i/|g" 303/l/*.html
sed -i 's|\/1623\/i\/|/1623/303/i/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/i\/|/1623/303/i/|g" ../entrance_data/'1623-303.html'
sed -i 's|\/1623\/l\/|/1623/303/l/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/l\/|/1623/303/l/|g" ../entrance_data/'1623-303.html'
sed -i 's|\/1623\/t\/|/1623/303/t/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/t\/|/1623/303/t/|g" ../entrance_data/'1623-303.html'
mv t/"2023-ASH-15-entrance1.jpg" 303/t
mv i/"2023-ASH-15-entrance1.jpg" 303/i
mv l/"2023-ASH-15-entrance2.html" 303/l
sed -i 's|\/1623\/i\/|/1623/303/i/|g' 303/l/*.html
sed -i "s|\/1623\/i\/|/1623/303/i/|g" 303/l/*.html
sed -i 's|\/1623\/i\/|/1623/303/i/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/i\/|/1623/303/i/|g" ../entrance_data/'1623-303.html'
sed -i 's|\/1623\/l\/|/1623/303/l/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/l\/|/1623/303/l/|g" ../entrance_data/'1623-303.html'
sed -i 's|\/1623\/t\/|/1623/303/t/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/t\/|/1623/303/t/|g" ../entrance_data/'1623-303.html'
mv l/"2023-ASH-15-entrance1.html" 303/l
sed -i 's|\/1623\/i\/|/1623/303/i/|g' 303/l/*.html
sed -i "s|\/1623\/i\/|/1623/303/i/|g" 303/l/*.html
sed -i 's|\/1623\/i\/|/1623/303/i/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/i\/|/1623/303/i/|g" ../entrance_data/'1623-303.html'
sed -i 's|\/1623\/l\/|/1623/303/l/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/l\/|/1623/303/l/|g" ../entrance_data/'1623-303.html'
sed -i 's|\/1623\/t\/|/1623/303/t/|g' ../entrance_data/'1623-303.html'
sed -i "s|\/1623\/t\/|/1623/303/t/|g" ../entrance_data/'1623-303.html'
mv t/"2023-ASH-15-entrance2.jpg" 303/t
mv i/"2023-ASH-15-entrance2.jpg" 303/i
mv l/"2023-ASH-17-bothentrances.html" 306/l
sed -i 's|\/1623\/i\/|/1623/306/i/|g' 306/l/*.html
sed -i "s|\/1623\/i\/|/1623/306/i/|g" 306/l/*.html
sed -i 's|\/1623\/i\/|/1623/306/i/|g' ../entrance_data/'1623-306b.html'
sed -i "s|\/1623\/i\/|/1623/306/i/|g" ../entrance_data/'1623-306b.html'
sed -i 's|\/1623\/l\/|/1623/306/l/|g' ../entrance_data/'1623-306b.html'
sed -i "s|\/1623\/l\/|/1623/306/l/|g" ../entrance_data/'1623-306b.html'
sed -i 's|\/1623\/t\/|/1623/306/t/|g' ../entrance_data/'1623-306b.html'
sed -i "s|\/1623\/t\/|/1623/306/t/|g" ../entrance_data/'1623-306b.html'
mv l/"2023-ASH-17-bothentrances.html" 306/l
sed -i 's|\/1623\/i\/|/1623/306/i/|g' 306/l/*.html
sed -i "s|\/1623\/i\/|/1623/306/i/|g" 306/l/*.html
sed -i 's|\/1623\/i\/|/1623/306/i/|g' ../entrance_data/'1623-306a.html'
sed -i "s|\/1623\/i\/|/1623/306/i/|g" ../entrance_data/'1623-306a.html'
sed -i 's|\/1623\/l\/|/1623/306/l/|g' ../entrance_data/'1623-306a.html'
sed -i "s|\/1623\/l\/|/1623/306/l/|g" ../entrance_data/'1623-306a.html'
sed -i 's|\/1623\/t\/|/1623/306/t/|g' ../entrance_data/'1623-306a.html'
sed -i "s|\/1623\/t\/|/1623/306/t/|g" ../entrance_data/'1623-306a.html'
mv i/"2023-ASH-17-sketch.jpg" 306/i
mv l/"2023-ASH-17-sketch.html" 306/l
sed -i 's|\/1623\/i\/|/1623/306/i/|g' 306/l/*.html
sed -i "s|\/1623\/i\/|/1623/306/i/|g" 306/l/*.html
sed -i 's|\/1623\/i\/|/1623/306/i/|g' ../cave_data/'1623-306.html'
sed -i "s|\/1623\/i\/|/1623/306/i/|g" ../cave_data/'1623-306.html'
sed -i 's|\/1623\/l\/|/1623/306/l/|g' ../cave_data/'1623-306.html'
sed -i "s|\/1623\/l\/|/1623/306/l/|g" ../cave_data/'1623-306.html'
sed -i 's|\/1623\/t\/|/1623/306/t/|g' ../cave_data/'1623-306.html'
sed -i "s|\/1623\/t\/|/1623/306/t/|g" ../cave_data/'1623-306.html'
mv t/"2023-ASH-17-bothentrances.jpg" 306/t
mv i/"2023-ASH-17-bothentrances.jpg" 306/i
mv t/"2023-ASH-17-bothentrances.jpg" 306/t
mv i/"2023-ASH-17-bothentrances.jpg" 306/i
mv l/"2023-ASH-05-entrance-b1.html" 307/l
sed -i 's|\/1623\/i\/|/1623/307/i/|g' 307/l/*.html
sed -i "s|\/1623\/i\/|/1623/307/i/|g" 307/l/*.html
sed -i 's|\/1623\/i\/|/1623/307/i/|g' ../entrance_data/'1623-307b.html'
sed -i "s|\/1623\/i\/|/1623/307/i/|g" ../entrance_data/'1623-307b.html'
sed -i 's|\/1623\/l\/|/1623/307/l/|g' ../entrance_data/'1623-307b.html'
sed -i "s|\/1623\/l\/|/1623/307/l/|g" ../entrance_data/'1623-307b.html'
sed -i 's|\/1623\/t\/|/1623/307/t/|g' ../entrance_data/'1623-307b.html'
sed -i "s|\/1623\/t\/|/1623/307/t/|g" ../entrance_data/'1623-307b.html'
mv l/"2023-ASH-05-entrance-a1.html" 307/l
sed -i 's|\/1623\/i\/|/1623/307/i/|g' 307/l/*.html
sed -i "s|\/1623\/i\/|/1623/307/i/|g" 307/l/*.html
sed -i 's|\/1623\/i\/|/1623/307/i/|g' ../entrance_data/'1623-307a.html'
sed -i "s|\/1623\/i\/|/1623/307/i/|g" ../entrance_data/'1623-307a.html'
sed -i 's|\/1623\/l\/|/1623/307/l/|g' ../entrance_data/'1623-307a.html'
sed -i "s|\/1623\/l\/|/1623/307/l/|g" ../entrance_data/'1623-307a.html'
sed -i 's|\/1623\/t\/|/1623/307/t/|g' ../entrance_data/'1623-307a.html'
sed -i "s|\/1623\/t\/|/1623/307/t/|g" ../entrance_data/'1623-307a.html'
mv t/"2023-ASH-05-entrance-a3.jpg" 307/t
mv i/"2023-ASH-05-entrance-a3.jpg" 307/i
mv l/"2023-ASH-05-entrance-a2.html" 307/l
sed -i 's|\/1623\/i\/|/1623/307/i/|g' 307/l/*.html
sed -i "s|\/1623\/i\/|/1623/307/i/|g" 307/l/*.html
sed -i 's|\/1623\/i\/|/1623/307/i/|g' ../entrance_data/'1623-307a.html'
sed -i "s|\/1623\/i\/|/1623/307/i/|g" ../entrance_data/'1623-307a.html'
sed -i 's|\/1623\/l\/|/1623/307/l/|g' ../entrance_data/'1623-307a.html'
sed -i "s|\/1623\/l\/|/1623/307/l/|g" ../entrance_data/'1623-307a.html'
sed -i 's|\/1623\/t\/|/1623/307/t/|g' ../entrance_data/'1623-307a.html'
sed -i "s|\/1623\/t\/|/1623/307/t/|g" ../entrance_data/'1623-307a.html'
mv t/"2023-ASH-05-entrance-a2.jpg" 307/t
mv i/"2023-ASH-05-entrance-a2.jpg" 307/i
mv i/"2023-ASH-05-sketch.jpg" 307/i
mv t/"2023-ASH-05-entrance-a1.jpg" 307/t
mv i/"2023-ASH-05-entrance-a1.jpg" 307/i
mv l/"2023-ASH-05-sketch.html" 307/l
sed -i 's|\/1623\/i\/|/1623/307/i/|g' 307/l/*.html
sed -i "s|\/1623\/i\/|/1623/307/i/|g" 307/l/*.html
sed -i 's|\/1623\/i\/|/1623/307/i/|g' ../cave_data/'1623-307.html'
sed -i "s|\/1623\/i\/|/1623/307/i/|g" ../cave_data/'1623-307.html'
sed -i 's|\/1623\/l\/|/1623/307/l/|g' ../cave_data/'1623-307.html'
sed -i "s|\/1623\/l\/|/1623/307/l/|g" ../cave_data/'1623-307.html'
sed -i 's|\/1623\/t\/|/1623/307/t/|g' ../cave_data/'1623-307.html'
sed -i "s|\/1623\/t\/|/1623/307/t/|g" ../cave_data/'1623-307.html'
mv l/"2023-ASH-05-entrance-a3.html" 307/l
sed -i 's|\/1623\/i\/|/1623/307/i/|g' 307/l/*.html
sed -i "s|\/1623\/i\/|/1623/307/i/|g" 307/l/*.html
sed -i 's|\/1623\/i\/|/1623/307/i/|g' ../cave_data/'1623-307.html'
sed -i "s|\/1623\/i\/|/1623/307/i/|g" ../cave_data/'1623-307.html'
sed -i 's|\/1623\/l\/|/1623/307/l/|g' ../cave_data/'1623-307.html'
sed -i "s|\/1623\/l\/|/1623/307/l/|g" ../cave_data/'1623-307.html'
sed -i 's|\/1623\/t\/|/1623/307/t/|g' ../cave_data/'1623-307.html'
sed -i "s|\/1623\/t\/|/1623/307/t/|g" ../cave_data/'1623-307.html'
mv t/"2023-ASH-05-entrance-b1.jpg" 307/t
mv i/"2023-ASH-05-entrance-b1.jpg" 307/i
mv l/"2023-ASH-08-entrance-a3.html" 308/l
sed -i 's|\/1623\/i\/|/1623/308/i/|g' 308/l/*.html
sed -i "s|\/1623\/i\/|/1623/308/i/|g" 308/l/*.html
sed -i 's|\/1623\/i\/|/1623/308/i/|g' ../cave_data/'1623-308.html'
sed -i "s|\/1623\/i\/|/1623/308/i/|g" ../cave_data/'1623-308.html'
sed -i 's|\/1623\/l\/|/1623/308/l/|g' ../cave_data/'1623-308.html'
sed -i "s|\/1623\/l\/|/1623/308/l/|g" ../cave_data/'1623-308.html'
sed -i 's|\/1623\/t\/|/1623/308/t/|g' ../cave_data/'1623-308.html'
sed -i "s|\/1623\/t\/|/1623/308/t/|g" ../cave_data/'1623-308.html'
mv l/"2023-ASH-08-sketch.html" 308/l
sed -i 's|\/1623\/i\/|/1623/308/i/|g' 308/l/*.html
sed -i "s|\/1623\/i\/|/1623/308/i/|g" 308/l/*.html
sed -i 's|\/1623\/i\/|/1623/308/i/|g' ../cave_data/'1623-308.html'
sed -i "s|\/1623\/i\/|/1623/308/i/|g" ../cave_data/'1623-308.html'
sed -i 's|\/1623\/l\/|/1623/308/l/|g' ../cave_data/'1623-308.html'
sed -i "s|\/1623\/l\/|/1623/308/l/|g" ../cave_data/'1623-308.html'
sed -i 's|\/1623\/t\/|/1623/308/t/|g' ../cave_data/'1623-308.html'
sed -i "s|\/1623\/t\/|/1623/308/t/|g" ../cave_data/'1623-308.html'
mv l/"2023-ASH-08-entrance-a1.html" 308/l
sed -i 's|\/1623\/i\/|/1623/308/i/|g' 308/l/*.html
sed -i "s|\/1623\/i\/|/1623/308/i/|g" 308/l/*.html
sed -i 's|\/1623\/i\/|/1623/308/i/|g' ../entrance_data/'1623-308a.html'
sed -i "s|\/1623\/i\/|/1623/308/i/|g" ../entrance_data/'1623-308a.html'
sed -i 's|\/1623\/l\/|/1623/308/l/|g' ../entrance_data/'1623-308a.html'
sed -i "s|\/1623\/l\/|/1623/308/l/|g" ../entrance_data/'1623-308a.html'
sed -i 's|\/1623\/t\/|/1623/308/t/|g' ../entrance_data/'1623-308a.html'
sed -i "s|\/1623\/t\/|/1623/308/t/|g" ../entrance_data/'1623-308a.html'
mv t/"2023-ASH-08-entrance-b1.jpg" 308/t
mv i/"2023-ASH-08-entrance-b1.jpg" 308/i
mv l/"2023-ASH-08-entrance-b1.html" 308/l
sed -i 's|\/1623\/i\/|/1623/308/i/|g' 308/l/*.html
sed -i "s|\/1623\/i\/|/1623/308/i/|g" 308/l/*.html
sed -i 's|\/1623\/i\/|/1623/308/i/|g' ../entrance_data/'1623-308b.html'
sed -i "s|\/1623\/i\/|/1623/308/i/|g" ../entrance_data/'1623-308b.html'
sed -i 's|\/1623\/l\/|/1623/308/l/|g' ../entrance_data/'1623-308b.html'
sed -i "s|\/1623\/l\/|/1623/308/l/|g" ../entrance_data/'1623-308b.html'
sed -i 's|\/1623\/t\/|/1623/308/t/|g' ../entrance_data/'1623-308b.html'
sed -i "s|\/1623\/t\/|/1623/308/t/|g" ../entrance_data/'1623-308b.html'
mv t/"2023-ASH-08-entrance-a1.jpg" 308/t
mv i/"2023-ASH-08-entrance-a1.jpg" 308/i
mv t/"2023-ASH-08-entrance-a2.jpg" 308/t
mv i/"2023-ASH-08-entrance-a2.jpg" 308/i
mv i/"2023-ASH-08-sketch.jpg" 308/i
mv l/"2023-ASH-08-entrance-a2.html" 308/l
sed -i 's|\/1623\/i\/|/1623/308/i/|g' 308/l/*.html
sed -i "s|\/1623\/i\/|/1623/308/i/|g" 308/l/*.html
sed -i 's|\/1623\/i\/|/1623/308/i/|g' ../entrance_data/'1623-308a.html'
sed -i "s|\/1623\/i\/|/1623/308/i/|g" ../entrance_data/'1623-308a.html'
sed -i 's|\/1623\/l\/|/1623/308/l/|g' ../entrance_data/'1623-308a.html'
sed -i "s|\/1623\/l\/|/1623/308/l/|g" ../entrance_data/'1623-308a.html'
sed -i 's|\/1623\/t\/|/1623/308/t/|g' ../entrance_data/'1623-308a.html'
sed -i "s|\/1623\/t\/|/1623/308/t/|g" ../entrance_data/'1623-308a.html'
mv t/"2023-ASH-08-entrance-a3.jpg" 308/t
mv i/"2023-ASH-08-entrance-a3.jpg" 308/i
mv l/"2023-ASH-09-plan.html" 309/l
sed -i 's|\/1623\/i\/|/1623/309/i/|g' 309/l/*.html
sed -i "s|\/1623\/i\/|/1623/309/i/|g" 309/l/*.html
sed -i 's|\/1623\/i\/|/1623/309/i/|g' ../cave_data/'1623-309.html'
sed -i "s|\/1623\/i\/|/1623/309/i/|g" ../cave_data/'1623-309.html'
sed -i 's|\/1623\/l\/|/1623/309/l/|g' ../cave_data/'1623-309.html'
sed -i "s|\/1623\/l\/|/1623/309/l/|g" ../cave_data/'1623-309.html'
sed -i 's|\/1623\/t\/|/1623/309/t/|g' ../cave_data/'1623-309.html'
sed -i "s|\/1623\/t\/|/1623/309/t/|g" ../cave_data/'1623-309.html'
mv l/"2023-ASH-09-entrance2.html" 309/l
sed -i 's|\/1623\/i\/|/1623/309/i/|g' 309/l/*.html
sed -i "s|\/1623\/i\/|/1623/309/i/|g" 309/l/*.html
sed -i 's|\/1623\/i\/|/1623/309/i/|g' ../entrance_data/'1623-309a.html'
sed -i "s|\/1623\/i\/|/1623/309/i/|g" ../entrance_data/'1623-309a.html'
sed -i 's|\/1623\/l\/|/1623/309/l/|g' ../entrance_data/'1623-309a.html'
sed -i "s|\/1623\/l\/|/1623/309/l/|g" ../entrance_data/'1623-309a.html'
sed -i 's|\/1623\/t\/|/1623/309/t/|g' ../entrance_data/'1623-309a.html'
sed -i "s|\/1623\/t\/|/1623/309/t/|g" ../entrance_data/'1623-309a.html'
mv i/"2023-ASH-09-plan.jpg" 309/i
mv t/"2023-ASH-09-entrance1.jpg" 309/t
mv i/"2023-ASH-09-entrance1.jpg" 309/i
mv t/"2023-ASH-09-entrance2.jpg" 309/t
mv i/"2023-ASH-09-entrance2.jpg" 309/i
mv l/"2023-ASH-09-entrance1.html" 309/l
sed -i 's|\/1623\/i\/|/1623/309/i/|g' 309/l/*.html
sed -i "s|\/1623\/i\/|/1623/309/i/|g" 309/l/*.html
sed -i 's|\/1623\/i\/|/1623/309/i/|g' ../entrance_data/'1623-309a.html'
sed -i "s|\/1623\/i\/|/1623/309/i/|g" ../entrance_data/'1623-309a.html'
sed -i 's|\/1623\/l\/|/1623/309/l/|g' ../entrance_data/'1623-309a.html'
sed -i "s|\/1623\/l\/|/1623/309/l/|g" ../entrance_data/'1623-309a.html'
sed -i 's|\/1623\/t\/|/1623/309/t/|g' ../entrance_data/'1623-309a.html'
sed -i "s|\/1623\/t\/|/1623/309/t/|g" ../entrance_data/'1623-309a.html'
mv l/"2023-ASH-16-entrance2.html" 311/l
sed -i 's|\/1623\/i\/|/1623/311/i/|g' 311/l/*.html
sed -i "s|\/1623\/i\/|/1623/311/i/|g" 311/l/*.html
sed -i 's|\/1623\/i\/|/1623/311/i/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/i\/|/1623/311/i/|g" ../entrance_data/'1623-311.html'
sed -i 's|\/1623\/l\/|/1623/311/l/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/l\/|/1623/311/l/|g" ../entrance_data/'1623-311.html'
sed -i 's|\/1623\/t\/|/1623/311/t/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/t\/|/1623/311/t/|g" ../entrance_data/'1623-311.html'
mv t/"2023-ASH-16-entrance3.jpg" 311/t
mv i/"2023-ASH-16-entrance3.jpg" 311/i
mv l/"2023-ASH-16-entrance3.html" 311/l
sed -i 's|\/1623\/i\/|/1623/311/i/|g' 311/l/*.html
sed -i "s|\/1623\/i\/|/1623/311/i/|g" 311/l/*.html
sed -i 's|\/1623\/i\/|/1623/311/i/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/i\/|/1623/311/i/|g" ../entrance_data/'1623-311.html'
sed -i 's|\/1623\/l\/|/1623/311/l/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/l\/|/1623/311/l/|g" ../entrance_data/'1623-311.html'
sed -i 's|\/1623\/t\/|/1623/311/t/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/t\/|/1623/311/t/|g" ../entrance_data/'1623-311.html'
mv t/"2023-ASH-16-entrance2.jpg" 311/t
mv i/"2023-ASH-16-entrance2.jpg" 311/i
mv l/"2023-ASH-16-entrance1.html" 311/l
sed -i 's|\/1623\/i\/|/1623/311/i/|g' 311/l/*.html
sed -i "s|\/1623\/i\/|/1623/311/i/|g" 311/l/*.html
sed -i 's|\/1623\/i\/|/1623/311/i/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/i\/|/1623/311/i/|g" ../entrance_data/'1623-311.html'
sed -i 's|\/1623\/l\/|/1623/311/l/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/l\/|/1623/311/l/|g" ../entrance_data/'1623-311.html'
sed -i 's|\/1623\/t\/|/1623/311/t/|g' ../entrance_data/'1623-311.html'
sed -i "s|\/1623\/t\/|/1623/311/t/|g" ../entrance_data/'1623-311.html'
mv i/"2023-ASH-16-sketch.jpg" 311/i
mv l/"2023-ASH-16-sketch.html" 311/l
sed -i 's|\/1623\/i\/|/1623/311/i/|g' 311/l/*.html
sed -i "s|\/1623\/i\/|/1623/311/i/|g" 311/l/*.html
sed -i 's|\/1623\/i\/|/1623/311/i/|g' ../cave_data/'1623-311.html'
sed -i "s|\/1623\/i\/|/1623/311/i/|g" ../cave_data/'1623-311.html'
sed -i 's|\/1623\/l\/|/1623/311/l/|g' ../cave_data/'1623-311.html'
sed -i "s|\/1623\/l\/|/1623/311/l/|g" ../cave_data/'1623-311.html'
sed -i 's|\/1623\/t\/|/1623/311/t/|g' ../cave_data/'1623-311.html'
sed -i "s|\/1623\/t\/|/1623/311/t/|g" ../cave_data/'1623-311.html'
mv t/"2023-ASH-16-entrance1.jpg" 311/t
mv i/"2023-ASH-16-entrance1.jpg" 311/i
mv t/"photo_2023-10-30_22-07-43.jpg" 315/t
mv i/"photo_2023-10-30_22-07-43.jpg" 315/i
mv l/"photo_2023-10-30_22-07-43.html" 315/l
sed -i 's|\/1623\/i\/|/1623/315/i/|g' 315/l/*.html
sed -i "s|\/1623\/i\/|/1623/315/i/|g" 315/l/*.html
sed -i 's|\/1623\/i\/|/1623/315/i/|g' ../cave_data/'1623-315.html'
sed -i "s|\/1623\/i\/|/1623/315/i/|g" ../cave_data/'1623-315.html'
sed -i 's|\/1623\/l\/|/1623/315/l/|g' ../cave_data/'1623-315.html'
sed -i "s|\/1623\/l\/|/1623/315/l/|g" ../cave_data/'1623-315.html'
sed -i 's|\/1623\/t\/|/1623/315/t/|g' ../cave_data/'1623-315.html'
sed -i "s|\/1623\/t\/|/1623/315/t/|g" ../cave_data/'1623-315.html'

141
1623-renaming.txt Normal file
View File

@@ -0,0 +1,141 @@
range(303, 316) 312
2023-RAWDB-02 312
range(303, 316) 313
2023-RAWDB-01 313
range(303, 316) 314
2023-KT-02 314
range(303, 316) 315
2023-JSS-01 315
('c', 'i', '2013-06', '1623-2013-06.html', '2013wallet23.jpg')
('c', 'l', '2013-06', '1623-2013-06.html', '2013wallet23.html')
('c', 'l', '2013-BL-01', '1623-2013-BL-01.html', '2013-BL-01.html')
('c', 't', '2013-BL-01', '1623-2013-BL-01.html', '2013-BL-01.jpg')
('c', 't', '2023-BL-11', '1623-2023-BL-11.html', '2023-BL-11-sketch.jpg')
('c', 'l', '2023-BL-11', '1623-2023-BL-11.html', '2023-BL-11-sketch.html')
('c', 'i', '306', '1623-306.html', '2023-ASH-17-sketch.jpg')
('c', 'l', '306', '1623-306.html', '2023-ASH-17-sketch.html')
('c', 't', '307', '1623-307.html', '2023-ASH-05-entrance-a3.jpg')
('c', 'i', '307', '1623-307.html', '2023-ASH-05-sketch.jpg')
('c', 'l', '307', '1623-307.html', '2023-ASH-05-sketch.html')
('c', 'l', '307', '1623-307.html', '2023-ASH-05-entrance-a3.html')
('c', 'l', '308', '1623-308.html', '2023-ASH-08-entrance-a3.html')
('c', 'l', '308', '1623-308.html', '2023-ASH-08-sketch.html')
('c', 'i', '308', '1623-308.html', '2023-ASH-08-sketch.jpg')
('c', 't', '308', '1623-308.html', '2023-ASH-08-entrance-a3.jpg')
('c', 'l', '309', '1623-309.html', '2023-ASH-09-plan.html')
('c', 'i', '309', '1623-309.html', '2023-ASH-09-plan.jpg')
('c', 'i', '311', '1623-311.html', '2023-ASH-16-sketch.jpg')
('c', 'l', '311', '1623-311.html', '2023-ASH-16-sketch.html')
('c', 't', '315', '1623-315.html', 'photo_2023-10-30_22-07-43.jpg')
('c', 'l', '315', '1623-315.html', 'photo_2023-10-30_22-07-43.html')
('e', 'l', '2012-sw-01', '1623-2012-sw-01.html', '2012-sw-01_i1.html')
('e', 't', '2012-sw-01', '1623-2012-sw-01.html', '2012-sw-01_i1.jpg')
('e', 'l', '2012-sw-03', '1623-2012-sw-03.html', '2012-sw-03_i2.html')
('e', 'l', '2012-sw-03', '1623-2012-sw-03.html', '2012-sw-03_i1.html')
('e', 't', '2012-sw-03', '1623-2012-sw-03.html', '2012-sw-03_i1.jpg')
('e', 't', '2012-sw-03', '1623-2012-sw-03.html', '2012-sw-03_i2.jpg')
('e', 'l', '2017-AA-01', '1623-2017-AA-01.html', 'aa-1-2017_with-tag.html')
('e', 't', '2017-AA-01', '1623-2017-AA-01.html', 'aa-1-2017_with-tag.jpg')
('e', 'l', '2017-AA-01', '1623-2017-AA-01.html', 'aa-1-2017_looking-down.html')
('e', 't', '2017-AA-01', '1623-2017-AA-01.html', 'aa-1-2017_looking-down.jpg')
('e', 't', '2017-AMS-02', '1623-2017-AMS-02.html', 'ent081-20170807.jpg')
('e', 'l', '2017-AMS-02', '1623-2017-AMS-02.html', 'near-ent-2017-ams-02.html')
('e', 't', '2017-AMS-02', '1623-2017-AMS-02.html', 'near-ent-2017-ams-02.jpg')
('e', 'l', '2017-AMS-02', '1623-2017-AMS-02.html', 'ent081-20170807.html')
('e', 'l', '2017-NR-01', '1623-2017-NR-01.html', '2017-NR-01_03.html')
('e', 't', '2017-NR-01', '1623-2017-NR-01.html', '2017-NR-01_03.jpg')
('e', 't', '2017-NR-01', '1623-2017-NR-01.html', '2017-NR-01_04.jpg')
('e', 'l', '2017-NR-01', '1623-2017-NR-01.html', '2017-NR-01_04.html')
('e', 't', '2018-NTU-01', '1623-2018-NTU-01.html', '2018-ntu-01_looking_down_shaft-and-rift.jpg')
('e', 't', '2018-NTU-01', '1623-2018-NTU-01.html', '2018-ntu-01_tag_arrows.jpg')
('e', 't', '2018-NTU-01', '1623-2018-NTU-01.html', '2018-ntu-01_neil_view_west.jpg')
('e', 'l', '2018-NTU-01', '1623-2018-NTU-01.html', '2018-ntu-01_looking_down_shaft-and-rift.html')
('e', 'l', '2018-NTU-01', '1623-2018-NTU-01.html', '2018-ntu-01_tag_arrows.html')
('e', 'l', '2018-NTU-01', '1623-2018-NTU-01.html', '2018-ntu-01_neil_view_west.html')
('e', 't', '2018-pf-03', '1623-2018-pf-03.html', '2018-pf-03_and_pf-02_arrows.jpg')
('e', 'l', '2018-pf-03', '1623-2018-pf-03.html', '2018-pf-03_and_pf-02_arrows.html')
('e', 'l', '2023-ASH-01', '1623-2023-ASH-01a.html', '2023-ASH-01-entrance1.html')
('e', 'l', '2023-ASH-01', '1623-2023-ASH-01a.html', '2023-ASH-01-entrance2.html')
('e', 't', '2023-ASH-01', '1623-2023-ASH-01a.html', '2023-ASH-01-entrance2.jpg')
('e', 't', '2023-ASH-01', '1623-2023-ASH-01a.html', '2023-ASH-01-entrance1.jpg')
('e', 'l', '2023-ASH-02', '1623-2023-ASH-02a.html', '2023-ASH-02-entrance1.html')
('e', 't', '2023-ASH-02', '1623-2023-ASH-02a.html', '2023-ASH-02-entrance1.jpg')
('e', 'l', '2023-ASH-02', '1623-2023-ASH-02a.html', '2023-ASH-02-entrance2.html')
('e', 't', '2023-ASH-02', '1623-2023-ASH-02a.html', '2023-ASH-02-entrance2.jpg')
('e', 'l', '2023-ASH-03', '1623-2023-ASH-03a.html', '2023-ASH-03-entrance2.html')
('e', 't', '2023-ASH-03', '1623-2023-ASH-03a.html', '2023-ASH-03-entrance2.jpg')
('e', 'l', '2023-ASH-03', '1623-2023-ASH-03a.html', '2023-ASH-03-entrance1.html')
('e', 't', '2023-ASH-03', '1623-2023-ASH-03a.html', '2023-ASH-03-entrance1.jpg')
('e', 't', '2023-ASH-04', '1623-2023-ASH-04a.html', '2023-ASH-04-entrance2.jpg')
('e', 't', '2023-ASH-04', '1623-2023-ASH-04a.html', '2023-ASH-04-entrance1.jpg')
('e', 'l', '2023-ASH-04', '1623-2023-ASH-04a.html', '2023-ASH-04-entrance1.html')
('e', 'l', '2023-ASH-04', '1623-2023-ASH-04a.html', '2023-ASH-04-entrance2.html')
('e', 't', '2023-ASH-06', '1623-2023-ASH-06a.html', '2023-ASH-06-entrance2.jpg')
('e', 'l', '2023-ASH-06', '1623-2023-ASH-06a.html', '2023-ASH-06-entrance1.html')
('e', 'l', '2023-ASH-06', '1623-2023-ASH-06a.html', '2023-ASH-06-entrance2.html')
('e', 't', '2023-ASH-06', '1623-2023-ASH-06a.html', '2023-ASH-06-entrance1.jpg')
('e', 'l', '2023-ASH-07', '1623-2023-ASH-07a.html', '2023-ASH-07-entrance1.html')
('e', 't', '2023-ASH-07', '1623-2023-ASH-07a.html', '2023-ASH-07-entrance1.jpg')
('e', 't', '2023-ASH-07', '1623-2023-ASH-07a.html', '2023-ASH-07-entrance2.jpg')
('e', 'l', '2023-ASH-07', '1623-2023-ASH-07a.html', '2023-ASH-07-entrance2.html')
('e', 'l', '2023-ASH-10', '1623-2023-ASH-10a.html', '2023-ASH-10-entrance2.html')
('e', 't', '2023-ASH-10', '1623-2023-ASH-10a.html', '2023-ASH-10-entrance1.jpg')
('e', 't', '2023-ASH-10', '1623-2023-ASH-10a.html', '2023-ASH-10-entrance2.jpg')
('e', 'l', '2023-ASH-10', '1623-2023-ASH-10a.html', '2023-ASH-10-entrance1.html')
('e', 't', '2023-ASH-11', '1623-2023-ASH-11a.html', '2023-ASH-11-entrance2.jpg')
('e', 'l', '2023-ASH-11', '1623-2023-ASH-11a.html', '2023-ASH-11-entrance2.html')
('e', 'l', '2023-ASH-11', '1623-2023-ASH-11a.html', '2023-ASH-11-entrance4.html')
('e', 'l', '2023-ASH-11', '1623-2023-ASH-11a.html', '2023-ASH-11-entrance3.html')
('e', 'l', '2023-ASH-11', '1623-2023-ASH-11a.html', '2023-ASH-11-entrance1.html')
('e', 't', '2023-ASH-11', '1623-2023-ASH-11a.html', '2023-ASH-11-entrance1.jpg')
('e', 't', '2023-ASH-11', '1623-2023-ASH-11a.html', '2023-ASH-11-entrance3.jpg')
('e', 't', '2023-ASH-11', '1623-2023-ASH-11a.html', '2023-ASH-11-entrance4.jpg')
('e', 'l', '2023-ASH-12', '1623-2023-ASH-12.html', '2023-ASH-12-entrance1.html')
('e', 't', '2023-ASH-12', '1623-2023-ASH-12.html', '2023-ASH-12-entrance1.jpg')
('e', 't', '2023-ASH-12', '1623-2023-ASH-12.html', '2023-ASH-12-entrance2.jpg')
('e', 'l', '2023-ASH-12', '1623-2023-ASH-12.html', '2023-ASH-12-entrance2.html')
('e', 'l', '2023-ASH-13', '1623-2023-ASH-13.html', '2023-ASH-13-entrance1.html')
('e', 'l', '2023-ASH-13', '1623-2023-ASH-13.html', '2023-ASH-13-entrance2.html')
('e', 't', '2023-ASH-13', '1623-2023-ASH-13.html', '2023-ASH-13-entrance2.jpg')
('e', 't', '2023-ASH-13', '1623-2023-ASH-13.html', '2023-ASH-13-entrance1.jpg')
('e', 'l', '2023-ASH-14', '1623-2023-ASH-14.html', '2023-ASH-13and14-entrances.html')
('e', 't', '2023-ASH-14', '1623-2023-ASH-14.html', '2023-ASH-14-entrance1.jpg')
('e', 'l', '2023-ASH-14', '1623-2023-ASH-14.html', '2023-ASH-14-entrance1.html')
('e', 't', '2023-ASH-14', '1623-2023-ASH-14.html', '2023-ASH-13and14-entrances.jpg')
('e', 't', '2023-BL-11', '1623-2023-BL-11.html', '20230802_165708.jpg')
('e', 't', '2023-BL-11', '1623-2023-BL-11.html', '20230802_165823.jpg')
('e', 'l', '2023-BL-11', '1623-2023-BL-11.html', '20230802_165708.html')
('e', 'l', '2023-BL-11', '1623-2023-BL-11.html', '20230802_165823.html')
('e', 't', '303', '1623-303.html', '2023-ASH-15-entrance3.jpg')
('e', 'l', '303', '1623-303.html', '2023-ASH-15-entrance3.html')
('e', 't', '303', '1623-303.html', '2023-ASH-15-entrance1.jpg')
('e', 'l', '303', '1623-303.html', '2023-ASH-15-entrance2.html')
('e', 'l', '303', '1623-303.html', '2023-ASH-15-entrance1.html')
('e', 't', '303', '1623-303.html', '2023-ASH-15-entrance2.jpg')
('e', 'l', '306', '1623-306b.html', '2023-ASH-17-bothentrances.html')
('e', 'l', '306', '1623-306a.html', '2023-ASH-17-bothentrances.html')
('e', 't', '306', '1623-306a.html', '2023-ASH-17-bothentrances.jpg')
('e', 't', '306', '1623-306b.html', '2023-ASH-17-bothentrances.jpg')
('e', 'l', '307', '1623-307b.html', '2023-ASH-05-entrance-b1.html')
('e', 'l', '307', '1623-307a.html', '2023-ASH-05-entrance-a1.html')
('e', 'l', '307', '1623-307a.html', '2023-ASH-05-entrance-a2.html')
('e', 't', '307', '1623-307a.html', '2023-ASH-05-entrance-a2.jpg')
('e', 't', '307', '1623-307a.html', '2023-ASH-05-entrance-a1.jpg')
('e', 't', '307', '1623-307b.html', '2023-ASH-05-entrance-b1.jpg')
('e', 'l', '308', '1623-308a.html', '2023-ASH-08-entrance-a1.html')
('e', 't', '308', '1623-308b.html', '2023-ASH-08-entrance-b1.jpg')
('e', 'l', '308', '1623-308b.html', '2023-ASH-08-entrance-b1.html')
('e', 't', '308', '1623-308a.html', '2023-ASH-08-entrance-a1.jpg')
('e', 't', '308', '1623-308a.html', '2023-ASH-08-entrance-a2.jpg')
('e', 'l', '308', '1623-308a.html', '2023-ASH-08-entrance-a2.html')
('e', 'l', '309', '1623-309a.html', '2023-ASH-09-entrance2.html')
('e', 't', '309', '1623-309a.html', '2023-ASH-09-entrance1.jpg')
('e', 't', '309', '1623-309a.html', '2023-ASH-09-entrance2.jpg')
('e', 'l', '309', '1623-309a.html', '2023-ASH-09-entrance1.html')
('e', 'l', '311', '1623-311.html', '2023-ASH-16-entrance2.html')
('e', 't', '311', '1623-311.html', '2023-ASH-16-entrance3.jpg')
('e', 'l', '311', '1623-311.html', '2023-ASH-16-entrance3.html')
('e', 't', '311', '1623-311.html', '2023-ASH-16-entrance2.jpg')
('e', 'l', '311', '1623-311.html', '2023-ASH-16-entrance1.html')
('e', 't', '311', '1623-311.html', '2023-ASH-16-entrance1.jpg')

84
1626-renaming.txt Normal file
View File

@@ -0,0 +1,84 @@
---------- 1626 fixing i/l/t folders for these caves and entrances
1626-2018-AD-02
1626-2018-AD-02 1626-2018-AD-02.html
1626-2018-DM-01
1626-2018-DM-01 1626-2018-DM-01.html
1626-2018-DM-02
1626-2018-DM-02 1626-2018-DM-02.html
1626-2018-DM-03
1626-2018-DM-03 1626-2018-DM-03.html
1626-2018-DM-05
1626-2018-DM-05 1626-2018-DM-05.html
1626-2018-DM-06
1626-2018-DM-06 1626-2018-DM-06.html
1626-2018-ms-02
1626-2018-ms-02 1626-2018-ms-02.html
1626-2018-ms-03
1626-2018-ms-03 1626-2018-ms-03.html
1626-2018-ms-04
1626-2018-ms-04 1626-2018-ms-04.html
1626-2018-pw-01
1626-2018-pw-01 1626-2018-pw-01.html
1626-2018-pw-02
1626-2018-pw-02 1626-2018-pw-02.html
1626-2018-pw-03
1626-2018-pw-03 1626-2018-pw-03.html
1626-2018-tk-01
1626-2018-tk-01 1626-2018-tk-01.html
1626-2018-tk-02
1626-2018-tk-02 1626-2018-tk-02.html
1626-2019-HT-01
1626-2019-HT-01 1626-2019-HT-01.html
1626-2019-HT-02
1626-2019-HT-02 1626-2019-HT-02.html
1626-2019-rh-01
1626-2019-rh-01 1626-2019-rh-01.html
1626-2019-rh-02
1626-2019-rh-02 1626-2019-rh-02.html
1626-2023-BL-01
1626-2023-BL-01 1626-2023-BL-01.html
1626-2023-BL-03
1626-2023-BL-03 1626-2023-BL-03.html
1626-2023-BL-04
1626-2023-BL-04a 1626-2023-BL-04a.html
1626-2023-BL-04b 1626-2023-BL-04b.html
1626-2023-BL-05
1626-2023-BL-05 1626-2023-BL-05.html
1626-2023-BL-06
1626-2023-BL-06 1626-2023-BL-06.html
1626-2023-BL-07
1626-2023-BL-07 1626-2023-BL-07.html
1626-2023-BL-09
1626-2023-BL-09 1626-2023-BL-09.html
1626-2023-BZ-01
1626-2023-BZ-01 1626-2023-BZ-01.html
1626-2023-ww-01
1626-2023-ww-01 1626-2023-ww-01.html
1626-2024-pb-01
1626-2024-pb-01 1626-2024-pb-01.html
1626-361
1626-361 1626-361.html
1626-E02
1626-E02 1626-E02.html
1626-E09
1626-E09 1626-E09.html
1626-E16
1626-E16 1626-E16.html
1626-E28
1626-E28 1626-E28.html
1626-casino-01
1626-casino-01 1626-casino-01.html
1626-loutoti-01
1626-loutoti-01 1626-loutoti-01.html
1626-upside-down-01
1626-upside-down-01 1626-upside-down-01.html
1626-2018-ad-03
1626-2018-ad-03 1626-2018-ad-03.html
1626-2023-BL-08
1626-2023-BL-08 1626-2023-BL-08.html
1626-LA11
1626-LA11 1626-LA11.html
1626-LA34
1626-LA34 1626-LA34.html
1626-LA12
1626-LA12 1626-LA12.html

77
Containerfile Normal file
View File

@@ -0,0 +1,77 @@
# create an oci container image with
# cd /home/expo && podman build -t expo:dev --rm -f troggle/Containerfile
#
FROM docker.io/library/debian:bookworm
WORKDIR /home/expo2
RUN apt update && \
apt install -y postgresql apache2 survex rsync git cgit proftpd \
python3 python3-django python3-pil python3-piexif \
python3-bs4 python3-unidecode python3-cryptography \
libjs-codemirror
# do we need libjs-leaflet? libjs-sizzle? libjs-mgrs?
# Install non-packaged dependencies
# apt install CaveView bins libjs-proj4 ufraw from local repo/backports?
# bins - photo processing
# ufraw - raw inages in photo collection do we need ufraw-batch? bring sin libtiff5 libgtkimageview0 libexiv2-14 libwebp6
# kanboard - kanboard organiser
# caveview.js - rotating cave on each page. brings in libjs-proj4 which brings in linjs-mgrs . We should update.
# tonymce (html editor)
# we also have host and rssh. probably not needed?
# Copy only the dependency files first
#wget troggle/pyproject.toml troggle/uv.lock
#RUN wget troggle/pyproject.toml && uv sync --frozen
RUN useradd -m expo -G sudo -s /bin/bash
# Optional:install and configure BoE
#add apache config, enable modules
#configure postgres
#Start up services for apache, proftpd, postgresql, cron?
#end of system stage
# User files - separate layer?
RUN chown expo:expo .
USER expo
RUN mkdir -p repositories/git && cd repositories/git && \
git clone http://expo.survex.com/repositories/troggle/.git && \
git clone http://expo.survex.com/repositories/expoweb/.git && \
git clone http://expo.survex.com/repositories/loser/.git && \
git clone http://expo.survex.com/repositories/drawings/.git
RUN ln -s repositories/git/troggle troggle && \
ln -s repositories/git/troggle expoweb && \
ln -s repositories/git/troggle loser && \
ln -s repositories/git/troggle drawings
RUN git config --global user.email "expo@potato.hut"
RUN git config --global user.name "expo"
RUN git config --global pull.rebase true
#rsync -az expo.survex.com:expofiles expofiles
#demo short version
#rsync -az expo.survex.com:expofiles/surveyscans/2018 expofiles/surveyscans/2018
#rsync -az expo.survex.com:expofiles/photos/2018/PhilipSargent/ expofiles/photos/2018/PhilipSargent
#/bin/sh is missing at this point - why?
RUN cd troggle && run databaseReset.py reset INIT
EXPOSE 8080
#Run postres process
CMD ["uv", "run", "python", "troggle/manage.py", "runserver", "0.0.0.0:8080"]
CMD ["bash"]
# move this file to the directory above troggle, loser etc before running the podman image build command.
# used image with:
# podman run -it --network=host --rm expo:dev

557
ERROR.txt Normal file
View File

@@ -0,0 +1,557 @@
Creating test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')...
test_fix_cave_bare_url115 (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_cave_bare_url115)
Expect to get Page Not Found and status 404 ... ok
test_fix_cave_slug115 (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_cave_slug115)
Expect to get Page Not Found and status 404 ... ok
test_fix_cave_url115 (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_cave_url115) ... ERROR
test_fix_cave_url284 (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_cave_url284) ... ERROR
test_fix_caves284 (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_caves284) ... ERROR
test_fix_expedition (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_expedition) ... ERROR
test_fix_person (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_person) ... ok
test_fix_personexped (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_personexped) ... ok
test_fix_cave_loaded115 (troggle.core.TESTS.test_caves.FixtureTests.test_fix_cave_loaded115) ... ok
test_fix_cave_loaded284 (troggle.core.TESTS.test_caves.FixtureTests.test_fix_cave_loaded284) ... ok
test_fix_person_loaded (troggle.core.TESTS.test_caves.FixtureTests.test_fix_person_loaded) ... ok
test_page_personexpedition (troggle.core.TESTS.test_caves.FixtureTests.test_page_personexpedition) ... ok
test_logbook_exists (troggle.core.TESTS.test_imports.ImportTest.test_logbook_exists) ... ok
test_installs (troggle.core.TESTS.test_imports.SubprocessTest.test_installs)
Expects external software installed: cavern, survexport, git ... ok
test_loser_survex_status (troggle.core.TESTS.test_imports.SubprocessTest.test_loser_survex_status)
Expects no failures of survex files ... FAIL
test_repos_git_status (troggle.core.TESTS.test_imports.SubprocessTest.test_repos_git_status)
Expects clean git repos with no added files and no merge failures ... FAIL
test_utf8 (troggle.core.TESTS.test_imports.SubprocessTest.test_utf8)
Expects that utf8 is the default encoding when opening files ... ok
test_admin_login (troggle.core.TESTS.test_logins.ComplexLoginTests.test_admin_login) ... ok
test_authentication_login (troggle.core.TESTS.test_logins.ComplexLoginTests.test_authentication_login) ... ok
test_noinfo_login (troggle.core.TESTS.test_logins.ComplexLoginTests.test_noinfo_login) ... ok
test_ordinary_login (troggle.core.TESTS.test_logins.ComplexLoginTests.test_ordinary_login) ... ok
test_user_force (troggle.core.TESTS.test_logins.ComplexLoginTests.test_user_force) ... ok
test_fix_admin_login_fail (troggle.core.TESTS.test_logins.FixturePageTests.test_fix_admin_login_fail) ... ok
test_dwg_upload_drawing (troggle.core.TESTS.test_logins.PostTests.test_dwg_upload_drawing)
Expect no-suffix file to upload ... ok
test_dwg_upload_txt (troggle.core.TESTS.test_logins.PostTests.test_dwg_upload_txt)
Expect .pdf file to be refused upload ... ok
test_file_permissions (troggle.core.TESTS.test_logins.PostTests.test_file_permissions)
Expect to be allowed to write to SCANS_ROOT, DRAWINGS_DATA, SURVEX_DATA, EXPOWEB ... ok
test_photo_folder_create (troggle.core.TESTS.test_logins.PostTests.test_photo_folder_create)
Create folder for new user ... ERROR
test_photo_upload (troggle.core.TESTS.test_logins.PostTests.test_photo_upload)
Expect photo upload to work on any file (contrary to msg on screen) ... ERROR
test_photo_upload_rename (troggle.core.TESTS.test_logins.PostTests.test_photo_upload_rename)
Expect photo upload to work on any file (contrary to msg on screen) ... ERROR
test_scan_upload (troggle.core.TESTS.test_logins.PostTests.test_scan_upload)
Expect scan upload to wallet to work on any file ... ok
test_aliases (troggle.core.TESTS.test_parsers.ImportTest.test_aliases) ... ok
test_lbe (troggle.core.TESTS.test_parsers.ImportTest.test_lbe) ... ok
test_lbe_edit (troggle.core.TESTS.test_parsers.ImportTest.test_lbe_edit)
This page requires the user to be logged in first, hence the extra shenanigans ... ok
test_lbe_new (troggle.core.TESTS.test_parsers.ImportTest.test_lbe_new)
This page requires the user to be logged in first, hence the extra shenanigans ... ERROR
test_logbook_exists (troggle.core.TESTS.test_parsers.ImportTest.test_logbook_exists) ... ok
test_logbook_parse_issues (troggle.core.TESTS.test_parsers.ImportTest.test_logbook_parse_issues)
This is just testing the db not the web page ... ok
test_people (troggle.core.TESTS.test_parsers.ImportTest.test_people) ... ok
test_survexfiles (troggle.core.TESTS.test_parsers.ImportTest.test_survexfiles) ... ERROR
test_statistics (troggle.core.TESTS.test_urls.URLTests.test_statistics) ... ok
test_stats (troggle.core.TESTS.test_urls.URLTests.test_stats) ... ok
test_url_allscans (troggle.core.TESTS.test_urls.URLTests.test_url_allscans)
Test the {% url "allscans" %} reverse resolution ... ok
test_url_stats (troggle.core.TESTS.test_urls.URLTests.test_url_stats)
Test the {% url "stats" %} reverse resolution ... ok
test_url_survexcaveslist (troggle.core.TESTS.test_urls.URLTests.test_url_survexcaveslist)
Test the {% url "allscans" %} reverse resolution ... ok
test_url_threed (troggle.core.TESTS.test_urls.URLTests.test_url_threed)
Test the {% url "threed" %} reverse resolution ... ok
test_cave_kataster_not_found (troggle.core.TESTS.tests.PageTests.test_cave_kataster_not_found) ... ok
test_caves_page (troggle.core.TESTS.tests.PageTests.test_caves_page) ... ok
test_caves_page_kataster_not_found (troggle.core.TESTS.tests.PageTests.test_caves_page_kataster_not_found) ... ok
test_dataissues (troggle.core.TESTS.tests.PageTests.test_dataissues) ... ok
test_expoweb_dir (troggle.core.TESTS.tests.PageTests.test_expoweb_dir) ... ok
test_expoweb_dir_no_index (troggle.core.TESTS.tests.PageTests.test_expoweb_dir_no_index) ... ok
test_expoweb_dir_with_index2 (troggle.core.TESTS.tests.PageTests.test_expoweb_dir_with_index2) ... ok
test_expoweb_dir_with_index_htm (troggle.core.TESTS.tests.PageTests.test_expoweb_dir_with_index_htm) ... ok
test_expoweb_dir_with_index_html (troggle.core.TESTS.tests.PageTests.test_expoweb_dir_with_index_html) ... ok
test_expoweb_dirslash (troggle.core.TESTS.tests.PageTests.test_expoweb_dirslash) ... ok
test_expoweb_htm (troggle.core.TESTS.tests.PageTests.test_expoweb_htm) ... ok
test_expoweb_no_dir (troggle.core.TESTS.tests.PageTests.test_expoweb_no_dir) ... ok
test_expoweb_notfound (troggle.core.TESTS.tests.PageTests.test_expoweb_notfound) ... ok
test_expoweb_paths (troggle.core.TESTS.tests.PageTests.test_expoweb_paths) ... ok
test_expoweb_root (troggle.core.TESTS.tests.PageTests.test_expoweb_root) ... ok
test_expoweb_root_slash (troggle.core.TESTS.tests.PageTests.test_expoweb_root_slash) ... ok
test_expoweb_troggle_default (troggle.core.TESTS.tests.PageTests.test_expoweb_troggle_default) ... ok
test_expoweb_troggle_default_slash (troggle.core.TESTS.tests.PageTests.test_expoweb_troggle_default_slash) ... ok
test_expoweb_via_areaid (troggle.core.TESTS.tests.PageTests.test_expoweb_via_areaid) ... ok
test_not_found_survexfile_cave (troggle.core.TESTS.tests.PageTests.test_not_found_survexfile_cave) ... ok
test_page_admin (troggle.core.TESTS.tests.PageTests.test_page_admin) ... ok
test_page_admindocs_exped (troggle.core.TESTS.tests.PageTests.test_page_admindocs_exped) ... ok
test_page_dwgallfiles_empty (troggle.core.TESTS.tests.PageTests.test_page_dwgallfiles_empty) ... ok
test_page_dwgallfiles_empty_slash (troggle.core.TESTS.tests.PageTests.test_page_dwgallfiles_empty_slash) ... ok
test_page_dwgdataraw_empty (troggle.core.TESTS.tests.PageTests.test_page_dwgdataraw_empty) ... ok
test_page_expofile_document_loeffler_pdf (troggle.core.TESTS.tests.PageTests.test_page_expofile_document_loeffler_pdf) ... ok
test_page_expofile_document_png (troggle.core.TESTS.tests.PageTests.test_page_expofile_document_png) ... ok
test_page_expofile_document_rope_pdf (troggle.core.TESTS.tests.PageTests.test_page_expofile_document_rope_pdf) ... ok
test_page_expofile_documents (troggle.core.TESTS.tests.PageTests.test_page_expofile_documents) ... ok
test_page_expofile_documents_slash (troggle.core.TESTS.tests.PageTests.test_page_expofile_documents_slash) ... ok
test_page_expofile_writeup (troggle.core.TESTS.tests.PageTests.test_page_expofile_writeup) ... ok
test_page_expofiles_badness (troggle.core.TESTS.tests.PageTests.test_page_expofiles_badness) ... ok
test_page_expofiles_docs_dir (troggle.core.TESTS.tests.PageTests.test_page_expofiles_docs_dir) ... ok
test_page_expofiles_root_dir (troggle.core.TESTS.tests.PageTests.test_page_expofiles_root_dir) ... ok
test_page_expofiles_root_slash_dir (troggle.core.TESTS.tests.PageTests.test_page_expofiles_root_slash_dir) ... ok
test_page_folk (troggle.core.TESTS.tests.PageTests.test_page_folk) ... ok
test_page_photos_dir (troggle.core.TESTS.tests.PageTests.test_page_photos_dir) ... ok
test_page_photos_not_ok (troggle.core.TESTS.tests.PageTests.test_page_photos_not_ok) ... ok
test_page_photos_ok (troggle.core.TESTS.tests.PageTests.test_page_photos_ok) ... ok
test_page_site_media_css (troggle.core.TESTS.tests.PageTests.test_page_site_media_css) ... ok
test_page_site_media_ok (troggle.core.TESTS.tests.PageTests.test_page_site_media_ok) ... ok
test_page_slash_empty (troggle.core.TESTS.tests.PageTests.test_page_slash_empty) ... ok
test_page_ss (troggle.core.TESTS.tests.PageTests.test_page_ss) ... ok
test_page_survey_scans_dir (troggle.core.TESTS.tests.PageTests.test_page_survey_scans_dir) ... ok
test_page_survey_scans_empty (troggle.core.TESTS.tests.PageTests.test_page_survey_scans_empty) ... ok
test_stations (troggle.core.TESTS.tests.PageTests.test_stations) ... ok
test_survexdebug (troggle.core.TESTS.tests.PageTests.test_survexdebug) ... ok
test_surveximport (troggle.core.TESTS.tests.PageTests.test_surveximport) ... ok
test_therionissues (troggle.core.TESTS.tests.PageTests.test_therionissues) ... ok
test_allscans_view (troggle.core.TESTS.tests_copilot.TestSurveyScansView.test_allscans_view) ... ok
test_walletslistyear_view (troggle.core.TESTS.tests_copilot.TestSurveyScansView.test_walletslistyear_view) ... ok
test_import_Cave (troggle.core.TESTS.test_imports.SimpleTest.test_import_Cave) ... ok
test_import_TroggleModel (troggle.core.TESTS.test_imports.SimpleTest.test_import_TroggleModel) ... ok
test_import_core_views_caves (troggle.core.TESTS.test_imports.SimpleTest.test_import_core_views_caves) ... ok
test_import_imports (troggle.core.TESTS.test_imports.SimpleTest.test_import_imports) ... ok
test_import_parsers_QMs (troggle.core.TESTS.test_imports.SimpleTest.test_import_parsers_QMs) ... ok
test_import_parsers_logbooks (troggle.core.TESTS.test_imports.SimpleTest.test_import_parsers_logbooks) ... ok
test_import_parsers_mix (troggle.core.TESTS.test_imports.SimpleTest.test_import_parsers_mix) ... ok
test_import_parsers_people (troggle.core.TESTS.test_imports.SimpleTest.test_import_parsers_people) ... ok
test_import_parsers_survex (troggle.core.TESTS.test_imports.SimpleTest.test_import_parsers_survex) ... ok
test_import_parsers_surveys (troggle.core.TESTS.test_imports.SimpleTest.test_import_parsers_surveys) ... ok
test_import_urls (troggle.core.TESTS.test_imports.SimpleTest.test_import_urls) ... ok
test_import_views_uploads (troggle.core.TESTS.test_imports.SimpleTest.test_import_views_uploads) ... ok
test_import_views_walletedit (troggle.core.TESTS.test_imports.SimpleTest.test_import_views_walletedit) ... ok
test_test_setting (troggle.core.TESTS.test_imports.SimpleTest.test_test_setting) ... ok
======================================================================
ERROR: test_fix_cave_url115 (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_cave_url115)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_caves.py", line 140, in test_fix_cave_url115
response = self.client.get("/1623/115.url") # yes this is intentional, see the inserted data above & fixture
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1049, in get
response = super().get(path, data=data, secure=secure, headers=headers, **extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 465, in get
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/caves.py", line 353, in cavepage
return rendercave(request, cave, cave.slug())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/caves.py", line 301, in rendercave
"year": current_expo()
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
ERROR: test_fix_cave_url284 (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_cave_url284)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_caves.py", line 148, in test_fix_cave_url284
response = self.client.get("/1623/284/284.html")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1049, in get
response = super().get(path, data=data, secure=secure, headers=headers, **extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 465, in get
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/caves.py", line 353, in cavepage
return rendercave(request, cave, cave.slug())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/caves.py", line 301, in rendercave
"year": current_expo()
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
ERROR: test_fix_caves284 (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_caves284)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_caves.py", line 190, in test_fix_caves284
response = self.client.get("/caves")
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1049, in get
response = super().get(path, data=data, secure=secure, headers=headers, **extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 465, in get
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/caves.py", line 156, in caveindex
"cavepage": True, "year": current_expo()},
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
ERROR: test_fix_expedition (troggle.core.TESTS.test_caves.FixturePageTests.test_fix_expedition)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_caves.py", line 103, in test_fix_expedition
response = self.client.get("/expedition/2019")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1049, in get
response = super().get(path, data=data, secure=secure, headers=headers, **extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 465, in get
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/logbooks.py", line 69, in expedition
current = current_expo() # creates new expo after 31st Dec.
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
ERROR: test_photo_folder_create (troggle.core.TESTS.test_logins.PostTests.test_photo_folder_create)
Create folder for new user
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_logins.py", line 259, in test_photo_folder_create
response = self.client.post("/photoupload/", data={"photographer": "GussieFinkNottle"})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1070, in post
response = super().post(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 490, in post
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/auth.py", line 25, in __call__
return self.f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/uploads.py", line 611, in photoupload
year = current_expo()
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
ERROR: test_photo_upload (troggle.core.TESTS.test_logins.PostTests.test_photo_upload)
Expect photo upload to work on any file (contrary to msg on screen)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_logins.py", line 189, in test_photo_upload
response = self.client.post(
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1070, in post
response = super().post(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 490, in post
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/auth.py", line 25, in __call__
return self.f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/uploads.py", line 611, in photoupload
year = current_expo()
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
ERROR: test_photo_upload_rename (troggle.core.TESTS.test_logins.PostTests.test_photo_upload_rename)
Expect photo upload to work on any file (contrary to msg on screen)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_logins.py", line 228, in test_photo_upload_rename
response = self.client.post(
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1070, in post
response = super().post(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 490, in post
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/auth.py", line 25, in __call__
return self.f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/uploads.py", line 611, in photoupload
year = current_expo()
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
ERROR: test_lbe_new (troggle.core.TESTS.test_parsers.ImportTest.test_lbe_new)
This page requires the user to be logged in first, hence the extra shenanigans
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_parsers.py", line 141, in test_lbe_new
response = self.client.get(f"/logbookedit/")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1049, in get
response = super().get(path, data=data, secure=secure, headers=headers, **extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 465, in get
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/auth.py", line 25, in __call__
return self.f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/uploads.py", line 192, in logbookedit
year = current_expo()
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
ERROR: test_survexfiles (troggle.core.TESTS.test_parsers.ImportTest.test_survexfiles)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_parsers.py", line 195, in test_survexfiles
response = self.client.get("/survexfile/caves/")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1049, in get
response = super().get(path, data=data, secure=secure, headers=headers, **extra)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 465, in get
return self.generic(
^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 617, in generic
return self.request(**r)
^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 1013, in request
self.check_exception(response)
File "/home/philip/p12d5/lib/python3.12/site-packages/django/test/client.py", line 743, in check_exception
raise exc_value
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/troggle/core/views/survex.py", line 655, in survexcaveslist
"year": current_expo(),
^^^^^^^^^^^^^^
File "/home/philip/troggle/core/utils.py", line 126, in current_expo
make_new_expo(str(y))
File "/home/philip/troggle/core/utils.py", line 96, in make_new_expo
u = User.objects.get(username='expo')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/philip/p12d5/lib/python3.12/site-packages/django/db/models/query.py", line 649, in get
raise self.model.DoesNotExist(
django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
======================================================================
FAIL: test_loser_survex_status (troggle.core.TESTS.test_imports.SubprocessTest.test_loser_survex_status)
Expects no failures of survex files
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_imports.py", line 261, in test_loser_survex_status
self.assertTrue(sp.returncode == 0, f"{cwd} - survex is unhappy")
AssertionError: False is not true : /home/philip/loser - survex is unhappy
======================================================================
FAIL: test_repos_git_status (troggle.core.TESTS.test_imports.SubprocessTest.test_repos_git_status)
Expects clean git repos with no added files and no merge failures
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/philip/troggle/core/TESTS/test_imports.py", line 233, in test_repos_git_status
self.assertIsNotNone(phmatch, msg)
AssertionError: unexpectedly None : /home/philip/troggle - Failed to find expected git output: "nothing to commit, working tree clean"
----------------------------------------------------------------------
Ran 109 tests in 13.383s
FAILED (failures=2, errors=9)
Destroying test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')...

View File

@@ -1,48 +1,217 @@
Troggle is an application for caving expedition data management, originally created for use on Cambridge University Caving Club (CUCC)expeditions and licensed under the GNU Lesser General Public License.
Updated 2 May 2023
Troggle has been forked into two projects. The original one is maintained by Aron Curtis and is used for Erebus caves. The CUCC variant uses files as the definitive data, not the database and lives at expo.survex.com/troggle.
Troggle is an application for caving expedition data management,
originally created for use on Cambridge University Caving Club (CUCC)expeditions
and licensed under the GNU Lesser General Public License.
Troggle has been forked into two projects. The original one is maintained by Aaron Curtis
and was used for Erebus caves in Antarctica.
The CUCC variant uses files as the definitive data, not the database, and lives at http://expo.survex.com/repositories/troggle/.git/
The versions have diverged markedly, not just in the software but also in the implicit convnetions of how the directory structures of the survex files, the drawings and
the scans are arranged.
For the server setup, see /_deploy/debian/wookey-exposerver-recipe.txt
and see http://expo.survex.com/handbook/troggle/serverconfig.html
Much material which was in this file has been moved to
http://expo.survex.com/handbook/troggle/serverconfig.html
See copyright notices in
http://expo.survex.com/handbook/computing/contribute.html
and for context see
http://expo.survex.com/handbook/computing/onlinesystems.html
Troggle setup
==========
=============
0. read the very extensive online documentation and stop reading this README...
well, come back to this README after you have read the HTML pages. Not everything has been transferred.
Python, Django, and Database setup
http://expo.survex.com/handbook/troggle/troglaptop.html
http://expo.survex.com/handbook/troggle/serverconfig.html
http://expo.survex.com/handbook/troggle/trogdangoup.html
and at troggle/debian/serversetup
1. set up the ssh key-exchange with the git server so you can clone troggle
http://expo.survex.com/handbook/computing/keyexchange.html
Setting up directories
----------------------
see http://expo.survex.com/handbook/troggle/troglaptop.html and
http://expo.survex.com/handbook/troggle/serverconfig.html
Next, you need to fill in your local settings. Copy _deploy/WSL/localsettingsWSL.py
to a new file called localsettings.py and edit it and settings.py to match
your machine's file locations.
Follow the instructions contained in the file to fill out your settings.
{ in _deploy/old/ we have these which are all very out of date:
localsettings-expo-live.py is the python2.7 settings for the server.
localsettingsubuntu.py
localsettingsdocker.py
localsettingswindows.py
localsettingspotatohut.py
}
Python3, Django, and Database setup
-----------------------------------
Troggle requires Django 1.4 or greater, and any version of Python that works with it.
Install Django with the following command:
We are now using Django 3.2 and will move to 4.2 in 2024
We are installing with python 3.11 (the server is running 3.9)
apt-get install python-django (on debian/ubuntu)
Install Django using pip, not with apt, on your test system in a venv.
Conventionally on our main master expo server we install everything that we can as debian packages, not using pip.
If you want to use MySQL or Postgresql, download and install them. However, you can also use Django with Sqlite3, which is included in Python and thus requires no extra installation.
[installation instructions removed - now in http://expo.survex.com/handbook/troggle/troglaptop.html ]
[venv description removed - read it in http://expo.survex.com/handbook/troggle/troglaptop.html ]
READ the os-trog.sh script !
READ the venv-trog.sh script !
Automatic Provisioning and Configuration
----------------------------------------
We don't do this - yet.
Troggle itself
-------------
Choose a directory where you will keep troggle, and git clone Troggle into it using the following command:
The most appropriate configuration tools today (2021) appear to be Bolt or Ansible
https://puppet.com/docs/bolt/latest/bolt.html (declarative, local)
https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html (procedural, remote)
https://puppet.com/blog/automating-from-zero-to-something/
git clone git://expo.survex.com/troggle
or more reliably
git clone ssh://expo@expo.survex.com/home/expo/troggle
We don't need anything for the deploy server itself, but we could do with something for setting
up test servers quickly to help get newbie developers up to speed faster. But learning a new tool
creates a barrier in itself. This is one reason most of us don't use Docker.
CSS and media files
-------------------
We are not using the STATICFILES capability.
We are serving css files from troggle/media/.. (see urls.py)
Plain CSS pages
---------------
When running the test server
manage.py runserver 0.0.0.0:8000
and without Apache running, we are serving CSS using using this Django 'view':
view_surveys.cssfilessingle
i.e.
cssfilessingle() in core/view_surveys.py
Setting up survex
-----------------
You need to have survex installed as the command line tools 'cavern' is
used as part of the survex import process.
$ sudo apt install survex
Setting up tables and importing survey data
-------------------------------------------
Run
$ sudo python databaseReset.py
from the troggle directory will give you instructions.
[ NB Adding a new year/expedition requires adding a column to the
folk/folk.csv table - a year doesn't exist until that is done.]
If you want to work on the source code and be able to commit, your account will need to be added to the troggle project members list. Contact wookey at wookware dot org to get this set up.
MariaDB database
----------------
Start it up with
$ sudo mysql -u -p
when it will prompt you to type in the password. Get this by reading the settings.py file in use on the server.
then
> CREATE DATABASE troggle;
> use troggle;
> exit;
Next, you need to fill in your local settings. Copy either localsettingsubuntu.py or localsettingsserver.py to a new file called localsettings.py. Follow the instructions contained in the file to fill out your settings.
Note the semicolons.
You can check the status of the db service:
$ sudo systemctl status mysql
You can start and stop the db service with
$ sudo systemctl restart mysql.service
$ sudo systemctl stop mysql.service
$ sudo systemctl start mysql.service
While logged in at a terminal session as expo on expo.survex.,com
$ mysql -h localhost -u expo -p<password>
will get you the MariasDb command prompt: https://www.hostwinds.com/guide/how-to-use-mysql-mariadb-from-command-line/
then (Note the SEMICOLONS !):
>drop database troggle;
>create database troggle;
>quit
Somewhere I have notes for the GRANT PRIVS type runes...
Ah yes:
CREATE DATABASE troggle;
GRANT ALL PRIVILEGES ON troggle.* TO 'expo'@'localhost' IDENTIFIED BY 'somepassword'; FLUSH PRIVILEGES; (at mysql root prompt)
(explained on https://chartio.com/resources/tutorials/how-to-grant-all-privileges-on-a-database-in-mysql/)
(but you need to create the database too)
The GRANT ALL PRIVILEGES bit requires you to logon in to MariaDB as root. sudo doesn't cut it.
these permissions are set in a different 'info' database which usually is untouched even if database troggle gets creamed.
The 'somepassword' is specified int he localsettings.py file.
Setting up tables and importing legacy data
------------------------------------------
Run "python databaseReset.py reset" from the troggle directory.
PERMISSIONS
https://linuxize.com/post/usermod-command-in-linux/
Once troggle is running, you can also log in and then go to "Import / export" data under "admin" on the menu.
THIS MAY BE OUT OF DATE - from 2022 we are running Apache as user 'expo' not 'www-data'
Adding a new year/expedition requires adding a column to the
folk/folk.csv table - a year doesn't exist until that is done.
so that the online editing system for SVX files works.
The same goes for /expoweb/ files, so that "edit this page" works and the New Cave
and New Entrance forms work.
sudo usermod -a expo expocvs
the expocvs group is used for git
all the users should be in this group
Running a Troggle server
------------------------
For high volume use, Troggle should be run using a web server like apache. However, a quick way to get started is to use the development server built into Django.
Running a Troggle server with Apache
------------------------------------
Troggle also needs these aliases to be configured. These are set in
/home/expo/config/apache/expo.conf
on the expo server.
To do this, run "python manage.py runserver" from the troggle directory.
At least these need setting:
DocumentRoot /home/expo/expoweb
WSGIScriptAlias / /home/expo/troggle/wsgi.py
<Directory /home/expo/troggle>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
the instructions for apache Alias commands are in comments at the end of
the urls.py file.
Unlike the django "manage.py runserver" method, apache requires a restart before it will use
any changed files:
sudo service apache2 restart
Olly's comments 20 July 2020:
olly: looking at /lib/systemd/system/apache2.service suggests so
olly: ExecStart=/usr/sbin/apachectl start
olly: ExecStop=/usr/sbin/apachectl stop
olly: ExecReload=/usr/sbin/apachectl graceful
Additions
---------
The python code has been manually cleaned using the 'black' and 'ruff' lint tools,
and the 'deptry' dependency checker. This needs doing every year or so.
See dependencies-check-deptry.txt
See troggle/pyproject.toml for configurations
Experimental additions
----------------------
These are untried tools which may help us document how troggle works in future.
pip install pygraphviz
pip install pyparsing pydot # installs fine
django extension graph_models # https://django-extensions.readthedocs.io/en/latest/graph_models.html

27
README/index.html Normal file
View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Troggle - Coding Documentation</title>
<link rel="stylesheet" type="text/css" href="..media/css/main2.css" />
</head>
<body>
<h1>Troggle Code - README</h1>
<h2>Contents of README.txt file</h2>
<iframe name="erriframe" width="70%" height="500"
src="../README.txt" frameborder="1" ></iframe>
<h2>Troggle documentation in the Expo Handbook</h2>
<ul>
<li><a href="http://expo.survex.com/handbook/troggle/trogintro.html">Intro</a>
<li><a href="http://expo.survex.com/handbook/troggle/trogindex.html">Troggle manual INDEX</a>
<li><a href="http://expo.survex.com/handbook/troggle/trogarch.html">Troggle data model</a>
<li><a href="http://expo.survex.com/handbook/troggle/trogimport.html">Troggle importing data</a>
<li><a href="http://expo.survex.com/handbook/troggle/trogdesign.html">Troggle design decisions</a>
<li><a href="http://expo.survex.com/handbook/troggle/trogdesignx.html">Troggle future architectures</a>
<li><a href="http://expo.survex.com/handbook/troggle/trogsimpler.html">a kinder simpler Troggle?</a>
</ul>
<hr />
</body></html>

BIN
README/troggle2020.docx Normal file

Binary file not shown.

BIN
README/troggle2020.odt Normal file

Binary file not shown.

BIN
README/troggle2020.pdf Normal file

Binary file not shown.

344
_cave_caves284.html Normal file
View File

@@ -0,0 +1,344 @@
<!DOCTYPE html>
<!-- cavebase.html - this text visible because this template has been included -->
<html lang="en">
<head>
<script>document.interestCohort = null;</script> <!-- Turn off Google FLoC -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
</title>
<link rel="stylesheet" type="text/css" href="/css/main2.css" />
</head>
<body>
<!-- the year now as used in header text -->
<br />
<style>
.toolbarlinks
{
padding:5px;
background-color:#9ff;
text-align:center;
font-weight:bold;
}
.toolbarlinkslocal
{
padding:5px;
background-color:#f9f;
text-align:center;
font-weight:bold;
}
</style>
<div class="toolbarlinkslocal">
<a href="/logbookedit/">Logbook Entry</a> |
<a id="cavesLink" href="/caves_recent">Caves</a> |
<a id="qmsLink" href="/cave/qms/1623-290">QMs</a> |
<a href="/survexfile">Survex</a> |
<a href="/survexfile/caves">All Survex</a> |
<a href="/survey_scans">Scans</a> |
<a href="/walletedit">Upload Scans</a> |
<a href="/dwgfiles">Drawings</a> |
<a href="/dwgupload">Upload Drawings</a> |
<a href="/photoupload">Upload Photos</a> |
<a href="/gpxupload">Upload GPX</a> |
<br>
<a href="/dataissues">Data Issues</a> |
<a id="entsLink" href="/entrances">Entrances</a> |
<a id="entsLink" href="/stations">Stations</a> |
<a id="folklink" href="/folk">expoers</a> |
<a id="caversLink" href="/people">survey lengths</a> |
<a href="/stats">statistics</a> |
<a href="/wallets/year/2025">Wallets(2025)</a> |
<a href="/logreport/2025">Logbook(2025)</a> |
<a href="/expedition/2025">Expo(2025)</a> |
<a href="/controlpanel">Control panel</a>
</div>
<p>
<h1>Cave Index</h1>
<h3>Notable caves</h3>
<ul>
<li> 1623 <a href="/None">
290 <em></em></a>
<li> 1623 <a href="/None">
264 <em></em></a>
<li> 1623 <a href="/None">
161 <em></em></a>
<li> 1623 <a href="/None">
204 <em></em></a>
</ul>
Red star <span style="color: red">&#10033;</span> against a name indicates that no survex file is explicitly associated with the cave<br />
Blue star <span style="color: blue">&#10033;</span> against a name indicates that no survex file is explicitly associated with the cave but it is marked as 'fully explored'<br />
Blue triangle <span style="color: #43C6DB">&#x25BC;</span> against a name indicates that the cave is 'pending' creation properly.<br />
Orange triangle <span style="color: orange">&#x25B2;</span> against a name indicates that the cave has no Entrance (and is not 'pending').<br />
Black triangle <span style="color: black">&#x25B2;</span> against a name indicates that the cave has an Entrance, but no entrances have valid located survey stations.<br />
Red triangle <span style="color: red">&#x25BC;</span> against a name indicates that the cave has unticked QMs<br />
<span style="color:mediumvioletred">Cavename in this colour</span> means that the cave is undescended/unexplored.
<p>See <em><a href="/caves_undropped">Undropped Caves</a></em> for all unexplored caves<br />
See <em> <a href="/enttags">Lost Caves</a></em> for caves we have mislaid.<br />
See <em> <a href="/caves_recent">Recent Caves</a></em> for a shorter list of recent caves.
<p style="text-align:right">
<a href="/newcave/">New Cave</a><br>
<a href="/noinfo/cave-number-index">Cave Number Index - kept updated</a>
</p>
<h3>This year's caves</h3>
<div style="column-count: 3;">
<table class="searchable">
</table>
</div>
<h3>1623</h3>
<div style="column-count: 3;">
<table class="searchable">
<a href="/1623/115.url">
<span style="color:mediumvioletred" title="The cave is marked as unexplored/undescended">
115 <em>Schnellzugh&ouml;hle</em></a>
(40m)
<span title="the cave has no Entrance (and is not 'pending')" style="color: orange">&#x25B2;</span>
</span>
<br />
<a href="/None">
<span style="color:mediumvioletred" title="The cave is marked as unexplored/undescended">
161 <em></em></a>
<span title="the cave is 'pending' creation properly" style="color: #43C6DB">&#x25BC;</span>
<span title="no survex file is explicitly associated with the cave" style="color: red">&#10033;</span>
</span>
<br />
<a href="/None">
<span style="color:mediumvioletred" title="The cave is marked as unexplored/undescended">
204 <em></em></a>
<span title="the cave is 'pending' creation properly" style="color: #43C6DB">&#x25BC;</span>
<span title="no survex file is explicitly associated with the cave" style="color: red">&#10033;</span>
</span>
<br />
<a href="/None">
<span style="color:mediumvioletred" title="The cave is marked as unexplored/undescended">
264 <em></em></a>
<span title="the cave is 'pending' creation properly" style="color: #43C6DB">&#x25BC;</span>
<span title="no survex file is explicitly associated with the cave" style="color: red">&#10033;</span>
</span>
<br />
<a href="/1623/284/284.html">
<span style="color:mediumvioletred" title="The cave is marked as unexplored/undescended">
284 <em>Seetrichter (Lake bottom)</em></a>
<span title="the cave has no Entrance (and is not 'pending')" style="color: orange">&#x25B2;</span>
<span title="no survex file is explicitly associated with the cave" style="color: red">&#10033;</span>
</span>
<br />
<a href="/None">
<span style="color:mediumvioletred" title="The cave is marked as unexplored/undescended">
290 <em></em></a>
<span title="the cave is 'pending' creation properly" style="color: #43C6DB">&#x25BC;</span>
<span title="no survex file is explicitly associated with the cave" style="color: red">&#10033;</span>
</span>
<br />
</table>
</div>
<p style="text-align:right">
<a href="/newcave/">New Cave</a><br>
<a href="/noinfo/cave-number-index">Cave Number Index - kept updated</a>
</p>
<h3>1626</h3>
<div style="column-count: 3;">
<table class="searchable">
</table>
</div>
<p style="text-align:right">
<a href="/newcave/">New Cave</a><br>
<a href="/noinfo/cave-number-index">Cave Number Index - kept updated</a>
</p>
<h3>1627</h3>
<div style="column-count: 3;">
<table class="searchable">
</table>
</div>
<p style="text-align:right">
<a href="/newcave/">New Cave</a><br>
<a href="/noinfo/cave-number-index">Cave Number Index - kept updated</a>
</p>
<h3>1624</h3>
<div style="column-count: 3;">
<table class="searchable">
</table>
</div>
<p style="text-align:right">
<a href="/newcave/">New Cave</a><br>
<a href="/noinfo/cave-number-index">Cave Number Index - kept updated</a>
</p>
<div id="menu">
<ul id="menulinks">
<li><a href="/index.htm">Home</a></li>
<li><a href="/handbook/index.htm">Handbook</a>
</li>
<li><a href="/handbook/computing/onlinesystems.html">Online systems</a></li>
<li><a href="/handbook/logbooks.html#form">Make Logbook Entry</a></li>
<li><a href="/caves_recent">Caves</a>
</li>
<li><a href="/infodx.htm">Site index</a></li>
<li><a href="/pubs.htm">Reports</a></li>
<ul><li><a href="/years/2025">2025</a></li></ul>
<li><a href="https://expo.survex.com/kanboard/board/2">Kanboard</a></li>
<li><a href="/handbook/troggle/training/trogbegin.html">Troggle</a></li>
<li><form name=P method=get
action="https://expo.survex.com/search"
target="_top">
<input id="omega-autofocus" type=search name=P size=8 autofocus>
<input type=submit value="Search"></form></li>
<li> <b style="color:red">RUNNING ON LOCALSERVER</b> <br>slug:<br>newslug:<br>url:
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,179 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
# MARIADB_SERVER_PASSWORD =
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.eu" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "EXPO SERVER AUTOMATIC <django-test@klebos.eu>"
# default values, real secrets will be imported from credentials.py
#SQLITEFILE = "/home/philip/expo/troggle.sqlite" # can be ':memory:'
SQLITEFILE = str(Path(__file__).parent.parent / "troggle.sqlite") # can be ':memory:'
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote server. Tests are then less accurate.
# SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = "8000" # not needed as it is the default
ADMINS = (
('Philip', 'philip.sargent@klebos.eu'), # only on dev
)
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent # folder above troggle, expoweb, drawings, loser
LIBDIR = REPOS_ROOT_PATH / "lib" / PV
sys.path.append(str(REPOS_ROOT_PATH))
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / "templates"
MEDIA_ROOT = TROGGLE_PATH / "media"
JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility
EXPOFILES = REPOS_ROOT_PATH / "expofiles" # sometimes on a different filesystem
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos" # sometimes on a different filesystem
PHOTOS_YEAR = "2025"
KMZ_ICONS_PATH = REPOS_ROOT_PATH / "troggle" / "kmz_icons" # Google Earth export in /caves/
# URL that handles the media served from MEDIA_ROOT.
# Note that MEDIA_URL and PHOTOS_URL are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
URL_ROOT = "/"
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
DBSQLITE = {
"default": {
"ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"NAME": SQLITEFILE,
# 'NAME' : ':memory:',
"USER": "expo", # Not used with sqlite3.
"PASSWORD": "sekrit", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
"default": {
"ENGINE": "django.db.backends.mysql", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4",
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
"PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_PATH],
"OPTIONS": {
"debug": "DEBUG",
"context_processors": [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
"django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions
"core.context.troggle_context", # in core/context.py - only used in expedition.html
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media", # includes a variable MEDIA_URL
"django.template.context_processors.static", # includes a variable STATIC_URL used by admin pages
"django.template.context_processors.tz",
"django.template.context_processors.request", # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
"django.contrib.messages.context_processors.messages",
],
"loaders": [
"django.template.loaders.filesystem.Loader", # default lcation is troggle/templates/
"django.template.loaders.app_directories.Loader", # needed for admin 'app'
],
},
},
]
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,179 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
# MARIADB_SERVER_PASSWORD =
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.eu" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "EXPO SERVER AUTOMATIC <django-test@klebos.eu>"
# default values, real secrets will be imported from credentials.py
#SQLITEFILE = "/home/philip/expo/troggle.sqlite" # can be ':memory:'
SQLITEFILE = str(Path(__file__).parent.parent / "troggle.sqlite") # can be ':memory:'
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote server. Tests are then less accurate.
# SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = "8000" # not needed as it is the default
ADMINS = (
('Philip', 'philip.sargent@klebos.eu'), # only on dev
)
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent # folder above troggle, expoweb, drawings, loser
LIBDIR = REPOS_ROOT_PATH / "lib" / PV
sys.path.append(str(REPOS_ROOT_PATH))
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / "templates"
MEDIA_ROOT = TROGGLE_PATH / "media"
JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility
EXPOFILES = REPOS_ROOT_PATH / "expofiles" # sometimes on a different filesystem
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos" # sometimes on a different filesystem
PHOTOS_YEAR = "2025"
KMZ_ICONS_PATH = REPOS_ROOT_PATH / "troggle" / "kmz_icons" # Google Earth export in /caves/
# URL that handles the media served from MEDIA_ROOT.
# Note that MEDIA_URL and PHOTOS_URL are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
URL_ROOT = "/"
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
DBSQLITE = {
"default": {
"ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"NAME": SQLITEFILE,
# 'NAME' : ':memory:',
"USER": "expo", # Not used with sqlite3.
"PASSWORD": "sekrit", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
"default": {
"ENGINE": "django.db.backends.mysql", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4",
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
"PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_PATH],
"OPTIONS": {
"debug": "DEBUG",
"context_processors": [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
"django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions
"core.context.troggle_context", # in core/context.py - only used in expedition.html
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media", # includes a variable MEDIA_URL
"django.template.context_processors.static", # includes a variable STATIC_URL used by admin pages
"django.template.context_processors.tz",
"django.template.context_processors.request", # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
"django.contrib.messages.context_processors.messages",
],
"loaders": [
"django.template.loaders.filesystem.Loader", # default lcation is troggle/templates/
"django.template.loaders.app_directories.Loader", # needed for admin 'app'
],
},
},
]
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Run this in a terminal : 'bash os-survey.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
echo '###'
echo '### NOW INSTALLING tunnel and therion, go and have a cup of tea. Or a 3-course meal.'
echo '###'
sudo apt install tunnelx therion -y
sudo apt install survex-aven -y
sudo apt install gpsprune qgis -y
cd ~/expo
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

View File

@@ -0,0 +1,92 @@
#!/bin/bash
# Run this in a terminal in the troggle directory: 'bash os-trog.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
# sudo apt install python-is-python3 -y
python --version : ensure python is an alias for python3 not python2.7
ssh -V
sudo apt update -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
# Already in Ubuntu 24.04 on WSL:
# sudo apt install git -y
# sudo apt install wget gpg
# sudo apt install sftp -y
# sudo apt install openssh-client -y
# sudo apt install rsync
# Now using uv not pip:
# sudo apt install python3-pip -y
sudo apt install sqlite3 -y
sudo apt install gedit -y
sudo apt install tig gitg meld -y
# python formatting https://docs.astral.sh/ruff/
sudo snap install ruff
# # do not actually use this any more
# sudo useradd expo
# sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
# as debian does not install everything that ubuntu does, you need:
sudo apt install python3-venv -y
sudo apt install python3-dev -y
# sudo apt install python3-distutils -y
# install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
sudo apt install mariadb-server -y
sudo apt install libmariadb-dev -y
# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools
# sudo service mysql start
# We don't install the later version or the earlier versions of python - for dev and "sever mimic" environments
# we leave that to uv to install now.
# In Dec.2024, the server is running 3.11 but dev work will be using 3.13
# The setup of the virtual environment is done by troggle/_deploy/wsl/venv-trog.sh
# install VS code - but ONLY on a native ubuntu install, NOT in WSL
# sudo apt install software-properties-common apt-transport-https
# wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
# sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
# sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
# sudo apt update
# sudo apt install code
mkdir ~/expo
cd ~/expo
echo '###'
echo '### Now YOU have to configure the git settings for YOURSELF (not "expo")'
echo '### because you can't clone the repos without a key
git config --global user.email "philip.sargent@gmail.com"
git config --global user.name "Philip Sargent"
git config --global pull.rebase true
#Change this to clone using https?? at least for troggle?
git clone ssh://expo@expo.survex.com/home/expo/troggle
git clone ssh://expo@expo.survex.com/home/expo/loser
git clone ssh://expo@expo.survex.com/home/expo/expoweb
git clone ssh://expo@expo.survex.com/home/expo/drawings
mkdir expofiles
rsync -azv --delete-after --prune-empty-dirs expo@expo.survex.com:expofiles/surveyscans/ expofiles/surveyscans
rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/2018/PhilipSargent/ expofiles/photos/2018/PhilipSargent
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

67
_deploy/SnowWhite/pre-push.sh Executable file
View File

@@ -0,0 +1,67 @@
#! /bin/bash
# create and sanitise files for pushing to repo
# catatrophically forgot to sanitize localsettingsWSL.py - oops.
#Make sure you have the WSL permissions system working, or you will push unsanitized files as this will fail
# Philip Sargent 2022/04/12
HOSTNAME=`hostname`
echo "** This copies file to _deploy/${HOSTNAME}/ !"
cd ..
cd troggle
echo `pwd`
echo deprecations.
PYTHON="uv run"
source .venv/bin/activate
python3 -Wall manage.py check -v 3 2>deprecations.txt >/dev/null
deactivate
echo diffsettings.
rm diffsettings.txt
if test -f "diffsettings.txt"; then
echo "diffsettings.txt not deleted. You have a serious permissions problem. Aborting.."
exit
fi
$PYTHON manage.py diffsettings | grep "###" > diffsettings.txt
echo inspectdb.
# this next line requires database setting to be troggle.sqlite:
$PYTHON manage.py inspectdb > troggle-inspectdb.py
#egrep -in "unable|error" troggle-inspectdb.py
echo remove passwords.
cp localsettings.py localsettings-${HOSTNAME}.py
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EXPOUSERPASS = \"nnn:gggggg\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EXPOUSERPASS = \"gggggg:nnn\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EMAIL_HOST_PASSWORD = \"real-email-password--imported-from-localsettings.py\""
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' diffsettings.txt
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: SECRET_KEY = \"real-SECRET_KEY--imported-from-localsettings.py\""
mkdir -p _deploy/${HOSTNAME}
mv _deploy/${HOSTNAME}/localsettings-${HOSTNAME}.py _deploy/${HOSTNAME}/localsettings-${HOSTNAME}.py.bak
mv localsettings-${HOSTNAME}.py _deploy/${HOSTNAME}
cp uv.lock _deploy/${HOSTNAME}
cp *.sh _deploy/${HOSTNAME}
ls -tlr *.toml
uv tree
#
# Do these before final testing, *not* just before pushing:
# in ./pre-run.sh
# $PYTHON reset-django.py
# $PYTHON manage.py makemigrations
# $PYTHON manage.py test
# $PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -i "unable|error" troggle-inspectdb.py

36
_deploy/SnowWhite/pre-run.sh Executable file
View File

@@ -0,0 +1,36 @@
#! /bin/bash
# Do these before final testing, *not* just before pushing:
# Changed to use uv not pip, requires manage.py to have uv structured uv comment in it.
PYTHON="uv run"
echo "** Run inspectdb:"
$PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -in "unable|error" troggle-inspectdb.py
echo ""
# count non-blank lines of python and template HTML code
# includes all variants of settings.py files
# fix this as core/utils.py has 28,000 lines of numbers.
find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt
find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | grep -v "/migrations/" |grep -v "troggle-inspectdb.py"| awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt
echo "** Run reset-django.py - which deletes the database"
# This deletes the database so must run after generating troggle-inspectdb.py
$PYTHON reset-django.py
echo "** After cleanup deletion, remake all migrations."
$PYTHON manage.py makemigrations >/dev/null
$PYTHON manage.py migrate
echo "** Now running self check"
$PYTHON manage.py check -v 3 --deploy 2>security-warnings.txt >/dev/null
$PYTHON manage.py check -v 3 --deploy
echo "** Now running test suite"
# $PYTHON manage.py test -v 1
echo ""
echo `tail -1 lines-of-python.txt` non-comment lines of python.
echo `tail -1 lines-of-templates.txt` non-comment lines of HTML templates.
echo '** If you have an error running manage.py, maybe you are not in an activated venv ? or your manage.py is not managed by uv properly ?'

235
_deploy/SnowWhite/uv.lock generated Normal file
View File

@@ -0,0 +1,235 @@
version = 1
requires-python = ">=3.13"
[[package]]
name = "asgiref"
version = "3.9.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/90/61/0aa957eec22ff70b830b22ff91f825e70e1ef732c06666a805730f28b36b/asgiref-3.9.1.tar.gz", hash = "sha256:a5ab6582236218e5ef1648f242fd9f10626cfd4de8dc377db215d5d5098e3142", size = 36870 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/7c/3c/0464dcada90d5da0e71018c04a140ad6349558afb30b3051b4264cc5b965/asgiref-3.9.1-py3-none-any.whl", hash = "sha256:f3bba7092a48005b5f5bacd747d36ee4a5a61f4a269a6df590b43144355ebd2c", size = 23790 },
]
[[package]]
name = "beautifulsoup4"
version = "4.13.5"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "soupsieve" },
{ name = "typing-extensions" },
]
sdist = { url = "https://files.pythonhosted.org/packages/85/2e/3e5079847e653b1f6dc647aa24549d68c6addb4c595cc0d902d1b19308ad/beautifulsoup4-4.13.5.tar.gz", hash = "sha256:5e70131382930e7c3de33450a2f54a63d5e4b19386eab43a5b34d594268f3695", size = 622954 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/04/eb/f4151e0c7377a6e08a38108609ba5cede57986802757848688aeedd1b9e8/beautifulsoup4-4.13.5-py3-none-any.whl", hash = "sha256:642085eaa22233aceadff9c69651bc51e8bf3f874fb6d7104ece2beb24b47c4a", size = 105113 },
]
[[package]]
name = "coverage"
version = "7.10.5"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/61/83/153f54356c7c200013a752ce1ed5448573dca546ce125801afca9e1ac1a4/coverage-7.10.5.tar.gz", hash = "sha256:f2e57716a78bc3ae80b2207be0709a3b2b63b9f2dcf9740ee6ac03588a2015b6", size = 821662 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/9f/08/4166ecfb60ba011444f38a5a6107814b80c34c717bc7a23be0d22e92ca09/coverage-7.10.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ef3b83594d933020f54cf65ea1f4405d1f4e41a009c46df629dd964fcb6e907c", size = 217106 },
{ url = "https://files.pythonhosted.org/packages/25/d7/b71022408adbf040a680b8c64bf6ead3be37b553e5844f7465643979f7ca/coverage-7.10.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2b96bfdf7c0ea9faebce088a3ecb2382819da4fbc05c7b80040dbc428df6af44", size = 217353 },
{ url = "https://files.pythonhosted.org/packages/74/68/21e0d254dbf8972bb8dd95e3fe7038f4be037ff04ba47d6d1b12b37510ba/coverage-7.10.5-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:63df1fdaffa42d914d5c4d293e838937638bf75c794cf20bee12978fc8c4e3bc", size = 248350 },
{ url = "https://files.pythonhosted.org/packages/90/65/28752c3a896566ec93e0219fc4f47ff71bd2b745f51554c93e8dcb659796/coverage-7.10.5-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8002dc6a049aac0e81ecec97abfb08c01ef0c1fbf962d0c98da3950ace89b869", size = 250955 },
{ url = "https://files.pythonhosted.org/packages/a5/eb/ca6b7967f57f6fef31da8749ea20417790bb6723593c8cd98a987be20423/coverage-7.10.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:63d4bb2966d6f5f705a6b0c6784c8969c468dbc4bcf9d9ded8bff1c7e092451f", size = 252230 },
{ url = "https://files.pythonhosted.org/packages/bc/29/17a411b2a2a18f8b8c952aa01c00f9284a1fbc677c68a0003b772ea89104/coverage-7.10.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1f672efc0731a6846b157389b6e6d5d5e9e59d1d1a23a5c66a99fd58339914d5", size = 250387 },
{ url = "https://files.pythonhosted.org/packages/c7/89/97a9e271188c2fbb3db82235c33980bcbc733da7da6065afbaa1d685a169/coverage-7.10.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:3f39cef43d08049e8afc1fde4a5da8510fc6be843f8dea350ee46e2a26b2f54c", size = 248280 },
{ url = "https://files.pythonhosted.org/packages/d1/c6/0ad7d0137257553eb4706b4ad6180bec0a1b6a648b092c5bbda48d0e5b2c/coverage-7.10.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2968647e3ed5a6c019a419264386b013979ff1fb67dd11f5c9886c43d6a31fc2", size = 249894 },
{ url = "https://files.pythonhosted.org/packages/84/56/fb3aba936addb4c9e5ea14f5979393f1c2466b4c89d10591fd05f2d6b2aa/coverage-7.10.5-cp313-cp313-win32.whl", hash = "sha256:0d511dda38595b2b6934c2b730a1fd57a3635c6aa2a04cb74714cdfdd53846f4", size = 219536 },
{ url = "https://files.pythonhosted.org/packages/fc/54/baacb8f2f74431e3b175a9a2881feaa8feb6e2f187a0e7e3046f3c7742b2/coverage-7.10.5-cp313-cp313-win_amd64.whl", hash = "sha256:9a86281794a393513cf117177fd39c796b3f8e3759bb2764259a2abba5cce54b", size = 220330 },
{ url = "https://files.pythonhosted.org/packages/64/8a/82a3788f8e31dee51d350835b23d480548ea8621f3effd7c3ba3f7e5c006/coverage-7.10.5-cp313-cp313-win_arm64.whl", hash = "sha256:cebd8e906eb98bb09c10d1feed16096700b1198d482267f8bf0474e63a7b8d84", size = 218961 },
{ url = "https://files.pythonhosted.org/packages/d8/a1/590154e6eae07beee3b111cc1f907c30da6fc8ce0a83ef756c72f3c7c748/coverage-7.10.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0520dff502da5e09d0d20781df74d8189ab334a1e40d5bafe2efaa4158e2d9e7", size = 217819 },
{ url = "https://files.pythonhosted.org/packages/0d/ff/436ffa3cfc7741f0973c5c89405307fe39b78dcf201565b934e6616fc4ad/coverage-7.10.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:d9cd64aca68f503ed3f1f18c7c9174cbb797baba02ca8ab5112f9d1c0328cd4b", size = 218040 },
{ url = "https://files.pythonhosted.org/packages/a0/ca/5787fb3d7820e66273913affe8209c534ca11241eb34ee8c4fd2aaa9dd87/coverage-7.10.5-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:0913dd1613a33b13c4f84aa6e3f4198c1a21ee28ccb4f674985c1f22109f0aae", size = 259374 },
{ url = "https://files.pythonhosted.org/packages/b5/89/21af956843896adc2e64fc075eae3c1cadb97ee0a6960733e65e696f32dd/coverage-7.10.5-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1b7181c0feeb06ed8a02da02792f42f829a7b29990fef52eff257fef0885d760", size = 261551 },
{ url = "https://files.pythonhosted.org/packages/e1/96/390a69244ab837e0ac137989277879a084c786cf036c3c4a3b9637d43a89/coverage-7.10.5-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36d42b7396b605f774d4372dd9c49bed71cbabce4ae1ccd074d155709dd8f235", size = 263776 },
{ url = "https://files.pythonhosted.org/packages/00/32/cfd6ae1da0a521723349f3129b2455832fc27d3f8882c07e5b6fefdd0da2/coverage-7.10.5-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b4fdc777e05c4940b297bf47bf7eedd56a39a61dc23ba798e4b830d585486ca5", size = 261326 },
{ url = "https://files.pythonhosted.org/packages/4c/c4/bf8d459fb4ce2201e9243ce6c015936ad283a668774430a3755f467b39d1/coverage-7.10.5-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:42144e8e346de44a6f1dbd0a56575dd8ab8dfa7e9007da02ea5b1c30ab33a7db", size = 259090 },
{ url = "https://files.pythonhosted.org/packages/f4/5d/a234f7409896468e5539d42234016045e4015e857488b0b5b5f3f3fa5f2b/coverage-7.10.5-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:66c644cbd7aed8fe266d5917e2c9f65458a51cfe5eeff9c05f15b335f697066e", size = 260217 },
{ url = "https://files.pythonhosted.org/packages/f3/ad/87560f036099f46c2ddd235be6476dd5c1d6be6bb57569a9348d43eeecea/coverage-7.10.5-cp313-cp313t-win32.whl", hash = "sha256:2d1b73023854068c44b0c554578a4e1ef1b050ed07cf8b431549e624a29a66ee", size = 220194 },
{ url = "https://files.pythonhosted.org/packages/36/a8/04a482594fdd83dc677d4a6c7e2d62135fff5a1573059806b8383fad9071/coverage-7.10.5-cp313-cp313t-win_amd64.whl", hash = "sha256:54a1532c8a642d8cc0bd5a9a51f5a9dcc440294fd06e9dda55e743c5ec1a8f14", size = 221258 },
{ url = "https://files.pythonhosted.org/packages/eb/ad/7da28594ab66fe2bc720f1bc9b131e62e9b4c6e39f044d9a48d18429cc21/coverage-7.10.5-cp313-cp313t-win_arm64.whl", hash = "sha256:74d5b63fe3f5f5d372253a4ef92492c11a4305f3550631beaa432fc9df16fcff", size = 219521 },
{ url = "https://files.pythonhosted.org/packages/d3/7f/c8b6e4e664b8a95254c35a6c8dd0bf4db201ec681c169aae2f1256e05c85/coverage-7.10.5-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:68c5e0bc5f44f68053369fa0d94459c84548a77660a5f2561c5e5f1e3bed7031", size = 217090 },
{ url = "https://files.pythonhosted.org/packages/44/74/3ee14ede30a6e10a94a104d1d0522d5fb909a7c7cac2643d2a79891ff3b9/coverage-7.10.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:cf33134ffae93865e32e1e37df043bef15a5e857d8caebc0099d225c579b0fa3", size = 217365 },
{ url = "https://files.pythonhosted.org/packages/41/5f/06ac21bf87dfb7620d1f870dfa3c2cae1186ccbcdc50b8b36e27a0d52f50/coverage-7.10.5-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:ad8fa9d5193bafcf668231294241302b5e683a0518bf1e33a9a0dfb142ec3031", size = 248413 },
{ url = "https://files.pythonhosted.org/packages/21/bc/cc5bed6e985d3a14228539631573f3863be6a2587381e8bc5fdf786377a1/coverage-7.10.5-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:146fa1531973d38ab4b689bc764592fe6c2f913e7e80a39e7eeafd11f0ef6db2", size = 250943 },
{ url = "https://files.pythonhosted.org/packages/8d/43/6a9fc323c2c75cd80b18d58db4a25dc8487f86dd9070f9592e43e3967363/coverage-7.10.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6013a37b8a4854c478d3219ee8bc2392dea51602dd0803a12d6f6182a0061762", size = 252301 },
{ url = "https://files.pythonhosted.org/packages/69/7c/3e791b8845f4cd515275743e3775adb86273576596dc9f02dca37357b4f2/coverage-7.10.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:eb90fe20db9c3d930fa2ad7a308207ab5b86bf6a76f54ab6a40be4012d88fcae", size = 250302 },
{ url = "https://files.pythonhosted.org/packages/5c/bc/5099c1e1cb0c9ac6491b281babea6ebbf999d949bf4aa8cdf4f2b53505e8/coverage-7.10.5-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:384b34482272e960c438703cafe63316dfbea124ac62006a455c8410bf2a2262", size = 248237 },
{ url = "https://files.pythonhosted.org/packages/7e/51/d346eb750a0b2f1e77f391498b753ea906fde69cc11e4b38dca28c10c88c/coverage-7.10.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:467dc74bd0a1a7de2bedf8deaf6811f43602cb532bd34d81ffd6038d6d8abe99", size = 249726 },
{ url = "https://files.pythonhosted.org/packages/a3/85/eebcaa0edafe427e93286b94f56ea7e1280f2c49da0a776a6f37e04481f9/coverage-7.10.5-cp314-cp314-win32.whl", hash = "sha256:556d23d4e6393ca898b2e63a5bca91e9ac2d5fb13299ec286cd69a09a7187fde", size = 219825 },
{ url = "https://files.pythonhosted.org/packages/3c/f7/6d43e037820742603f1e855feb23463979bf40bd27d0cde1f761dcc66a3e/coverage-7.10.5-cp314-cp314-win_amd64.whl", hash = "sha256:f4446a9547681533c8fa3e3c6cf62121eeee616e6a92bd9201c6edd91beffe13", size = 220618 },
{ url = "https://files.pythonhosted.org/packages/4a/b0/ed9432e41424c51509d1da603b0393404b828906236fb87e2c8482a93468/coverage-7.10.5-cp314-cp314-win_arm64.whl", hash = "sha256:5e78bd9cf65da4c303bf663de0d73bf69f81e878bf72a94e9af67137c69b9fe9", size = 219199 },
{ url = "https://files.pythonhosted.org/packages/2f/54/5a7ecfa77910f22b659c820f67c16fc1e149ed132ad7117f0364679a8fa9/coverage-7.10.5-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:5661bf987d91ec756a47c7e5df4fbcb949f39e32f9334ccd3f43233bbb65e508", size = 217833 },
{ url = "https://files.pythonhosted.org/packages/4e/0e/25672d917cc57857d40edf38f0b867fb9627115294e4f92c8fcbbc18598d/coverage-7.10.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a46473129244db42a720439a26984f8c6f834762fc4573616c1f37f13994b357", size = 218048 },
{ url = "https://files.pythonhosted.org/packages/cb/7c/0b2b4f1c6f71885d4d4b2b8608dcfc79057adb7da4143eb17d6260389e42/coverage-7.10.5-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1f64b8d3415d60f24b058b58d859e9512624bdfa57a2d1f8aff93c1ec45c429b", size = 259549 },
{ url = "https://files.pythonhosted.org/packages/94/73/abb8dab1609abec7308d83c6aec547944070526578ee6c833d2da9a0ad42/coverage-7.10.5-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:44d43de99a9d90b20e0163f9770542357f58860a26e24dc1d924643bd6aa7cb4", size = 261715 },
{ url = "https://files.pythonhosted.org/packages/0b/d1/abf31de21ec92731445606b8d5e6fa5144653c2788758fcf1f47adb7159a/coverage-7.10.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a931a87e5ddb6b6404e65443b742cb1c14959622777f2a4efd81fba84f5d91ba", size = 263969 },
{ url = "https://files.pythonhosted.org/packages/9c/b3/ef274927f4ebede96056173b620db649cc9cb746c61ffc467946b9d0bc67/coverage-7.10.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:f9559b906a100029274448f4c8b8b0a127daa4dade5661dfd821b8c188058842", size = 261408 },
{ url = "https://files.pythonhosted.org/packages/20/fc/83ca2812be616d69b4cdd4e0c62a7bc526d56875e68fd0f79d47c7923584/coverage-7.10.5-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:b08801e25e3b4526ef9ced1aa29344131a8f5213c60c03c18fe4c6170ffa2874", size = 259168 },
{ url = "https://files.pythonhosted.org/packages/fc/4f/e0779e5716f72d5c9962e709d09815d02b3b54724e38567308304c3fc9df/coverage-7.10.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ed9749bb8eda35f8b636fb7632f1c62f735a236a5d4edadd8bbcc5ea0542e732", size = 260317 },
{ url = "https://files.pythonhosted.org/packages/2b/fe/4247e732f2234bb5eb9984a0888a70980d681f03cbf433ba7b48f08ca5d5/coverage-7.10.5-cp314-cp314t-win32.whl", hash = "sha256:609b60d123fc2cc63ccee6d17e4676699075db72d14ac3c107cc4976d516f2df", size = 220600 },
{ url = "https://files.pythonhosted.org/packages/a7/a0/f294cff6d1034b87839987e5b6ac7385bec599c44d08e0857ac7f164ad0c/coverage-7.10.5-cp314-cp314t-win_amd64.whl", hash = "sha256:0666cf3d2c1626b5a3463fd5b05f5e21f99e6aec40a3192eee4d07a15970b07f", size = 221714 },
{ url = "https://files.pythonhosted.org/packages/23/18/fa1afdc60b5528d17416df440bcbd8fd12da12bfea9da5b6ae0f7a37d0f7/coverage-7.10.5-cp314-cp314t-win_arm64.whl", hash = "sha256:bc85eb2d35e760120540afddd3044a5bf69118a91a296a8b3940dfc4fdcfe1e2", size = 219735 },
{ url = "https://files.pythonhosted.org/packages/08/b6/fff6609354deba9aeec466e4bcaeb9d1ed3e5d60b14b57df2a36fb2273f2/coverage-7.10.5-py3-none-any.whl", hash = "sha256:0be24d35e4db1d23d0db5c0f6a74a962e2ec83c426b5cac09f4234aadef38e4a", size = 208736 },
]
[[package]]
name = "django"
version = "5.2.6"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "asgiref" },
{ name = "sqlparse" },
{ name = "tzdata", marker = "sys_platform == 'win32'" },
]
sdist = { url = "https://files.pythonhosted.org/packages/4c/8c/2a21594337250a171d45dda926caa96309d5136becd1f48017247f9cdea0/django-5.2.6.tar.gz", hash = "sha256:da5e00372763193d73cecbf71084a3848458cecf4cee36b9a1e8d318d114a87b", size = 10858861 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/f5/af/6593f6d21404e842007b40fdeb81e73c20b6649b82d020bb0801b270174c/django-5.2.6-py3-none-any.whl", hash = "sha256:60549579b1174a304b77e24a93d8d9fafe6b6c03ac16311f3e25918ea5a20058", size = 8303111 },
]
[[package]]
name = "piexif"
version = "1.1.3"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/fa/84/a3f25cec7d0922bf60be8000c9739d28d24b6896717f44cc4cfb843b1487/piexif-1.1.3.zip", hash = "sha256:83cb35c606bf3a1ea1a8f0a25cb42cf17e24353fd82e87ae3884e74a302a5f1b", size = 1011134 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/2c/d8/6f63147dd73373d051c5eb049ecd841207f898f50a5a1d4378594178f6cf/piexif-1.1.3-py2.py3-none-any.whl", hash = "sha256:3bc435d171720150b81b15d27e05e54b8abbde7b4242cddd81ef160d283108b6", size = 20691 },
]
[[package]]
name = "pillow"
version = "11.3.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/d0d6dea55cd152ce3d6767bb38a8fc10e33796ba4ba210cbab9354b6d238/pillow-11.3.0.tar.gz", hash = "sha256:3828ee7586cd0b2091b6209e5ad53e20d0649bbe87164a459d0676e035e8f523", size = 47113069 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/1e/93/0952f2ed8db3a5a4c7a11f91965d6184ebc8cd7cbb7941a260d5f018cd2d/pillow-11.3.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:1c627742b539bba4309df89171356fcb3cc5a9178355b2727d1b74a6cf155fbd", size = 2128328 },
{ url = "https://files.pythonhosted.org/packages/4b/e8/100c3d114b1a0bf4042f27e0f87d2f25e857e838034e98ca98fe7b8c0a9c/pillow-11.3.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:30b7c02f3899d10f13d7a48163c8969e4e653f8b43416d23d13d1bbfdc93b9f8", size = 2170652 },
{ url = "https://files.pythonhosted.org/packages/aa/86/3f758a28a6e381758545f7cdb4942e1cb79abd271bea932998fc0db93cb6/pillow-11.3.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:7859a4cc7c9295f5838015d8cc0a9c215b77e43d07a25e460f35cf516df8626f", size = 2227443 },
{ url = "https://files.pythonhosted.org/packages/01/f4/91d5b3ffa718df2f53b0dc109877993e511f4fd055d7e9508682e8aba092/pillow-11.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ec1ee50470b0d050984394423d96325b744d55c701a439d2bd66089bff963d3c", size = 5278474 },
{ url = "https://files.pythonhosted.org/packages/f9/0e/37d7d3eca6c879fbd9dba21268427dffda1ab00d4eb05b32923d4fbe3b12/pillow-11.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7db51d222548ccfd274e4572fdbf3e810a5e66b00608862f947b163e613b67dd", size = 4686038 },
{ url = "https://files.pythonhosted.org/packages/ff/b0/3426e5c7f6565e752d81221af9d3676fdbb4f352317ceafd42899aaf5d8a/pillow-11.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2d6fcc902a24ac74495df63faad1884282239265c6839a0a6416d33faedfae7e", size = 5864407 },
{ url = "https://files.pythonhosted.org/packages/fc/c1/c6c423134229f2a221ee53f838d4be9d82bab86f7e2f8e75e47b6bf6cd77/pillow-11.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f0f5d8f4a08090c6d6d578351a2b91acf519a54986c055af27e7a93feae6d3f1", size = 7639094 },
{ url = "https://files.pythonhosted.org/packages/ba/c9/09e6746630fe6372c67c648ff9deae52a2bc20897d51fa293571977ceb5d/pillow-11.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c37d8ba9411d6003bba9e518db0db0c58a680ab9fe5179f040b0463644bc9805", size = 5973503 },
{ url = "https://files.pythonhosted.org/packages/d5/1c/a2a29649c0b1983d3ef57ee87a66487fdeb45132df66ab30dd37f7dbe162/pillow-11.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:13f87d581e71d9189ab21fe0efb5a23e9f28552d5be6979e84001d3b8505abe8", size = 6642574 },
{ url = "https://files.pythonhosted.org/packages/36/de/d5cc31cc4b055b6c6fd990e3e7f0f8aaf36229a2698501bcb0cdf67c7146/pillow-11.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:023f6d2d11784a465f09fd09a34b150ea4672e85fb3d05931d89f373ab14abb2", size = 6084060 },
{ url = "https://files.pythonhosted.org/packages/d5/ea/502d938cbaeec836ac28a9b730193716f0114c41325db428e6b280513f09/pillow-11.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:45dfc51ac5975b938e9809451c51734124e73b04d0f0ac621649821a63852e7b", size = 6721407 },
{ url = "https://files.pythonhosted.org/packages/45/9c/9c5e2a73f125f6cbc59cc7087c8f2d649a7ae453f83bd0362ff7c9e2aee2/pillow-11.3.0-cp313-cp313-win32.whl", hash = "sha256:a4d336baed65d50d37b88ca5b60c0fa9d81e3a87d4a7930d3880d1624d5b31f3", size = 6273841 },
{ url = "https://files.pythonhosted.org/packages/23/85/397c73524e0cd212067e0c969aa245b01d50183439550d24d9f55781b776/pillow-11.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0bce5c4fd0921f99d2e858dc4d4d64193407e1b99478bc5cacecba2311abde51", size = 6978450 },
{ url = "https://files.pythonhosted.org/packages/17/d2/622f4547f69cd173955194b78e4d19ca4935a1b0f03a302d655c9f6aae65/pillow-11.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:1904e1264881f682f02b7f8167935cce37bc97db457f8e7849dc3a6a52b99580", size = 2423055 },
{ url = "https://files.pythonhosted.org/packages/dd/80/a8a2ac21dda2e82480852978416cfacd439a4b490a501a288ecf4fe2532d/pillow-11.3.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4c834a3921375c48ee6b9624061076bc0a32a60b5532b322cc0ea64e639dd50e", size = 5281110 },
{ url = "https://files.pythonhosted.org/packages/44/d6/b79754ca790f315918732e18f82a8146d33bcd7f4494380457ea89eb883d/pillow-11.3.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5e05688ccef30ea69b9317a9ead994b93975104a677a36a8ed8106be9260aa6d", size = 4689547 },
{ url = "https://files.pythonhosted.org/packages/49/20/716b8717d331150cb00f7fdd78169c01e8e0c219732a78b0e59b6bdb2fd6/pillow-11.3.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1019b04af07fc0163e2810167918cb5add8d74674b6267616021ab558dc98ced", size = 5901554 },
{ url = "https://files.pythonhosted.org/packages/74/cf/a9f3a2514a65bb071075063a96f0a5cf949c2f2fce683c15ccc83b1c1cab/pillow-11.3.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f944255db153ebb2b19c51fe85dd99ef0ce494123f21b9db4877ffdfc5590c7c", size = 7669132 },
{ url = "https://files.pythonhosted.org/packages/98/3c/da78805cbdbee9cb43efe8261dd7cc0b4b93f2ac79b676c03159e9db2187/pillow-11.3.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f85acb69adf2aaee8b7da124efebbdb959a104db34d3a2cb0f3793dbae422a8", size = 6005001 },
{ url = "https://files.pythonhosted.org/packages/6c/fa/ce044b91faecf30e635321351bba32bab5a7e034c60187fe9698191aef4f/pillow-11.3.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:05f6ecbeff5005399bb48d198f098a9b4b6bdf27b8487c7f38ca16eeb070cd59", size = 6668814 },
{ url = "https://files.pythonhosted.org/packages/7b/51/90f9291406d09bf93686434f9183aba27b831c10c87746ff49f127ee80cb/pillow-11.3.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a7bc6e6fd0395bc052f16b1a8670859964dbd7003bd0af2ff08342eb6e442cfe", size = 6113124 },
{ url = "https://files.pythonhosted.org/packages/cd/5a/6fec59b1dfb619234f7636d4157d11fb4e196caeee220232a8d2ec48488d/pillow-11.3.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:83e1b0161c9d148125083a35c1c5a89db5b7054834fd4387499e06552035236c", size = 6747186 },
{ url = "https://files.pythonhosted.org/packages/49/6b/00187a044f98255225f172de653941e61da37104a9ea60e4f6887717e2b5/pillow-11.3.0-cp313-cp313t-win32.whl", hash = "sha256:2a3117c06b8fb646639dce83694f2f9eac405472713fcb1ae887469c0d4f6788", size = 6277546 },
{ url = "https://files.pythonhosted.org/packages/e8/5c/6caaba7e261c0d75bab23be79f1d06b5ad2a2ae49f028ccec801b0e853d6/pillow-11.3.0-cp313-cp313t-win_amd64.whl", hash = "sha256:857844335c95bea93fb39e0fa2726b4d9d758850b34075a7e3ff4f4fa3aa3b31", size = 6985102 },
{ url = "https://files.pythonhosted.org/packages/f3/7e/b623008460c09a0cb38263c93b828c666493caee2eb34ff67f778b87e58c/pillow-11.3.0-cp313-cp313t-win_arm64.whl", hash = "sha256:8797edc41f3e8536ae4b10897ee2f637235c94f27404cac7297f7b607dd0716e", size = 2424803 },
{ url = "https://files.pythonhosted.org/packages/73/f4/04905af42837292ed86cb1b1dabe03dce1edc008ef14c473c5c7e1443c5d/pillow-11.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:d9da3df5f9ea2a89b81bb6087177fb1f4d1c7146d583a3fe5c672c0d94e55e12", size = 5278520 },
{ url = "https://files.pythonhosted.org/packages/41/b0/33d79e377a336247df6348a54e6d2a2b85d644ca202555e3faa0cf811ecc/pillow-11.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0b275ff9b04df7b640c59ec5a3cb113eefd3795a8df80bac69646ef699c6981a", size = 4686116 },
{ url = "https://files.pythonhosted.org/packages/49/2d/ed8bc0ab219ae8768f529597d9509d184fe8a6c4741a6864fea334d25f3f/pillow-11.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0743841cabd3dba6a83f38a92672cccbd69af56e3e91777b0ee7f4dba4385632", size = 5864597 },
{ url = "https://files.pythonhosted.org/packages/b5/3d/b932bb4225c80b58dfadaca9d42d08d0b7064d2d1791b6a237f87f661834/pillow-11.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2465a69cf967b8b49ee1b96d76718cd98c4e925414ead59fdf75cf0fd07df673", size = 7638246 },
{ url = "https://files.pythonhosted.org/packages/09/b5/0487044b7c096f1b48f0d7ad416472c02e0e4bf6919541b111efd3cae690/pillow-11.3.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:41742638139424703b4d01665b807c6468e23e699e8e90cffefe291c5832b027", size = 5973336 },
{ url = "https://files.pythonhosted.org/packages/a8/2d/524f9318f6cbfcc79fbc004801ea6b607ec3f843977652fdee4857a7568b/pillow-11.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:93efb0b4de7e340d99057415c749175e24c8864302369e05914682ba642e5d77", size = 6642699 },
{ url = "https://files.pythonhosted.org/packages/6f/d2/a9a4f280c6aefedce1e8f615baaa5474e0701d86dd6f1dede66726462bbd/pillow-11.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7966e38dcd0fa11ca390aed7c6f20454443581d758242023cf36fcb319b1a874", size = 6083789 },
{ url = "https://files.pythonhosted.org/packages/fe/54/86b0cd9dbb683a9d5e960b66c7379e821a19be4ac5810e2e5a715c09a0c0/pillow-11.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:98a9afa7b9007c67ed84c57c9e0ad86a6000da96eaa638e4f8abe5b65ff83f0a", size = 6720386 },
{ url = "https://files.pythonhosted.org/packages/e7/95/88efcaf384c3588e24259c4203b909cbe3e3c2d887af9e938c2022c9dd48/pillow-11.3.0-cp314-cp314-win32.whl", hash = "sha256:02a723e6bf909e7cea0dac1b0e0310be9d7650cd66222a5f1c571455c0a45214", size = 6370911 },
{ url = "https://files.pythonhosted.org/packages/2e/cc/934e5820850ec5eb107e7b1a72dd278140731c669f396110ebc326f2a503/pillow-11.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:a418486160228f64dd9e9efcd132679b7a02a5f22c982c78b6fc7dab3fefb635", size = 7117383 },
{ url = "https://files.pythonhosted.org/packages/d6/e9/9c0a616a71da2a5d163aa37405e8aced9a906d574b4a214bede134e731bc/pillow-11.3.0-cp314-cp314-win_arm64.whl", hash = "sha256:155658efb5e044669c08896c0c44231c5e9abcaadbc5cd3648df2f7c0b96b9a6", size = 2511385 },
{ url = "https://files.pythonhosted.org/packages/1a/33/c88376898aff369658b225262cd4f2659b13e8178e7534df9e6e1fa289f6/pillow-11.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:59a03cdf019efbfeeed910bf79c7c93255c3d54bc45898ac2a4140071b02b4ae", size = 5281129 },
{ url = "https://files.pythonhosted.org/packages/1f/70/d376247fb36f1844b42910911c83a02d5544ebd2a8bad9efcc0f707ea774/pillow-11.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f8a5827f84d973d8636e9dc5764af4f0cf2318d26744b3d902931701b0d46653", size = 4689580 },
{ url = "https://files.pythonhosted.org/packages/eb/1c/537e930496149fbac69efd2fc4329035bbe2e5475b4165439e3be9cb183b/pillow-11.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ee92f2fd10f4adc4b43d07ec5e779932b4eb3dbfbc34790ada5a6669bc095aa6", size = 5902860 },
{ url = "https://files.pythonhosted.org/packages/bd/57/80f53264954dcefeebcf9dae6e3eb1daea1b488f0be8b8fef12f79a3eb10/pillow-11.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c96d333dcf42d01f47b37e0979b6bd73ec91eae18614864622d9b87bbd5bbf36", size = 7670694 },
{ url = "https://files.pythonhosted.org/packages/70/ff/4727d3b71a8578b4587d9c276e90efad2d6fe0335fd76742a6da08132e8c/pillow-11.3.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4c96f993ab8c98460cd0c001447bff6194403e8b1d7e149ade5f00594918128b", size = 6005888 },
{ url = "https://files.pythonhosted.org/packages/05/ae/716592277934f85d3be51d7256f3636672d7b1abfafdc42cf3f8cbd4b4c8/pillow-11.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:41342b64afeba938edb034d122b2dda5db2139b9a4af999729ba8818e0056477", size = 6670330 },
{ url = "https://files.pythonhosted.org/packages/e7/bb/7fe6cddcc8827b01b1a9766f5fdeb7418680744f9082035bdbabecf1d57f/pillow-11.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:068d9c39a2d1b358eb9f245ce7ab1b5c3246c7c8c7d9ba58cfa5b43146c06e50", size = 6114089 },
{ url = "https://files.pythonhosted.org/packages/8b/f5/06bfaa444c8e80f1a8e4bff98da9c83b37b5be3b1deaa43d27a0db37ef84/pillow-11.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a1bc6ba083b145187f648b667e05a2534ecc4b9f2784c2cbe3089e44868f2b9b", size = 6748206 },
{ url = "https://files.pythonhosted.org/packages/f0/77/bc6f92a3e8e6e46c0ca78abfffec0037845800ea38c73483760362804c41/pillow-11.3.0-cp314-cp314t-win32.whl", hash = "sha256:118ca10c0d60b06d006be10a501fd6bbdfef559251ed31b794668ed569c87e12", size = 6377370 },
{ url = "https://files.pythonhosted.org/packages/4a/82/3a721f7d69dca802befb8af08b7c79ebcab461007ce1c18bd91a5d5896f9/pillow-11.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:8924748b688aa210d79883357d102cd64690e56b923a186f35a82cbc10f997db", size = 7121500 },
{ url = "https://files.pythonhosted.org/packages/89/c7/5572fa4a3f45740eaab6ae86fcdf7195b55beac1371ac8c619d880cfe948/pillow-11.3.0-cp314-cp314t-win_arm64.whl", hash = "sha256:79ea0d14d3ebad43ec77ad5272e6ff9bba5b679ef73375ea760261207fa8e0aa", size = 2512835 },
]
[[package]]
name = "pyaes"
version = "1.6.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/44/66/2c17bae31c906613795711fc78045c285048168919ace2220daa372c7d72/pyaes-1.6.1.tar.gz", hash = "sha256:02c1b1405c38d3c370b085fb952dd8bea3fadcee6411ad99f312cc129c536d8f", size = 28536 }
[[package]]
name = "soupsieve"
version = "2.8"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/6d/e6/21ccce3262dd4889aa3332e5a119a3491a95e8f60939870a3a035aabac0d/soupsieve-2.8.tar.gz", hash = "sha256:e2dd4a40a628cb5f28f6d4b0db8800b8f581b65bb380b97de22ba5ca8d72572f", size = 103472 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/14/a0/bb38d3b76b8cae341dad93a2dd83ab7462e6dbcdd84d43f54ee60a8dc167/soupsieve-2.8-py3-none-any.whl", hash = "sha256:0cc76456a30e20f5d7f2e14a98a4ae2ee4e5abdc7c5ea0aafe795f344bc7984c", size = 36679 },
]
[[package]]
name = "sqlparse"
version = "0.5.3"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/e5/40/edede8dd6977b0d3da179a342c198ed100dd2aba4be081861ee5911e4da4/sqlparse-0.5.3.tar.gz", hash = "sha256:09f67787f56a0b16ecdbde1bfc7f5d9c3371ca683cfeaa8e6ff60b4807ec9272", size = 84999 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/a9/5c/bfd6bd0bf979426d405cc6e71eceb8701b148b16c21d2dc3c261efc61c7b/sqlparse-0.5.3-py3-none-any.whl", hash = "sha256:cf2196ed3418f3ba5de6af7e82c694a9fbdbfecccdfc72e281548517081f16ca", size = 44415 },
]
[[package]]
name = "troggle"
version = "2025.9.26"
source = { virtual = "." }
[package.dev-dependencies]
dev = [
{ name = "beautifulsoup4" },
{ name = "coverage" },
{ name = "django" },
{ name = "piexif" },
{ name = "pillow" },
{ name = "pyaes" },
{ name = "unidecode" },
]
[package.metadata]
[package.metadata.requires-dev]
dev = [
{ name = "beautifulsoup4", specifier = ">=4.12.3" },
{ name = "coverage", specifier = ">=7.6.9" },
{ name = "django", specifier = ">=5.2.3" },
{ name = "piexif", specifier = ">=1.1.3" },
{ name = "pillow", specifier = ">=11.0.0" },
{ name = "pyaes", specifier = ">=1.6.1" },
{ name = "unidecode", specifier = ">=1.3.8" },
]
[[package]]
name = "typing-extensions"
version = "4.15.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614 },
]
[[package]]
name = "tzdata"
version = "2025.2"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/95/32/1a225d6164441be760d75c2c42e2780dc0873fe382da3e98a2e1e48361e5/tzdata-2025.2.tar.gz", hash = "sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9", size = 196380 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/5c/23/c7abc0ca0a1526a0774eca151daeb8de62ec457e77262b66b359c3c7679e/tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8", size = 347839 },
]
[[package]]
name = "unidecode"
version = "1.4.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/94/7d/a8a765761bbc0c836e397a2e48d498305a865b70a8600fd7a942e85dcf63/Unidecode-1.4.0.tar.gz", hash = "sha256:ce35985008338b676573023acc382d62c264f307c8f7963733405add37ea2b23", size = 200149 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/8f/b7/559f59d57d18b44c6d1250d2eeaa676e028b9c527431f5d0736478a73ba1/Unidecode-1.4.0-py3-none-any.whl", hash = "sha256:c3c7606c27503ad8d501270406e345ddb480a7b5f38827eafe4fa82a137f0021", size = 235837 },
]

View File

@@ -0,0 +1,53 @@
#!/bin/bash
# now using uv, unbelieveably simpler.
# Run this in a terminal in ~/expo above the troggle directory: 'bash ~/expo/venv-trog.sh'
echo '-- Run this in a terminal in the directory above the troggle directory: "bash ~/expo/venv-trog.sh"'
# Expects an Ubuntu 24.04 with all the gubbins already installed
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog24.04.sh runniing it in /home/username/
python3 --version
cd ~/expo/troggle
echo "-- EXPO folder [current directory]: `pwd`"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder: ${TROGDIR}"
cp dev.toml pyproject.toml
cp ~/expo/troggle/_deploy/wsl/localsettingsWSL.py ~/expo/troggle/localsettings.py
uv self update
uv sync
# fudge for philip's laptop prior to M2 SSD upgrade
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
uv pip list
echo "Django version:`uv run django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/expo/troggle'
'uv run django-admin'
'uv run manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
'uv run manage.py test -v 2'
'./pre-run.sh' (runs the tests again)
'uv run databaseReset.py reset INIT'
'uv run manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
# if [ ! -d /mnt/d/expofiles ]; then
# echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.'
# fi

View File

@@ -0,0 +1,200 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.eu" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "EXPO SERVER AUTOMATIC <django-test@klebos.eu>"
# -----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that secret_credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
# -----------------------------------------------------------------
# default values, real secrets will be imported from credentials.py in future
SQLITEFILE = "/home/expo/troggle.sqlite" # can be ':memory:'
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote server. Tests are then less accurate.
# SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = "8000" # not needed as it is the default
ADMINS = (
('Philip', 'philip.sargent@klebos.eu'),
)
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent
LIBDIR = REPOS_ROOT_PATH / "lib" / PV
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / "templates"
MEDIA_ROOT = TROGGLE_PATH / "media"
JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility
# FILES = Path('/mnt/d/expofiles/')
EXPOFILES = REPOS_ROOT_PATH / "expofiles"
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos"
PHOTOS_YEAR = "2025"
NOTABLECAVESHREFS = ["290", "291", "264", "258", "204", "359", "76", "107"]
PYTHON_PATH = REPOS_ROOT_PATH / "troggle"
LOGFILE = PYTHON_PATH / "troggle.log"
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
MEDIA_URL = "/site-media/"
DIR_ROOT = Path("") # this should end in / if a value is given
URL_ROOT = "/"
# URL_ROOT = 'http://localhost:'+ SERVERPORT +'/'
# Note that these constants are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
# executables:
CAVERN = "cavern" # for parsing .svx files and producing .3d files
SURVEXPORT = "survexport" # for parsing .3d files and producing .pos files
DBSQLITE = {
"default": {
"ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"NAME": SQLITEFILE,
# 'NAME' : ':memory:',
"USER": "expo", # Not used with sqlite3.
"PASSWORD": "sekrit", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
"default": {
"ENGINE": "django.db.backends.mysql", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4",
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
"PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_PATH],
"OPTIONS": {
"debug": "DEBUG",
"context_processors": [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
"django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions
"core.context.troggle_context", # in core/context.py - only used in expedition.html
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media", # includes a variable MEDIA_URL
"django.template.context_processors.static", # includes a variable STATIC_URL used by admin pages
"django.template.context_processors.tz",
"django.template.context_processors.request", # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
"django.contrib.messages.context_processors.messages",
],
"loaders": [
"django.template.loaders.filesystem.Loader", # default lcation is troggle/templates/
"django.template.loaders.app_directories.Loader", # needed for admin 'app'
],
},
},
]
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
# EXPOWEB_URL = "" # defunct, removed.
# SCANS_URL = '/survey_scans/' # defunct, removed.
sys.path.append(str(REPOS_ROOT_PATH))
sys.path.append(str(PYTHON_PATH))
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
# TEST_RUNNER = "django.test.runner.DiscoverRunner"
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Run this in a terminal : 'bash os-survey.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
echo '###'
echo '### NOW INSTALLING tunnel and therion, go and have a cup of tea. Or a 3-course meal.'
echo '###'
sudo apt install tunnelx therion -y
sudo apt install survex-aven -y
sudo apt install gpsprune qgis -y
cd ~/expo
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

View File

@@ -0,0 +1,92 @@
#!/bin/bash
# Run this in a terminal in the troggle directory: 'bash os-trog.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
# sudo apt install python-is-python3 -y
python --version : ensure python is an alias for python3 not python2.7
ssh -V
sudo apt update -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
# Already in Ubuntu 24.04 on WSL:
# sudo apt install git -y
# sudo apt install wget gpg
# sudo apt install sftp -y
# sudo apt install openssh-client -y
# sudo apt install rsync
# Now using uv not pip:
# sudo apt install python3-pip -y
sudo apt install sqlite3 -y
sudo apt install gedit -y
sudo apt install tig gitg meld -y
# python formatting https://docs.astral.sh/ruff/
sudo snap install ruff
# # do not actually use this any more
# sudo useradd expo
# sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
# as debian does not install everything that ubuntu does, you need:
sudo apt install python3-venv -y
sudo apt install python3-dev -y
# sudo apt install python3-distutils -y
# install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
sudo apt install mariadb-server -y
sudo apt install libmariadb-dev -y
# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools
# sudo service mysql start
# We don't install the later version or the earlier versions of python - for dev and "sever mimic" environments
# we leave that to uv to install now.
# In Dec.2024, the server is running 3.11 but dev work will be using 3.13
# The setup of the virtual environment is done by troggle/_deploy/wsl/venv-trog.sh
# install VS code - but ONLY on a native ubuntu install, NOT in WSL
# sudo apt install software-properties-common apt-transport-https
# wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
# sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
# sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
# sudo apt update
# sudo apt install code
mkdir ~/expo
cd ~/expo
echo '###'
echo '### Now YOU have to configure the git settings for YOURSELF (not "expo")'
echo '### because you can't clone the repos without a key
git config --global user.email "philip.sargent@gmail.com"
git config --global user.name "Philip Sargent"
git config --global pull.rebase true
#Change this to clone using https?? at least for troggle?
git clone ssh://expo@expo.survex.com/home/expo/troggle
git clone ssh://expo@expo.survex.com/home/expo/loser
git clone ssh://expo@expo.survex.com/home/expo/expoweb
git clone ssh://expo@expo.survex.com/home/expo/drawings
mkdir expofiles
rsync -azv --delete-after --prune-empty-dirs expo@expo.survex.com:expofiles/surveyscans/ expofiles/surveyscans
rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/2018/PhilipSargent/ expofiles/photos/2018/PhilipSargent
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

63
_deploy/anathema/pre-push.sh Executable file
View File

@@ -0,0 +1,63 @@
#! /bin/bash
# create and sanitise files for pushing to repo
# catatrophically forgot to sanitize localsettingsWSL.py - oops.
#Make sure you have the WSL permissions system working, or you will push unsanitized files as this will fail
# Philip Sargent 2022/04/12
HOSTNAME=`hostname`
echo "** This copies file to _deploy/${HOSTNAME}/ !"
cd ..
cd troggle
echo `pwd`
echo deprecations.
PYTHON="uv run"
source .venv/bin/activate
python3 -Wall manage.py check -v 3 2>deprecations.txt >/dev/null
deactivate
echo diffsettings.
rm diffsettings.txt
if test -f "diffsettings.txt"; then
echo "diffsettings.txt not deleted. You have a serious permissions problem. Aborting.."
exit
fi
$PYTHON manage.py diffsettings | grep "###" > diffsettings.txt
echo inspectdb.
# this next line requires database setting to be troggle.sqlite:
$PYTHON manage.py inspectdb > troggle-inspectdb.py
#egrep -in "unable|error" troggle-inspectdb.py
echo remove passwords.
cp localsettings.py localsettings-${HOSTNAME}.py
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EXPOUSERPASS = \"nnn:gggggg\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EXPOUSERPASS = \"gggggg:nnn\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EMAIL_HOST_PASSWORD = \"real-email-password--imported-from-localsettings.py\""
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' diffsettings.txt
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: SECRET_KEY = \"real-SECRET_KEY--imported-from-localsettings.py\""
mkdir -p _deploy/${HOSTNAME}
mv _deploy/${HOSTNAME}/localsettings-${HOSTNAME}.py _deploy/${HOSTNAME}/localsettings-${HOSTNAME}.py.bak
mv localsettings-${HOSTNAME}.py _deploy/${HOSTNAME}
cp *.sh _deploy/${HOSTNAME}
#
# Do these before final testing, *not* just before pushing:
# in ./pre-run.sh
# $PYTHON reset-django.py
# $PYTHON manage.py makemigrations
# $PYTHON manage.py test
# $PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -i "unable|error" troggle-inspectdb.py

36
_deploy/anathema/pre-run.sh Executable file
View File

@@ -0,0 +1,36 @@
#! /bin/bash
# Do these before final testing, *not* just before pushing:
# Changed to use uv not pip, requires manage.py to have uv structured uv comment in it.
PYTHON="uv run"
echo "** Run inspectdb:"
$PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -in "unable|error" troggle-inspectdb.py
echo ""
# count non-blank lines of python and template HTML code
# includes all variants of settings.py files
# fix this as core/utils.py has 28,000 lines of numbers.
find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt
find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | grep -v "/migrations/" |grep -v "troggle-inspectdb.py"| awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt
echo "** Run reset-django.py - which deletes the database"
# This deletes the database so must run after generating troggle-inspectdb.py
$PYTHON reset-django.py
echo "** After cleanup deletion, remake all migrations."
$PYTHON manage.py makemigrations >/dev/null
$PYTHON manage.py migrate
echo "** Now running self check"
$PYTHON manage.py check -v 3 --deploy 2>security-warnings.txt >/dev/null
$PYTHON manage.py check -v 3 --deploy
echo "** Now running test suite"
# $PYTHON manage.py test -v 1
echo ""
echo `tail -1 lines-of-python.txt` non-comment lines of python.
echo `tail -1 lines-of-templates.txt` non-comment lines of HTML templates.
echo '** If you have an error running manage.py, maybe you are not in an activated venv ? or your manage.py is not managed by uv properly ?'

View File

@@ -0,0 +1,53 @@
#!/bin/bash
# now using uv, unbelieveably simpler.
# Run this in a terminal in ~/expo above the troggle directory: 'bash ~/expo/venv-trog.sh'
echo '-- Run this in a terminal in the directory above the troggle directory: "bash ~/expo/venv-trog.sh"'
# Expects an Ubuntu 24.04 with all the gubbins already installed
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog24.04.sh runniing it in /home/username/
python3 --version
cd ~/expo/troggle
echo "-- EXPO folder [current directory]: `pwd`"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder: ${TROGDIR}"
cp dev.toml pyproject.toml
cp ~/expo/troggle/_deploy/wsl/localsettingsWSL.py ~/expo/troggle/localsettings.py
uv self update
uv sync
# fudge for philip's laptop prior to M2 SSD upgrade
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
uv pip list
echo "Django version:`uv run django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/expo/troggle'
'uv run django-admin'
'uv run manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
'uv run manage.py test -v 2'
'./pre-run.sh' (runs the tests again)
'uv run databaseReset.py reset INIT'
'uv run manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
# if [ ! -d /mnt/d/expofiles ]; then
# echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.'
# fi

View File

@@ -0,0 +1,160 @@
import os
import sys
import urllib.parse
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
NOTE this file is vastly out of sync with troggle/_deploy/wsl/localsettings.py
which is the most recent version used in active maintenance. There should be
essential differences, but there and many, many non-essential differences which
should be eliminated for clarity and to use modern idioms. 8 March 2023.
"""
print(" * importing troggle/localsettings.py")
# DO NOT check this file into the git repo - it contains real passwords.
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME' : 'troggle', # Or path to database file if using sqlite3.
'USER' : 'expo', # Not used with sqlite3.
'PASSWORD' : '123456789012345', # Not used with sqlite3. Not a real password.
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
EXPOUSER = 'expo'
EXPOUSERPASS = 'Not a real password'
EXPOADMINUSER = 'expoadmin'
EXPOADMINUSERPASS = 'Not a real password'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
REPOS_ROOT_PATH = '/home/expo/'
sys.path.append(REPOS_ROOT_PATH)
sys.path.append(REPOS_ROOT_PATH + 'troggle')
# Define the path to the django app (troggle in this case)
PYTHON_PATH = REPOS_ROOT_PATH + 'troggle/'
PHOTOS_YEAR = "2023"
# add in 358 when they don't make it crash horribly
NOTABLECAVESHREFS = [ "290", "291", "359", "264", "258", "204", "76", "107"]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
PYTHON_PATH + "templates"
],
'OPTIONS': {
'debug': 'DEBUG',
'context_processors': [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
'django.contrib.auth.context_processors.auth', # knowledge of logged-on user & permissions
'core.context.troggle_context', # in core/troggle.py
'django.template.context_processors.debug',
#'django.template.context_processors.request', # copy of current request, added in trying to make csrf work
'django.template.context_processors.i18n',
'django.template.context_processors.media', # includes a variable MEDIA_URL
'django.template.context_processors.static', # includes a variable STATIC_URL
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
],
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader', #For each app, inc admin, in INSTALLED_APPS, loader looks for /templates
# insert your own TEMPLATE_LOADERS here
]
},
},
]
PUBLIC_SITE = True
# This should be False for normal running
DEBUG = False
CACHEDPAGES = True # experimental page cache for a handful of page types
# executables:
CAVERN = 'cavern' # for parsing .svx files and producing .3d files
SURVEXPORT = 'survexport' # for parsing .3d files and producing .pos files
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
LIBDIR = Path(REPOS_ROOT_PATH) / 'lib' / PV
EXPOWEB = Path(REPOS_ROOT_PATH + 'expoweb/')
SURVEYS = REPOS_ROOT_PATH
SURVEY_SCANS = REPOS_ROOT_PATH + 'expofiles/surveyscans/'
FILES = REPOS_ROOT_PATH + 'expofiles'
PHOTOS_ROOT = REPOS_ROOT_PATH + 'expofiles/photos/'
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / 'templates'
MEDIA_ROOT = TROGGLE_PATH / 'media'
JSLIB_ROOT = TROGGLE_PATH / 'media' / 'jslib' # used for CaveViewer JS utility
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
PYTHON_PATH = REPOS_ROOT_PATH + 'troggle/'
#URL_ROOT = 'http://expo.survex.com/'
URL_ROOT = '/'
DIR_ROOT = Path("") #this should end in / if a value is given
EXPOWEB_URL = '/'
SURVEYS_URL = '/survey_scans/'
REPOS_ROOT_PATH = Path(REPOS_ROOT_PATH)
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOFILES = REPOS_ROOT_PATH / "expofiles"
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos"
#EXPOFILES = urllib.parse.urljoin(REPOS_ROOT_PATH, 'expofiles/')
PHOTOS_URL = urllib.parse.urljoin(URL_ROOT, '/photos/')
# MEDIA_URL is used by urls.py in a regex. See urls.py & core/views_surveys.py
MEDIA_URL = '/site_media/'
STATIC_URL = urllib.parse.urljoin(URL_ROOT , '/static/') # used by Django admin pages. Do not delete.
JSLIB_URL = urllib.parse.urljoin(URL_ROOT , '/javascript/') # always fails, try to revive it ?
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
LOGFILE = '/var/log/troggle/troggle.log'
IMPORTLOGFILE = '/var/log/troggle/import.log'
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,164 @@
import os
import sys
import urllib.parse
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
# DO NOT check this file into the git repo - it contains real passwords.
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME' : 'troggle', # Or path to database file if using sqlite3.
'USER' : 'expo', # Not used with sqlite3.
'PASSWORD' : '123456789012345', # Not used with sqlite3.Not the real password
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
SECRET_KEY = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
EXPOUSERPASS = "nope"
EXPOADMINUSERPASS = "nope"
EMAIL_HOST_PASSWORD = "nope"
REPOS_ROOT_PATH = '/home/expo/'
sys.path.append(REPOS_ROOT_PATH)
sys.path.append(REPOS_ROOT_PATH + 'troggle')
# Define the path to the django app (troggle in this case)
PYTHON_PATH = REPOS_ROOT_PATH + 'troggle/'
PHOTOS_YEAR = "2022"
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
PYTHON_PATH + "templates"
],
'OPTIONS': {
'debug': 'DEBUG',
'context_processors': [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
'django.contrib.auth.context_processors.auth', # knowledge of logged-on user & permissions
'core.context.troggle_context', # in core/troggle.py
'django.template.context_processors.debug',
#'django.template.context_processors.request', # copy of current request, added in trying to make csrf work
'django.template.context_processors.i18n',
'django.template.context_processors.media', # includes a variable MEDIA_URL
'django.template.context_processors.static', # includes a variable STATIC_URL
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
],
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader', #For each app, inc admin, in INSTALLED_APPS, loader looks for /templates
# insert your own TEMPLATE_LOADERS here
]
},
},
]
PUBLIC_SITE = True
# This should be False for normal running
DEBUG = True
CACHEDPAGES = True # experimental page cache for a handful of page types
SURVEX_DATA = REPOS_ROOT_PATH + 'loser/'
DRAWINGS_DATA = REPOS_ROOT_PATH + 'drawings/'
# executables:
CAVERN = 'cavern' # for parsing .svx files and producing .3d files
SURVEXPORT = 'survexport' # for parsing .3d files and producing .pos files
EXPOWEB = REPOS_ROOT_PATH + 'expoweb/'
#SURVEYS = REPOS_ROOT_PATH
SCANS_ROOT = REPOS_ROOT_PATH + 'expofiles/surveyscans/'
FILES = REPOS_ROOT_PATH + 'expofiles'
PHOTOS_ROOT = REPOS_ROOT_PATH + 'expofiles/photos/'
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / 'templates'
MEDIA_ROOT = TROGGLE_PATH / 'media'
JSLIB_ROOT = TROGGLE_PATH / 'media' / 'jslib' # used for CaveViewer JS utility
CAVEDESCRIPTIONS = os.path.join(EXPOWEB, "cave_data")
ENTRANCEDESCRIPTIONS = os.path.join(EXPOWEB, "entrance_data")
# CACHEDIR = REPOS_ROOT_PATH + 'expowebcache/'
# THREEDCACHEDIR = CACHEDIR + '3d/'
# THUMBNAILCACHE = CACHEDIR + 'thumbs'
PYTHON_PATH = REPOS_ROOT_PATH + 'troggle/'
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
LIBDIR = Path(REPOS_ROOT_PATH) / 'lib' / PV
#Note that all these *_URL constants are not actually used in urls.py, they should be..
#URL_ROOT = 'http://expo.survex.com/'
URL_ROOT = '/'
DIR_ROOT = ''#this should end in / if a value is given
EXPOWEB_URL = '/'
SCANS_URL = '/survey_scans/'
EXPOFILES = urllib.parse.urljoin(REPOS_ROOT_PATH, 'expofiles/')
PHOTOS_URL = urllib.parse.urljoin(URL_ROOT, '/photos/')
# MEDIA_URL is used by urls.py in a regex. See urls.py & core/views_surveys.py
MEDIA_URL = '/site_media/'
STATIC_URL = urllib.parse.urljoin(URL_ROOT , '/static/') # used by Django admin pages. Do not delete.
JSLIB_URL = urllib.parse.urljoin(URL_ROOT , '/javascript/') # always fails, try to revive it ?
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
LOGFILE = '/var/log/troggle/troggle.log'
IMPORTLOGFILE = '/var/log/troggle/import.log'
# add in 358 when they don't make it crash horribly
NOTABLECAVESHREFS = [ "290", "291", "359", "264", "258", "204", "76", "107"]
# Sanitise these to be strings as all other code is expecting strings
# and we have not made the change to pathlib Path type in the other localsettings-* variants yet.
CAVEDESCRIPTIONS = os.fspath(CAVEDESCRIPTIONS)
ENTRANCEDESCRIPTIONS = os.fspath(ENTRANCEDESCRIPTIONS)
LOGFILE = os.fspath(LOGFILE)
#SURVEYS = os.fspath(SURVEYS)
EXPOWEB = os.fspath(EXPOWEB)
DRAWINGS_DATA = os.fspath(DRAWINGS_DATA)
SURVEX_DATA = os.fspath(SURVEX_DATA)
REPOS_ROOT_PATH = os.fspath(REPOS_ROOT_PATH)
TEMPLATE_PATH = os.fspath(TROGGLE_PATH)
MEDIA_ROOT = os.fspath(MEDIA_ROOT)
JSLIB_ROOT = os.fspath(JSLIB_ROOT)
SCANS_ROOT = os.fspath(SCANS_ROOT)
LIBDIR = os.fspath(LIBDIR)
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,70 @@
#!/bin/bash
# Run this in a terminal in the troggle directory: 'bash os-trog.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in the troggle directory: "bash venv-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 22.04 relatively clean install.
sudo apt install python-is-python3 -y
python --version : ensure python is an alias for python3 not python2.7
sudo apt update -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
sudo apt install sqlite3 -y
sudo apt install python3-pip -y
# this installs a shed-load of other stuff: binutils etc.sudo apt install survex-aven
sudo apt install git openssh-client -y
# On a clean debian 11 (bullseye) installation with Xfce & ssh,
#on ubuntu 20.04:
#Package sftp is not available, but is referred to by another package.
#This may mean that the package is missing, has been obsoleted, or
#is only available from another source
#E: Package 'sftp' has no installation candidate
# On Ubuntu 20.04, with python10, the pip install fails.
# So you need to get the pip from source
# sudo curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
# but really you should be using 22.04
# and also, isf using debian,
# sudo python3.10 -m pip install -U virtualenv
# as debian does not install everything that ubuntu does, you need:
sudo useradd expo
sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
sudo apt install python3-venv -y
sudo apt install python3-dev -y
# default since 22.04
# sudo apt install python3.10
sudo apt install python3.11-venv -y
sudo apt install python3.11-dev -y
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1
sudo apt install mariadb-server -y
sudo apt install libmariadb-dev -y
sudo python -m pip install --upgrade pip
sudo apt install sftp -y
echo '###'
echo '### NOW INSTALLING tunnel and therion, go and have a cup of tea. Or a 3-course meal.'
echo '###'
sudo apt install tunnelx therion -y
# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools
# sudo service mysql start
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
echo '###'
echo '### Currently set version of python'
python --version
echo '###'
echo '### Now YOU have to configure the git settings for YOURSELF (not "expo")'

View File

@@ -0,0 +1,147 @@
"""
Django settings for troggle project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
# Imports should be grouped in the following order:
# 1.Standard library imports.
# 2.Related third party imports.
# 3.Local application/library specific imports.
# 4.You should put a blank line between each group of imports.
print("* importing troggle/settings.py")
# default value, then gets overwritten by real secrets
SECRET_KEY = "not-the-real-secret-key-a#vaeozn0---^fj!355qki*vj2"
GIT = "git" # command for running git
# Note that this builds upon the django system installed
# global settings in
# django/conf/global_settings.py which is automatically loaded first.
# read https://docs.djangoproject.com/en/dev/topics/settings/
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
# BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Django settings for troggle project.
ALLOWED_HOSTS = ["*", "expo.survex.com", ".survex.com", "localhost", "127.0.0.1", "192.168.0.5"]
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
# LOGIN_URL = '/accounts/login/' # this is the default value so does not need to be set
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
USE_TZ = True
TIME_ZONE = "Europe/London"
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = "en-uk"
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
USE_L10N = True
FIX_PERMISSIONS = []
# top-level survex file basename (without .svx)
SURVEX_TOPNAME = "1623-and-1626-no-schoenberg-hs"
# Caves for which survex files exist, but are not otherwise registered
# replaced (?) by expoweb/cave_data/pendingcaves.txt
# PENDING = ["1626-361", "2007-06", "2009-02",
# "2012-ns-01", "2012-ns-02", "2010-04", "2012-ns-05", "2012-ns-06",
# "2012-ns-07", "2012-ns-08", "2012-ns-12", "2012-ns-14", "2012-ns-15", "2014-bl888",
# "2018-pf-01", "2018-pf-02"]
APPEND_SLASH = (
False # never relevant because we have urls that match unknown files and produce an 'edit this page' response
)
SMART_APPEND_SLASH = True # not eorking as middleware different after Dj2.0
LOGIN_REDIRECT_URL = "/" # does not seem to have any effect
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
# SESSION_COOKIE_SECURE = True # if enabled, cannot login to Django control panel, bug elsewhere?
# CSRF_COOKIE_SECURE = True # if enabled only sends cookies over SSL
X_FRAME_OPTIONS = "DENY" # changed to "DENY" after I eliminated all the iframes e.g. /xmlvalid.html
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" # from Django 3.2
INSTALLED_APPS = (
"django.contrib.admin",
"django.contrib.auth", # includes the url redirections for login, logout
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.admindocs",
"django.forms", # Required to customise widget templates
# 'django.contrib.staticfiles', # We put our CSS etc explicitly in the right place so do not need this
"troggle.core",
)
FORM_RENDERER = "django.forms.renderers.TemplatesSetting" # Required to customise widget templates
# See the recommended order of these in https://docs.djangoproject.com/en/dev/ref/middleware/
# Note that this is a radically different onion architecture from earlier versions though it looks the same,
# see https://docs.djangoproject.com/en/dev/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
# Seriously, read this: https://www.webforefront.com/django/middlewaredjango.html which is MUCH BETTER than the docs
MIDDLEWARE = [
#'django.middleware.security.SecurityMiddleware', # SECURE_SSL_REDIRECT and SECURE_SSL_HOST # we don't use this
"django.middleware.gzip.GZipMiddleware", # not needed when expofiles and photos served by apache
"django.contrib.sessions.middleware.SessionMiddleware", # Manages sessions, if CSRF_USE_SESSIONS then it needs to be early
"django.middleware.common.CommonMiddleware", # DISALLOWED_USER_AGENTS, APPEND_SLASH and PREPEND_WWW
"django.middleware.csrf.CsrfViewMiddleware", # Cross Site Request Forgeries by adding hidden form fields to POST
"django.contrib.auth.middleware.AuthenticationMiddleware", # Adds the user attribute, representing the currently-logged-in user
"django.contrib.admindocs.middleware.XViewMiddleware", # this and docutils needed by admindocs
"django.contrib.messages.middleware.MessageMiddleware", # Cookie-based and session-based message support. Needed by admin system
"django.middleware.clickjacking.XFrameOptionsMiddleware", # clickjacking protection via the X-Frame-Options header
#'django.middleware.security.SecurityMiddleware', # SECURE_HSTS_SECONDS, SECURE_CONTENT_TYPE_NOSNIFF, SECURE_BROWSER_XSS_FILTER, SECURE_REFERRER_POLICY, and SECURE_SSL_REDIRECT
#'troggle.core.middleware.SmartAppendSlashMiddleware' # needs adapting after Dj2.0
]
ROOT_URLCONF = "troggle.urls"
WSGI_APPLICATION = "troggle.wsgi.application" # change to asgi as soon as we upgrade to Django 3.0
ACCOUNT_ACTIVATION_DAYS = 3
# AUTH_PROFILE_MODULE = 'core.person' # used by removed profiles app ?
QM_PATTERN = "\[\[\s*[Qq][Mm]:([ABC]?)(\d{4})-(\d*)-(\d*)\]\]"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
TEST_RUNNER = "django.test.runner.DiscoverRunner"
from localsettings import *
# localsettings needs to take precedence. Call it to override any existing vars.

View File

@@ -0,0 +1,147 @@
"""
Django settings for troggle project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
# Imports should be grouped in the following order:
# 1.Standard library imports.
# 2.Related third party imports.
# 3.Local application/library specific imports.
# 4.You should put a blank line between each group of imports.
print("* importing troggle/settings.py")
# default value, then gets overwritten by real secrets
SECRET_KEY = "not-the-real-secret-key-a#vaeozn0---^fj!355qki*vj2"
GIT = "git" # command for running git
# Note that this builds upon the django system installed
# global settings in
# django/conf/global_settings.py which is automatically loaded first.
# read https://docs.djangoproject.com/en/dev/topics/settings/
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
# BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Django settings for troggle project.
ALLOWED_HOSTS = ["*", "expo.survex.com", ".survex.com", "localhost", "127.0.0.1", "192.168.0.5"]
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
# LOGIN_URL = '/accounts/login/' # this is the default value so does not need to be set
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
USE_TZ = True
TIME_ZONE = "Europe/London"
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = "en-uk"
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
USE_L10N = True
FIX_PERMISSIONS = []
# top-level survex file basename (without .svx)
SURVEX_TOPNAME = "1623-and-1626-no-schoenberg-hs"
# Caves for which survex files exist, but are not otherwise registered
# replaced (?) by expoweb/cave_data/pendingcaves.txt
# PENDING = ["1626-361", "2007-06", "2009-02",
# "2012-ns-01", "2012-ns-02", "2010-04", "2012-ns-05", "2012-ns-06",
# "2012-ns-07", "2012-ns-08", "2012-ns-12", "2012-ns-14", "2012-ns-15", "2014-bl888",
# "2018-pf-01", "2018-pf-02"]
APPEND_SLASH = (
False # never relevant because we have urls that match unknown files and produce an 'edit this page' response
)
SMART_APPEND_SLASH = True # not eorking as middleware different after Dj2.0
LOGIN_REDIRECT_URL = "/" # does not seem to have any effect
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
# SESSION_COOKIE_SECURE = True # if enabled, cannot login to Django control panel, bug elsewhere?
# CSRF_COOKIE_SECURE = True # if enabled only sends cookies over SSL
X_FRAME_OPTIONS = "DENY" # changed to "DENY" after I eliminated all the iframes e.g. /xmlvalid.html
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" # from Django 3.2
INSTALLED_APPS = (
"django.contrib.admin",
"django.contrib.auth", # includes the url redirections for login, logout
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.admindocs",
"django.forms", # Required to customise widget templates
# 'django.contrib.staticfiles', # We put our CSS etc explicitly in the right place so do not need this
"troggle.core",
)
FORM_RENDERER = "django.forms.renderers.TemplatesSetting" # Required to customise widget templates
# See the recommended order of these in https://docs.djangoproject.com/en/dev/ref/middleware/
# Note that this is a radically different onion architecture from earlier versions though it looks the same,
# see https://docs.djangoproject.com/en/dev/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
# Seriously, read this: https://www.webforefront.com/django/middlewaredjango.html which is MUCH BETTER than the docs
MIDDLEWARE = [
#'django.middleware.security.SecurityMiddleware', # SECURE_SSL_REDIRECT and SECURE_SSL_HOST # we don't use this
"django.middleware.gzip.GZipMiddleware", # not needed when expofiles and photos served by apache
"django.contrib.sessions.middleware.SessionMiddleware", # Manages sessions, if CSRF_USE_SESSIONS then it needs to be early
"django.middleware.common.CommonMiddleware", # DISALLOWED_USER_AGENTS, APPEND_SLASH and PREPEND_WWW
"django.middleware.csrf.CsrfViewMiddleware", # Cross Site Request Forgeries by adding hidden form fields to POST
"django.contrib.auth.middleware.AuthenticationMiddleware", # Adds the user attribute, representing the currently-logged-in user
"django.contrib.admindocs.middleware.XViewMiddleware", # this and docutils needed by admindocs
"django.contrib.messages.middleware.MessageMiddleware", # Cookie-based and session-based message support. Needed by admin system
"django.middleware.clickjacking.XFrameOptionsMiddleware", # clickjacking protection via the X-Frame-Options header
#'django.middleware.security.SecurityMiddleware', # SECURE_HSTS_SECONDS, SECURE_CONTENT_TYPE_NOSNIFF, SECURE_BROWSER_XSS_FILTER, SECURE_REFERRER_POLICY, and SECURE_SSL_REDIRECT
#'troggle.core.middleware.SmartAppendSlashMiddleware' # needs adapting after Dj2.0
]
ROOT_URLCONF = "troggle.urls"
WSGI_APPLICATION = "troggle.wsgi.application" # change to asgi as soon as we upgrade to Django 3.0
ACCOUNT_ACTIVATION_DAYS = 3
# AUTH_PROFILE_MODULE = 'core.person' # used by removed profiles app ?
QM_PATTERN = "\[\[\s*[Qq][Mm]:([ABC]?)(\d{4})-(\d*)-(\d*)\]\]"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
TEST_RUNNER = "django.test.runner.DiscoverRunner"
from localsettings import *
# localsettings needs to take precedence. Call it to override any existing vars.

View File

@@ -0,0 +1,173 @@
#!/bin/bash
# Crowley has python 3.9.2
# Taken from: footled lots to make this work with python 3.10 & 3.11 and WSL1 and WSL2 on Ubuntu 22.04
# Run this in a terminal in the troggle directory: 'bash venv-trog-crowley.sh'
echo '-- DONT RUN THIS - messes up permissions!'
echo '-- Run this in a terminal in the real troggle directory: "bash venv-trog-crowley.sh"'
# use the script os-trog-crowley.sh
# If you are using Debian, then stick with the default version of python
# If you are using Ubuntu, then it is easy to use a later version of python, e.g. 3.11
# NOW we set up troggle
PYTHON=python3.9
VENAME=p9d4 # python3.x and django 4
echo "** You are logged in as `id -u -n`"
echo "The 50MB pip cache will be in /home/`id -u -n`/.cache/"
echo "The 150MB venv will created in /home/`id -u -n`/$VENAME/"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder (this script location): ${TROGDIR}"
if [ -d requirements.txt ]; then
echo "-- No requirements.txt found. Copy it from your most recent installation."
exit 1
fi
echo ## Using requirements.txt :
cat requirements.txt
echo ##
$PYTHON --version
# NOTE that when using a later or earlier verison of python, you MUST also
# use the allowed version of Pillow, see https://pillow.readthedocs.io/en/latest/installation.html
# NOW set up link from expo user folder
# needed for WSL2
echo Creating links from Linux filesystem user
# These links only need making once, for many venv
cd ~
if [ ! -d $VENAME ]; then
echo "## Creating venv $VENAME. (If this fails with a pip error, you need to ensure you have python3.11-venv installed and/or use a Ubuntu window)"
$PYTHON -m venv $VENAME
else
echo "## /$VENAME/ already exists ! Delete it first."
exit 1
fi
# Activate the virtual env and see what the default packages are
echo "### Activating $VENAME"
cd $VENAME
echo "-- now in: ${PWD}"
source bin/activate
echo "### Activated."
# update local version of pip, more recent than OS version
# debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3
# update local version of setuptools, more recent than OS version, needed for packages without wheels
echo "### installing later version of pip inside $VENAME"
$PYTHON -m pip install --upgrade pip
$PYTHON -m pip install --upgrade setuptools
PIP=pip
$PIP list > original-pip.list
$PIP freeze >original.txt
# we are in /home/$USER/$VENAME/
ln -s ${TROGDIR} troggle
ln -s ${TROGDIR}/../expoweb expoweb
ln -s ${TROGDIR}/../loser loser
ln -s ${TROGDIR}/../drawings drawings
# fudge for philip's machine
if [ -d ${TROGDIR}/../expofiles ]; then
ln -s ${TROGDIR}/../expofiles expofiles
else
if [ ! -d /mnt/f/expofiles ]; then
sudo mkdir /mnt/f
sudo mount -t drvfs F: /mnt/f
else
ln -s /mnt/f/expofiles expofiles
fi
fi
echo "### Setting file permissions.. may take a while.."
git config --global --add safe.directory '*'
#sudo chmod -R 0777 *
echo "### links to expoweb, troggle etc. complete:"
ls -tla
echo "###"
echo "### now installing ${TROGDIR}/requirements.txt"
echo "###"
# NOW THERE IS A PERMISSIONS FAILURE THAT DIDN'T HAPPEN BEFORE
# seen on wsl2 as well as wsl1
# which ALSO ruins EXISTING permissions !
# Guessing it is to do with pip not liking non-standard py 3.11 installation on Ubuntu 22.04
$PIP install -r ${TROGDIR}/requirements.txt
echo '### install from requirements.txt completed.'
echo '### '
$PIP freeze > requirements.txt
# so that we can track requirements more easily with git
# because we do not install these with pip, but they are listed by the freeze command
# Now find out what we actually installed by subtracting the stuff venv installed anyway
sort original.txt > 1
sort requirements.txt >2
comm -3 1 2 --check-order | awk '{ print $1}'>fresh-requirements.txt
rm 1
rm 2
cp requirements.txt requirements-$VENAME.txt
cp requirements-$VENAME.txt troggle/requirements-$VENAME.txt
$PIP list > installed-pip.list
$PIP list -o > installed-pip-o.list
REQ=installation-record
mkdir $REQ
mv requirements-$VENAME.txt $REQ
mv original.txt $REQ
mv requirements.txt $REQ
mv original-pip.list $REQ
mv installed-pip.list $REQ
mv installed-pip-o.list $REQ
cp fresh-requirements.txt ../requirements.txt
mv fresh-requirements.txt $REQ
cp troggle/`basename "$0"` $REQ
$PYTHON --version
python --version
echo "Django version:`django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/$VENAME'
'source bin/activate'
'cd troggle'
'django-admin'
'python manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
## the tests may ALSO fail because of ssh and permissions errors
# Ran 85 tests in 83.492s
# FAILED (failures=5)
## So you will need to run
#$sudo chown -Rhv philip:philip ~/$VENAME (if your username is philip)
# and then REBOOT (or at least, exit WSL and terminate and restart WSL)
# because this chmod only takes effect then.
'./pre-run.sh' (runs the migrations and then the tests)
'python databaseReset.py reset $VENAME'
'python manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
if [ ! -d /mnt/f/expofiles ]; then
echo '### No valid expofiles directory. Fix this before any tests will work.
fi

View File

@@ -0,0 +1,227 @@
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.
# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
# /etc/apache2/
# |-- apache2.conf
# | `-- ports.conf
# |-- mods-enabled
# | |-- *.load
# | `-- *.conf
# |-- conf-enabled
# | `-- *.conf
# `-- sites-enabled
# `-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
# together by including all remaining configuration files when starting up the
# web server.
#
# * ports.conf is always included from the main configuration file. It is
# supposed to determine listening ports for incoming connections which can be
# customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
# directories contain particular configuration snippets which manage modules,
# global configuration fragments, or virtual host configurations,
# respectively.
#
# They are activated by symlinking available configuration files from their
# respective *-available/ counterparts. These should be managed by using our
# helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
# their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
# the default configuration, apache2 needs to be started/stopped with
# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
# work with the default configuration.
# Global configuration
#
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#Mutex file:${APACHE_LOCK_DIR} default
#
# The directory where shm and other runtime files will be stored.
#
DefaultRuntimeDir ${APACHE_RUN_DIR}
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log
#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn
# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
# Include list of ports to listen on
Include ports.conf
# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

View File

@@ -0,0 +1,22 @@
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4", # To permit emojis in logbook entries and elsewhere
}, 'NAME' : 'troggle', # Or path to database file if using sqlite3.
'USER' : 'expo', # Not used with sqlite3.
'PASSWORD' : MARIADB_SERVER_PASSWORD, # Not used with sqlite3.
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}

View File

@@ -0,0 +1,47 @@
# envvars - default environment variables for apache2ctl
# this won't be correct after changing uid
unset HOME
# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi
# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=expo
export APACHE_RUN_GROUP=expo
# temporary state file location. This might be changed to /run in Wheezy+1
export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
## The locale used by some modules like mod_dav
#export LANG=C
## Uncomment the following line to use the system default locale instead:
. /etc/default/locale
export LANG
## The command to get the status for 'apache2ctl status'.
## Some packages providing 'www-browser' need '--dump' instead of '-dump'.
#export APACHE_LYNX='www-browser -dump'
## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'
## If you would like to pass arguments to the web server, add them below
## to the APACHE_ARGUMENTS environment.
#export APACHE_ARGUMENTS=''
## Enable the debug mode for maintainer scripts.
## This will produce a verbose output on package installations of web server modules and web application
## installations which interact with Apache
#export APACHE2_MAINTSCRIPT_DEBUG=1

View File

@@ -0,0 +1,179 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
NOTE this file is out of sync with troggle/_deploy/wsl/localsettings.py
which is the most recent version used in active maintenance. There should be
essential differences, but there and many, many non-essential differences which
should be eliminated for clarity and to use modern idioms.
Edited 31/12/2024
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.net" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "django-test@klebos.net"
# -----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that secret_credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
# -----------------------------------------------------------------
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4", # To permit emojis in logbook entries and elsewhere
}, 'NAME' : 'troggle', # Or path to database file if using sqlite3.
'USER' : 'expo', # Not used with sqlite3.
'PASSWORD' : MARIADB_SERVER_PASSWORD, # Not used with sqlite3.
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
REPOS_ROOT_PATH = '/home/expo/'
sys.path.append(REPOS_ROOT_PATH)
sys.path.append(REPOS_ROOT_PATH + 'troggle')
# Define the path to the django app (troggle in this case)
PYTHON_PATH = REPOS_ROOT_PATH + 'troggle/'
PHOTOS_YEAR = "2024"
# add in 358 when they don't make it crash horribly
NOTABLECAVESHREFS = [ "290", "291", "359", "264", "258", "204", "76", "107"]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
PYTHON_PATH + "templates"
],
'OPTIONS': {
'debug': 'DEBUG',
'context_processors': [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
'django.contrib.auth.context_processors.auth', # knowledge of logged-on user & permissions
'core.context.troggle_context', # in core/troggle.py
'django.template.context_processors.debug',
#'django.template.context_processors.request', # copy of current request, added in trying to make csrf work
'django.template.context_processors.i18n',
'django.template.context_processors.media', # includes a variable MEDIA_URL
'django.template.context_processors.static', # includes a variable STATIC_URL
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
],
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader', #For each app, inc admin, in INSTALLED_APPS, loader looks for /templates
# insert your own TEMPLATE_LOADERS here
]
},
},
]
PUBLIC_SITE = True
# This should be False for normal running
DEBUG = True
CACHEDPAGES = True # experimental page cache for a handful of page types
# executables:
CAVERN = 'cavern' # for parsing .svx files and producing .2d files
SURVEXPORT = 'survexport' # for parsing .3d files and producing .pos files
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
LIBDIR = Path(REPOS_ROOT_PATH) / 'lib' / PV
EXPOWEB = Path(REPOS_ROOT_PATH + 'expoweb/')
SURVEYS = REPOS_ROOT_PATH
SURVEY_SCANS = REPOS_ROOT_PATH + 'expofiles/surveyscans/'
FILES = REPOS_ROOT_PATH + 'expofiles'
PHOTOS_ROOT = REPOS_ROOT_PATH + 'expofiles/photos/'
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / 'templates'
MEDIA_ROOT = TROGGLE_PATH / 'media'
JSLIB_ROOT = TROGGLE_PATH / 'media' / 'jslib' # used for CaveViewer JS utility
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
PYTHON_PATH = REPOS_ROOT_PATH + 'troggle/'
#URL_ROOT = 'http://expo.survex.com/'
URL_ROOT = '/'
DIR_ROOT = Path("") #this should end in / if a value is given
EXPOWEB_URL = '/'
SURVEYS_URL = '/survey_scans/'
REPOS_ROOT_PATH = Path(REPOS_ROOT_PATH)
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOFILES = REPOS_ROOT_PATH / "expofiles"
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos"
#EXPOFILES = urllib.parse.urljoin(REPOS_ROOT_PATH, 'expofiles/')
PHOTOS_URL = Path(URL_ROOT, "/photos/")
#PHOTOS_URL = urllib.parse.urljoin(URL_ROOT, '/photos/')
# MEDIA_URL is used by urls.py in a regex. See urls.py & core/views_surveys.py
MEDIA_URL = '/site_media/'
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
LOGFILE = '/var/log/troggle/troggle.log' # hmm. Not used since 2022
IMPORTLOGFILE = '/var/log/troggle/import.log' # hmm. Not used since 2022
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,164 @@
import os
import sys
import urllib.parse
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
NOTE this file is out of sync with troggle/_deploy/wsl/localsettings.py
which is the most recent version used in active maintenance. There should be
essential differences, but there and many, many non-essential differences which
should be eliminated for clarity and to use modern idioms.
Edited 31/12/2024
"""
print(" * importing troggle/localsettings.py")
# DO NOT check this file into the git repo - it contains real passwords.
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4", # To permit emojis in logbook entries and elsewhere
},
'NAME' : 'troggle', # Or path to database file if using sqlite3.
'USER' : 'expo', # Not used with sqlite3.
'PASSWORD' : 'not-the-real-password', # Not used with sqlite3.
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
EXPOUSER = 'expo'
EXPOUSERPASS = 'not-the-real-password'
EXPOADMINUSER = 'expoadmin'
EXPOADMINUSERPASS = 'not-the-real-password'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
REPOS_ROOT_PATH = '/home/expo/'
sys.path.append(REPOS_ROOT_PATH)
sys.path.append(REPOS_ROOT_PATH + 'troggle')
# Define the path to the django app (troggle in this case)
PYTHON_PATH = REPOS_ROOT_PATH + 'troggle/'
PHOTOS_YEAR = "2024"
# add in 358 when they don't make it crash horribly
NOTABLECAVESHREFS = [ "290", "291", "359", "264", "258", "204", "76", "107"]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
PYTHON_PATH + "templates"
],
'OPTIONS': {
'debug': 'DEBUG',
'context_processors': [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
'django.contrib.auth.context_processors.auth', # knowledge of logged-on user & permissions
'core.context.troggle_context', # in core/troggle.py
'django.template.context_processors.debug',
#'django.template.context_processors.request', # copy of current request, added in trying to make csrf work
'django.template.context_processors.i18n',
'django.template.context_processors.media', # includes a variable MEDIA_URL
'django.template.context_processors.static', # includes a variable STATIC_URL
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
],
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader', #For each app, inc admin, in INSTALLED_APPS, loader looks for /templates
# insert your own TEMPLATE_LOADERS here
]
},
},
]
PUBLIC_SITE = True
# This should be False for normal running
DEBUG = True
CACHEDPAGES = True # experimental page cache for a handful of page types
# executables:
CAVERN = 'cavern' # for parsing .svx files and producing .2d files
SURVEXPORT = 'survexport' # for parsing .3d files and producing .pos files
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
LIBDIR = Path(REPOS_ROOT_PATH) / 'lib' / PV
EXPOWEB = Path(REPOS_ROOT_PATH + 'expoweb/')
SURVEYS = REPOS_ROOT_PATH
SURVEY_SCANS = REPOS_ROOT_PATH + 'expofiles/surveyscans/'
FILES = REPOS_ROOT_PATH + 'expofiles'
PHOTOS_ROOT = REPOS_ROOT_PATH + 'expofiles/photos/'
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / 'templates'
MEDIA_ROOT = TROGGLE_PATH / 'media'
JSLIB_ROOT = TROGGLE_PATH / 'media' / 'jslib' # used for CaveViewer JS utility
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
PYTHON_PATH = REPOS_ROOT_PATH + 'troggle/'
#URL_ROOT = 'http://expo.survex.com/'
URL_ROOT = '/'
DIR_ROOT = Path("") #this should end in / if a value is given
EXPOWEB_URL = '/'
SURVEYS_URL = '/survey_scans/'
REPOS_ROOT_PATH = Path(REPOS_ROOT_PATH)
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOFILES = REPOS_ROOT_PATH / "expofiles"
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos"
#EXPOFILES = urllib.parse.urljoin(REPOS_ROOT_PATH, 'expofiles/')
PHOTOS_URL = urllib.parse.urljoin(URL_ROOT, '/photos/')
# MEDIA_URL is used by urls.py in a regex. See urls.py & core/views_surveys.py
MEDIA_URL = '/site_media/'
STATIC_URL = urllib.parse.urljoin(URL_ROOT , '/static/') # used by Django admin pages. Do not delete.
JSLIB_URL = urllib.parse.urljoin(URL_ROOT , '/javascript/') # always fails, try to revive it ?
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
LOGFILE = '/var/log/troggle/troggle.log'
IMPORTLOGFILE = '/var/log/troggle/import.log'
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
#STATIC_URL = str(STATIC_URL) + "/"
#MEDIA_URL = str(MEDIA_URL) + "/"
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,190 @@
Instructions for setting up new expo debian server/VM
W says: Tue, Apr 23, 2024
Javascript gets installed in /usr/share/javascript. You can find that out by asking dpkg: dpkg -S openlayers (or reading debian wiki for javascript packaging)
If you use npm it just puts packages 'here' (i.e. in a node_packages dir in the current directory). I've been avoiding that so far.
openlayers wasn't in the old prospecting map - that was just JPEGs. It was in the slippy map I never really got working properly. It's also in martin's map-app.
But they were just examples of javascript packages.
=======
See also http://expo.survex.com/handbook/troggle/serverconfig.html
and troggle/README.txt
For Debian Bullseye (Debian 11) June 2022
adduser expo
apt install openssh-server mosh tmux mc zile emacs-nox mc most ncdu
apt install python-django apache2 certbot mysql-server survex make rsync
apt install libjs-openlayers
apt install git mercurial
(certbot does https certs)
for boe:
apt install libcgi-session-perl libcrypt-passwdmd5-perl libfile-slurp-perl libgit-wrapper-perl libhtml-template-perl libhtml-template-pro-perl libmime-lite-perl libtext-password-pronounceable-perl libtime-parsedate-perl libuuid-tiny-perl libcrypt-cracklib-perl
setup apache configs for cucc and expo
#disable default website
a2dissite 000-default
a2ensite cucc-ssl
a2ensite expo-ssl
#a2enmod cgid
Boe config:
Alias /boe /home/expo/boe/boc/boc.pl
<Directory /home/expo/boe/boc>
AddHandler cgi-script .pl
SetHandler cgi-script
Options +ExecCGI
Require all granted
</Directory>
And remember to set both program and data dir to be
www-data:www-data
(optionally make file group read/write by treasurer account)
create empty repo by clicking create in boe interface
then set names in 'settings'
Set up mysql (as root)
mysql -p
CREATE DATABASE troggle;
GRANT ALL PRIVILEGES ON troggle.* TO 'expo'@'localhost' IDENTIFIED BY 'somepassword';
install django:
sudo apt install python3-django python3-django-registration python3-django-imagekit python3-django-tinymce fonts-freefont-ttf libapache2-mod-wsgi-py3
python-django-imagekit comes from https://salsa.debian.org/python-team/modules/python-django-imagekit
python-django-tinymce comes from https://salsa.debian.org/python-team/modules/python-django-tinymce
(both modified for stretch/python2). packages under /home/wookey/packages/
need fonts-freefont-ttf (to have truetype freesans available for troggle via PIL)
need libapache2-mod-wsgi for apache wsgi support.
To keep bots from overloading server use mpm_event intead of mpm_worker
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
Also adjust the numbers in the config file (~/config/apache/mods-available/mpm_event.conf)
for our tiddly server:
StartServers 1
MinSpareThreads 2
MaxSpareThreads 15
ThreadLimit 25
ThreadsPerChild 5
MaxRequestWorkers 25
MaxConnectionsPerChild 500
Kanboard:
debian python3-kanboard is a bit too simple, so use http://kanboard.org/ instead
unpack release files into /home/expo/kanboard
add this stanza to ~/config/apache/expo.conf
Alias /kanboard /home/expo/kanboard
<Directory /home/expo/kanboard>
AllowOverride All
Require all granted
</Directory>
Dependencies are php and php-bcmath
php with mpm_worker and cgi is simple, but we are not using
mpm_worker any more so this is not possible anyway.
php with mpm_event needs fpm mechanism and apache proxy_fcgi enabled
This mechanism is a lot more efficient on the server.
Good docs here: https://www.digitalocean.com/community/tutorials/how-to-configure-apache-http-with-mpm-event-and-php-fpm-on-ubuntu-18-04
apt install php-fpm libapache2-mod-fcgid
sudo a2dismod php7.4 (this normal config works via mpm_worker)
sudo a2enconf php7.4-fpm (this one works with mpm_event via proxy magic)
sudo a2enmod proxy
sudo a2enmod proxy_fcgi
apt install php-bcmath (for kanboard)
------------------------------
For Debian Stretch, June 2019.
-----------------------------
adduser expo
apt install openssh-server mosh tmux mc zile emacs-nox mc most ncdu
apt install python-django apache2 mysql-server survex make rsync
apt install libjs-openlayers make
apt install git mercurial mercurial-server?
for boe:
apt install libcgi-session-perl libcrypt-passwdmd5-perl libfile-slurp-perl libgit-wrapper-perl libhtml-template-perl libhtml-template-pro-perl libmime-lite-perl libtext-password-pronounceable-perl libtime-parsedate-perl libuuid-tiny-perl libcrypt-cracklib-perl
obsolete-packages:
bins (move to jigl?) (for photos)
python-django 1.7
backports: survex therion
not-packaged: caveview
make these dirs available at top documentroot:
cuccfiles
expofiles
loser (link to repo)
tunneldata (link to repo)
troggle (link to repo)
expoweb (link to repo)
boc/boe
config
containing:
setup apache configs for cucc and expo
#disable default website
a2dissite 000-default
a2ensite cucc
a2ensite expo
a2enmod cgid
Boe config:
Alias /boe /home/expo/boe/boc/boc.pl
<Directory /home/expo/boe/boc>
AddHandler cgi-script .pl
SetHandler cgi-script
Options +ExecCGI
Require all granted
</Directory>
And remember to set both program and data dir to be
www-data:www-data
(optionally make file group read/write by treasurer account)
create empty repo by clicking create in boe interface
then set names in 'settings'
Set up mysql (as root)
mysql -p
CREATE DATABASE troggle;
GRANT ALL PRIVILEGES ON troggle.* TO 'expo'@'localhost' IDENTIFIED BY 'somepassword';
install django:
NO!
This was:sudo apt install python-django python-django-registration python-django-imagekit python-django-tinymce fonts-freefont-ttf libapache2-mod-wsgi
Should be ?
sudo apt install python-django python-django-tinymce fonts-freefont-ttf libapache2-mod-wsgi
CHeck if this is correct:
python-django-tinymce comes from https://salsa.debian.org/python-team/modules/python-django-tinymce
(both modified for stretch/python2). packages under /home/wookey/packages/
need fonts-freefont-ttf (to have truetype freesans available for troggle via PIL)
need libapache2-mod-wsgi for apache wsgi support.
On stretch the django 1.10 is no use so get rid of that:
apt remove python3-django python-django python-django-common python-django-doc
Then replace with django 1.7 (Needs to be built for stretch)
apt install python-django python-django-common python-django-doc
apt install python-django-registration python-django-imagekit python-django-tinymce
then hold them to stop them being upgraded by unattended upgrades:
echo "python-django hold" | sudo dpkg --set-selections
echo "python-django-common hold" | sudo dpkg --set-selections
echo "python-django-doc hold" | sudo dpkg --set-selections
#troggle has to have a writable logfile otherwise the website explodes
# 500 error on the server, and apache error log has non-rentrant errors
create /var/log/troggle/troggle.log
chown www-data:adm /var/log/troggle/troggle.log
chmod 660 /var/log/troggle/troggle.log

View File

@@ -0,0 +1,7 @@
# install the apport exception handler if available
try:
import apport_python_hook
except ImportError:
pass
else:
apport_python_hook.install()

View File

@@ -0,0 +1 @@
see .gitignore for those files which DO contain the secret passwords

View File

@@ -1,5 +1,8 @@
Instructions for setting up new expo debian server/VM
For Debian Stretch, June 2019.
W says: Tue, Apr 23, 2024
Javascript gets installed in /usr/share/javascript. You can find that out by asking dpkg: dpkg -S openlayers (or reading debian wiki for javascript packaging)
If you use npm it just puts packages 'here' (i.e. in a node_packages dir in the current directory). I've been avoiding that so far.
openlayers wasn't in the old prospecting map - that was just JPEGs. It was in the slippy map I never really got working properly. It's also in martin's map-app.
But they were just examples of javascript packages.
adduser expo
apt install openssh-server mosh tmux mc zile emacs-nox mc most ncdu
@@ -10,22 +13,25 @@ apt install git mercurial mercurial-server?
for boe:
apt install libcgi-session-perl libcrypt-passwdmd5-perl libfile-slurp-perl libgit-wrapper-perl libhtml-template-perl libhtml-template-pro-perl libmime-lite-perl libtext-password-pronounceable-perl libtime-parsedate-perl libuuid-tiny-perl libcrypt-cracklib-perl
obsolete-packages:
bins (move to jigl?) (for photos)
python-django 1.7
apt install ufraw for PEF image decoding.
sudo apt install python-django python-django-registration e fonts-freefont-ttf libapache2-mod-wsgi python3-gdbm
# sudo apt install python-django-imagekit python-django-tinymc
obsolete-packages: bins (move to jigl?)
older python-django?
backports: survex therion
not-packaged: caveview
make these dirs available at top documentroot:
cuccfiles
expofiles
loser (link to repo)
tunneldata (link to repo)
troggle (link to repo)
expoweb (link to repo)
loser
tunneldata
troggle
expoweb
boc/boe
config
containing:
@@ -55,13 +61,20 @@ Set up mysql (as root)
mysql -p
CREATE DATABASE troggle;
GRANT ALL PRIVILEGES ON troggle.* TO 'expo'@'localhost' IDENTIFIED BY 'somepassword';
Ctrl-D to exit
somepassword is set in localsettings.py
sudo service mariadb stop
sudo service mariadb start
to delete the database, it is
DROP DATABASE troggle;
install django:
sudo apt install python-django python-django-registration python-django-imagekit python-django-tinymce fonts-freefont-ttf libapache2-mod-wsgi
python-django-imagekit comes from https://salsa.debian.org/python-team/modules/python-django-imagekit
python-django-tinymce comes from https://salsa.debian.org/python-team/modules/python-django-tinymce
(both modified for stretch/python2). packages under /home/wookey/packages/
need fonts-freefont-ttf (to have truetype freesans available for troggle via PIL)
need libapache2-mod-wsgi for apache wsgi support.
@@ -78,8 +91,19 @@ echo "python-django hold" | sudo dpkg --set-selections
echo "python-django-common hold" | sudo dpkg --set-selections
echo "python-django-doc hold" | sudo dpkg --set-selections
#troggle has to have a writable logfile otherwise the website explodes
# 500 error on the server, and apache error log has non-rentrant errors
create /var/log/troggle/troggle.log
chown www-data:adm /var/log/troggle/troggle.log
chmod 660 /var/log/troggle/troggle.log
Optimizing server
I've tweaked the apache and mysql settings to make them a bit more suitable for a small machine. Seems to have shaved 200MB or so off the idling footprint.
https://www.narga.net/optimizing-apachephpmysql-low-memory-server/
(just discovered 'ab' for running apache performance tests - handy).
Do the edit to site-packages/django/db/backends/base.py
to comment out the requirement for mysqlclient >1.3.13
as we run perfectly happily with Django 2.2.19 & mysqlite 1.3.10
:
version = Database.version_info
#test nobbled by Wookey 2021-04-08 as 1.3.13 is not available on stable
#if version < (1, 3, 13):
# raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)

View File

@@ -1,5 +1,8 @@
# Running troggle on Docker
These notes written by Sam Wenham in Feb., 2019.
These all pre-date the move to python3, later versions of Django (1.11.+) and debian.
## Install
First you need to install
- [docker-ce](https://docs.docker.com/install/)

View File

@@ -1,4 +1,5 @@
import sys
# This is the local settings for use with the docker compose dev setup. It is imported automatically
DATABASES = {
@@ -13,7 +14,7 @@ DATABASES = {
}
EXPOUSER = 'expo'
EXPOUSERPASS = 'somepasshere'
EXPOUSERPASS = "nnn:gggggg"
EXPOUSER_EMAIL = 'wookey@wookware.org'
REPOS_ROOT_PATH = '/expo/'
@@ -23,7 +24,7 @@ sys.path.append(REPOS_ROOT_PATH + 'troggle')
PUBLIC_SITE = False
SURVEX_DATA = REPOS_ROOT_PATH + 'loser/'
TUNNEL_DATA = REPOS_ROOT_PATH + 'tunneldata/'
DRAWINGS_DATA = REPOS_ROOT_PATH + 'drawings/'
CAVERN = 'cavern'
THREEDTOPOS = '3dtopos'

View File

@@ -0,0 +1,9 @@
Django==1.7.11
django-registration==2.1.2
mysql
#imagekit
django-imagekit
Image
django-tinymce==2.7.0
smartencoding
unidecode

View File

@@ -6,3 +6,4 @@ django-imagekit
Image
django-tinymce==2.7.0
smartencoding
unidecode

View File

@@ -0,0 +1,200 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.eu" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "EXPO SERVER AUTOMATIC <django-test@klebos.eu>"
# -----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that secret_credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
# -----------------------------------------------------------------
# default values, real secrets will be imported from credentials.py in future
SQLITEFILE = "/home/philip/expo/troggle.sqlite" # can be ':memory:'
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote server. Tests are then less accurate.
# SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = "8000" # not needed as it is the default
ADMINS = (
('Philip', 'philip.sargent@klebos.eu'),
)
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent
LIBDIR = REPOS_ROOT_PATH / "lib" / PV
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / "templates"
MEDIA_ROOT = TROGGLE_PATH / "media"
JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility
# FILES = Path('/mnt/d/expofiles/')
EXPOFILES = REPOS_ROOT_PATH / "expofiles"
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos"
PHOTOS_YEAR = "2023"
NOTABLECAVESHREFS = ["290", "291", "264", "258", "204", "359", "76", "107"]
PYTHON_PATH = REPOS_ROOT_PATH / "troggle"
LOGFILE = PYTHON_PATH / "troggle.log"
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
MEDIA_URL = "/site-media/"
DIR_ROOT = Path("") # this should end in / if a value is given
URL_ROOT = "/"
# URL_ROOT = 'http://localhost:'+ SERVERPORT +'/'
# Note that these constants are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
# executables:
CAVERN = "cavern" # for parsing .svx files and producing .3d files
SURVEXPORT = "survexport" # for parsing .3d files and producing .pos files
DBSQLITE = {
"default": {
"ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"NAME": SQLITEFILE,
# 'NAME' : ':memory:',
"USER": "expo", # Not used with sqlite3.
"PASSWORD": "sekrit", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
"default": {
"ENGINE": "django.db.backends.mysql", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4",
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
"PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_PATH],
"OPTIONS": {
"debug": "DEBUG",
"context_processors": [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
"django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions
"core.context.troggle_context", # in core/context.py - only used in expedition.html
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media", # includes a variable MEDIA_URL
"django.template.context_processors.static", # includes a variable STATIC_URL used by admin pages
"django.template.context_processors.tz",
"django.template.context_processors.request", # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
"django.contrib.messages.context_processors.messages",
],
"loaders": [
"django.template.loaders.filesystem.Loader", # default lcation is troggle/templates/
"django.template.loaders.app_directories.Loader", # needed for admin 'app'
],
},
},
]
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
# EXPOWEB_URL = "" # defunct, removed.
# SCANS_URL = '/survey_scans/' # defunct, removed.
sys.path.append(str(REPOS_ROOT_PATH))
sys.path.append(str(PYTHON_PATH))
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
# TEST_RUNNER = "django.test.runner.DiscoverRunner"
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Run this in a terminal : 'bash os-survey.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
echo '###'
echo '### NOW INSTALLING tunnel and therion, go and have a cup of tea. Or a 3-course meal.'
echo '###'
sudo apt install tunnelx therion -y
sudo apt install survex-aven -y
sudo apt install gpsprune qgis -y
cd ~/expo
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

View File

@@ -0,0 +1,92 @@
#!/bin/bash
# Run this in a terminal in the troggle directory: 'bash os-trog.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
# sudo apt install python-is-python3 -y
python --version : ensure python is an alias for python3 not python2.7
ssh -V
sudo apt update -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
# Already in Ubuntu 24.04 on WSL:
# sudo apt install git -y
# sudo apt install wget gpg
# sudo apt install sftp -y
# sudo apt install openssh-client -y
# sudo apt install rsync
# Now using uv not pip:
# sudo apt install python3-pip -y
sudo apt install sqlite3 -y
sudo apt install gedit -y
sudo apt install tig gitg meld -y
# python formatting https://docs.astral.sh/ruff/
sudo snap install ruff
# # do not actually use this any more
# sudo useradd expo
# sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
# as debian does not install everything that ubuntu does, you need:
sudo apt install python3-venv -y
sudo apt install python3-dev -y
# sudo apt install python3-distutils -y
# install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
sudo apt install mariadb-server -y
sudo apt install libmariadb-dev -y
# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools
# sudo service mysql start
# We don't install the later version or the earlier versions of python - for dev and "sever mimic" environments
# we leave that to uv to install now.
# In Dec.2024, the server is running 3.11 but dev work will be using 3.13
# The setup of the virtual environment is done by troggle/_deploy/wsl/venv-trog.sh
# install VS code - but ONLY on a native ubuntu install, NOT in WSL
# sudo apt install software-properties-common apt-transport-https
# wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
# sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
# sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
# sudo apt update
# sudo apt install code
mkdir ~/expo
cd ~/expo
echo '###'
echo '### Now YOU have to configure the git settings for YOURSELF (not "expo")'
echo '### because you can't clone the repos without a key
git config --global user.email "philip.sargent@gmail.com"
git config --global user.name "Philip Sargent"
git config --global pull.rebase true
#Change this to clone using https?? at least for troggle?
git clone ssh://expo@expo.survex.com/home/expo/troggle
git clone ssh://expo@expo.survex.com/home/expo/loser
git clone ssh://expo@expo.survex.com/home/expo/expoweb
git clone ssh://expo@expo.survex.com/home/expo/drawings
mkdir expofiles
rsync -azv --delete-after --prune-empty-dirs expo@expo.survex.com:expofiles/surveyscans/ expofiles/surveyscans
rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/2018/PhilipSargent/ expofiles/photos/2018/PhilipSargent
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

63
_deploy/okchai/pre-push.sh Executable file
View File

@@ -0,0 +1,63 @@
#! /bin/bash
# create and sanitise files for pushing to repo
# catatrophically forgot to sanitize localsettingsWSL.py - oops.
#Make sure you have the WSL permissions system working, or you will push unsanitized files as this will fail
# Philip Sargent 2022/04/12
HOSTNAME=`hostname`
echo "** This copies file to _deploy/${HOSTNAME}/ !"
cd ..
cd troggle
echo `pwd`
echo deprecations.
PYTHON="uv run"
source .venv/bin/activate
python3 -Wall manage.py check -v 3 2>deprecations.txt >/dev/null
deactivate
echo diffsettings.
rm diffsettings.txt
if test -f "diffsettings.txt"; then
echo "diffsettings.txt not deleted. You have a serious permissions problem. Aborting.."
exit
fi
$PYTHON manage.py diffsettings | grep "###" > diffsettings.txt
echo inspectdb.
# this next line requires database setting to be troggle.sqlite:
$PYTHON manage.py inspectdb > troggle-inspectdb.py
#egrep -in "unable|error" troggle-inspectdb.py
echo remove passwords.
cp localsettings.py localsettings-${HOSTNAME}.py
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EXPOUSERPASS = \"nnn:gggggg\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EXPOUSERPASS = \"gggggg:nnn\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EMAIL_HOST_PASSWORD = \"real-email-password--imported-from-localsettings.py\""
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' diffsettings.txt
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: SECRET_KEY = \"real-SECRET_KEY--imported-from-localsettings.py\""
mkdir -p _deploy/${HOSTNAME}
mv _deploy/${HOSTNAME}/localsettings-${HOSTNAME}.py _deploy/${HOSTNAME}/localsettings-${HOSTNAME}.py.bak
mv localsettings-${HOSTNAME}.py _deploy/${HOSTNAME}
cp *.sh _deploy/${HOSTNAME}
#
# Do these before final testing, *not* just before pushing:
# in ./pre-run.sh
# $PYTHON reset-django.py
# $PYTHON manage.py makemigrations
# $PYTHON manage.py test
# $PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -i "unable|error" troggle-inspectdb.py

36
_deploy/okchai/pre-run.sh Executable file
View File

@@ -0,0 +1,36 @@
#! /bin/bash
# Do these before final testing, *not* just before pushing:
# Need to be in an ALREADY activated venv
PYTHON="python"
echo "** Run inspectdb:"
$PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -in "unable|error" troggle-inspectdb.py
echo ""
# count non-blank lines of python and template HTML code
# includes all variants of settings.py files
# fix this as core/utils.py has 28,000 lines of numbers.
find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt
find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | grep -v "/migrations/" |grep -v "troggle-inspectdb.py"| awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt
echo "** Run reset-django.py - which deletes the database"
# This deletes the database so must run after generating troggle-inspectdb.py
$PYTHON reset-django.py
echo "** After cleanup deletion, remake all migrations."
$PYTHON manage.py makemigrations >/dev/null
$PYTHON manage.py migrate
echo "** Now running self check"
$PYTHON manage.py check -v 3 --deploy 2>security-warnings.txt >/dev/null
$PYTHON manage.py check -v 3 --deploy
echo "** Now running test suite"
# $PYTHON manage.py test -v 1
echo ""
echo `tail -1 lines-of-python.txt` non-comment lines of python. But core/utils.py has 28,000 lines of numbers.
echo `tail -1 lines-of-templates.txt` non-comment lines of HTML templates.
echo '** If you have an error running manage.py, maybe you are not in an activated venv ?'

View File

@@ -0,0 +1,53 @@
#!/bin/bash
# now using uv, unbelieveably simpler.
# Run this in a terminal in ~/expo above the troggle directory: 'bash ~/expo/venv-trog.sh'
echo '-- Run this in a terminal in the directory above the troggle directory: "bash ~/expo/venv-trog.sh"'
# Expects an Ubuntu 24.04 with all the gubbins already installed
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog24.04.sh runniing it in /home/username/
python3 --version
cd ~/expo/troggle
echo "-- EXPO folder [current directory]: `pwd`"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder: ${TROGDIR}"
cp dev.toml pyproject.toml
cp ~/expo/troggle/_deploy/wsl/localsettingsWSL.py ~/expo/troggle/localsettings.py
uv self update
uv sync
# fudge for philip's laptop prior to M2 SSD upgrade
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
uv pip list
echo "Django version:`uv run django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/expo/troggle'
'uv run django-admin'
'uv run manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
'uv run manage.py test -v 2'
'./pre-run.sh' (runs the tests again)
'uv run databaseReset.py reset INIT'
'uv run manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
# if [ ! -d /mnt/d/expofiles ]; then
# echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.'
# fi

View File

@@ -0,0 +1,183 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
# MARIADB_SERVER_PASSWORD =
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.eu" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "EXPO SERVER AUTOMATIC <django-test@klebos.eu>"
# -----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that secret_credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
# -----------------------------------------------------------------
# default values, real secrets will be imported from credentials.py in future
SQLITEFILE = str(Path(__file__).parent.parent / "troggle.sqlite") # can be ':memory:'
print(f"SQLITEFILE is {SQLITEFILE}")
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote server. Tests are then less accurate.
# SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = "8000" # not needed as it is the default
ADMINS = (
('Philip', 'philip.sargent@klebos.eu'), # only on dev
)
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent # folder above troggle, expoweb, drawings, loser
LIBDIR = REPOS_ROOT_PATH / "lib" / PV
sys.path.append(str(REPOS_ROOT_PATH))
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / "templates"
MEDIA_ROOT = TROGGLE_PATH / "media"
JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility
EXPOFILES = REPOS_ROOT_PATH / "expofiles" # sometimes on a different filesystem
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos" # sometimes on a different filesystem
PHOTOS_YEAR = "2025"
KMZ_ICONS_PATH = REPOS_ROOT_PATH / "troggle" / "kmz_icons" # Google Earth export in /caves/
# URL that handles the media served from MEDIA_ROOT.
# Note that MEDIA_URL and PHOTOS_URL are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
URL_ROOT = "/"
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
DBSQLITE = {
"default": {
"ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"NAME": SQLITEFILE,
# 'NAME' : ':memory:',
"USER": "expo", # Not used with sqlite3.
"PASSWORD": "sekrit", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
"default": {
"ENGINE": "django.db.backends.mysql", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4",
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
"PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_PATH],
"OPTIONS": {
"debug": "DEBUG",
"context_processors": [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
"django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions
"core.context.troggle_context", # in core/context.py - only used in expedition.html
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media", # includes a variable MEDIA_URL
"django.template.context_processors.static", # includes a variable STATIC_URL used by admin pages
"django.template.context_processors.tz",
"django.template.context_processors.request", # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
"django.contrib.messages.context_processors.messages",
],
"loaders": [
"django.template.loaders.filesystem.Loader", # default lcation is troggle/templates/
"django.template.loaders.app_directories.Loader", # needed for admin 'app'
],
},
},
]
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,183 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
# MARIADB_SERVER_PASSWORD =
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.eu" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "EXPO SERVER AUTOMATIC <django-test@klebos.eu>"
# -----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that secret_credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
# -----------------------------------------------------------------
# default values, real secrets will be imported from credentials.py in future
SQLITEFILE = str(Path(__file__).parent.parent / "troggle.sqlite") # can be ':memory:'
print(f"SQLITEFILE is {SQLITEFILE}")
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote server. Tests are then less accurate.
# SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = "8000" # not needed as it is the default
ADMINS = (
('Philip', 'philip.sargent@klebos.eu'), # only on dev
)
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent # folder above troggle, expoweb, drawings, loser
LIBDIR = REPOS_ROOT_PATH / "lib" / PV
sys.path.append(str(REPOS_ROOT_PATH))
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / "templates"
MEDIA_ROOT = TROGGLE_PATH / "media"
JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility
EXPOFILES = REPOS_ROOT_PATH / "expofiles" # sometimes on a different filesystem
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos" # sometimes on a different filesystem
PHOTOS_YEAR = "2025"
KMZ_ICONS_PATH = REPOS_ROOT_PATH / "troggle" / "kmz_icons" # Google Earth export in /caves/
# URL that handles the media served from MEDIA_ROOT.
# Note that MEDIA_URL and PHOTOS_URL are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
URL_ROOT = "/"
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
DBSQLITE = {
"default": {
"ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"NAME": SQLITEFILE,
# 'NAME' : ':memory:',
"USER": "expo", # Not used with sqlite3.
"PASSWORD": "sekrit", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
"default": {
"ENGINE": "django.db.backends.mysql", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4",
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
"PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_PATH],
"OPTIONS": {
"debug": "DEBUG",
"context_processors": [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
"django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions
"core.context.troggle_context", # in core/context.py - only used in expedition.html
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media", # includes a variable MEDIA_URL
"django.template.context_processors.static", # includes a variable STATIC_URL used by admin pages
"django.template.context_processors.tz",
"django.template.context_processors.request", # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
"django.contrib.messages.context_processors.messages",
],
"loaders": [
"django.template.loaders.filesystem.Loader", # default lcation is troggle/templates/
"django.template.loaders.app_directories.Loader", # needed for admin 'app'
],
},
},
]
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Run this in a terminal : 'bash os-survey.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
echo '###'
echo '### NOW INSTALLING tunnel and therion, go and have a cup of tea. Or a 3-course meal.'
echo '###'
sudo apt install tunnelx therion -y
sudo apt install survex-aven -y
sudo apt install gpsprune qgis -y
cd ~/expo
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

View File

@@ -0,0 +1,92 @@
#!/bin/bash
# Run this in a terminal in the troggle directory: 'bash os-trog.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
# sudo apt install python-is-python3 -y
python --version : ensure python is an alias for python3 not python2.7
ssh -V
sudo apt update -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
# Already in Ubuntu 24.04 on WSL:
# sudo apt install git -y
# sudo apt install wget gpg
# sudo apt install sftp -y
# sudo apt install openssh-client -y
# sudo apt install rsync
# Now using uv not pip:
# sudo apt install python3-pip -y
sudo apt install sqlite3 -y
sudo apt install gedit -y
sudo apt install tig gitg meld -y
# python formatting https://docs.astral.sh/ruff/
sudo snap install ruff
# # do not actually use this any more
# sudo useradd expo
# sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
# as debian does not install everything that ubuntu does, you need:
sudo apt install python3-venv -y
sudo apt install python3-dev -y
# sudo apt install python3-distutils -y
# install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
sudo apt install mariadb-server -y
sudo apt install libmariadb-dev -y
# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools
# sudo service mysql start
# We don't install the later version or the earlier versions of python - for dev and "sever mimic" environments
# we leave that to uv to install now.
# In Dec.2024, the server is running 3.11 but dev work will be using 3.13
# The setup of the virtual environment is done by troggle/_deploy/wsl/venv-trog.sh
# install VS code - but ONLY on a native ubuntu install, NOT in WSL
# sudo apt install software-properties-common apt-transport-https
# wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
# sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
# sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
# sudo apt update
# sudo apt install code
mkdir ~/expo
cd ~/expo
echo '###'
echo '### Now YOU have to configure the git settings for YOURSELF (not "expo")'
echo '### because you can't clone the repos without a key
git config --global user.email "philip.sargent@gmail.com"
git config --global user.name "Philip Sargent"
git config --global pull.rebase true
#Change this to clone using https?? at least for troggle?
git clone ssh://expo@expo.survex.com/home/expo/troggle
git clone ssh://expo@expo.survex.com/home/expo/loser
git clone ssh://expo@expo.survex.com/home/expo/expoweb
git clone ssh://expo@expo.survex.com/home/expo/drawings
mkdir expofiles
rsync -azv --delete-after --prune-empty-dirs expo@expo.survex.com:expofiles/surveyscans/ expofiles/surveyscans
rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/2018/PhilipSargent/ expofiles/photos/2018/PhilipSargent
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

63
_deploy/pulsifer/pre-push.sh Executable file
View File

@@ -0,0 +1,63 @@
#! /bin/bash
# create and sanitise files for pushing to repo
# catatrophically forgot to sanitize localsettingsWSL.py - oops.
#Make sure you have the WSL permissions system working, or you will push unsanitized files as this will fail
# Philip Sargent 2022/04/12
HOSTNAME=`hostname`
echo "** This copies file to _deploy/${HOSTNAME}/ !"
cd ..
cd troggle
echo `pwd`
echo deprecations.
PYTHON="uv run"
source .venv/bin/activate
python3 -Wall manage.py check -v 3 2>deprecations.txt >/dev/null
deactivate
echo diffsettings.
rm diffsettings.txt
if test -f "diffsettings.txt"; then
echo "diffsettings.txt not deleted. You have a serious permissions problem. Aborting.."
exit
fi
$PYTHON manage.py diffsettings | grep "###" > diffsettings.txt
echo inspectdb.
# this next line requires database setting to be troggle.sqlite:
$PYTHON manage.py inspectdb > troggle-inspectdb.py
#egrep -in "unable|error" troggle-inspectdb.py
echo remove passwords.
cp localsettings.py localsettings-${HOSTNAME}.py
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EXPOUSERPASS = \"nnn:gggggg\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EXPOUSERPASS = \"gggggg:nnn\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: EMAIL_HOST_PASSWORD = \"real-email-password--imported-from-localsettings.py\""
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' diffsettings.txt
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' localsettings-${HOSTNAME}.py
echo " reset: SECRET_KEY = \"real-SECRET_KEY--imported-from-localsettings.py\""
mkdir -p _deploy/${HOSTNAME}
mv _deploy/${HOSTNAME}/localsettings-${HOSTNAME}.py _deploy/${HOSTNAME}/localsettings-${HOSTNAME}.py.bak
mv localsettings-${HOSTNAME}.py _deploy/${HOSTNAME}
cp *.sh _deploy/${HOSTNAME}
#
# Do these before final testing, *not* just before pushing:
# in ./pre-run.sh
# $PYTHON reset-django.py
# $PYTHON manage.py makemigrations
# $PYTHON manage.py test
# $PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -i "unable|error" troggle-inspectdb.py

36
_deploy/pulsifer/pre-run.sh Executable file
View File

@@ -0,0 +1,36 @@
#! /bin/bash
# Do these before final testing, *not* just before pushing:
# Changed to use uv not pip, requires manage.py to have uv structured uv comment in it.
PYTHON="uv run"
echo "** Run inspectdb:"
$PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -in "unable|error" troggle-inspectdb.py
echo ""
# count non-blank lines of python and template HTML code
# includes all variants of settings.py files
# fix this as core/utils.py has 28,000 lines of numbers.
find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt
find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | grep -v "/migrations/" |grep -v "troggle-inspectdb.py"| awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt
echo "** Run reset-django.py - which deletes the database"
# This deletes the database so must run after generating troggle-inspectdb.py
$PYTHON reset-django.py
echo "** After cleanup deletion, remake all migrations."
$PYTHON manage.py makemigrations >/dev/null
$PYTHON manage.py migrate
echo "** Now running self check"
$PYTHON manage.py check -v 3 --deploy 2>security-warnings.txt >/dev/null
$PYTHON manage.py check -v 3 --deploy
echo "** Now running test suite"
# $PYTHON manage.py test -v 1
echo ""
echo `tail -1 lines-of-python.txt` non-comment lines of python.
echo `tail -1 lines-of-templates.txt` non-comment lines of HTML templates.
echo '** If you have an error running manage.py, maybe you are not in an activated venv ? or your manage.py is not managed by uv properly ?'

View File

@@ -0,0 +1,53 @@
#!/bin/bash
# now using uv, unbelieveably simpler.
# Run this in a terminal in ~/expo above the troggle directory: 'bash ~/expo/venv-trog.sh'
echo '-- Run this in a terminal in the directory above the troggle directory: "bash ~/expo/venv-trog.sh"'
# Expects an Ubuntu 24.04 with all the gubbins already installed
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog24.04.sh runniing it in /home/username/
python3 --version
cd ~/expo/troggle
echo "-- EXPO folder [current directory]: `pwd`"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder: ${TROGDIR}"
cp dev.toml pyproject.toml
cp ~/expo/troggle/_deploy/wsl/localsettingsWSL.py ~/expo/troggle/localsettings.py
uv self update
uv sync
# fudge for philip's laptop prior to M2 SSD upgrade
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
uv pip list
echo "Django version:`uv run django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/expo/troggle'
'uv run django-admin'
'uv run manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
'uv run manage.py test -v 2'
'./pre-run.sh' (runs the tests again)
'uv run databaseReset.py reset INIT'
'uv run manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
# if [ ! -d /mnt/d/expofiles ]; then
# echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.'
# fi

24
_deploy/readme.txt Normal file
View File

@@ -0,0 +1,24 @@
2024-12-15 Philip Sargent
You will need your own localsettings.py but they are all out of date in these
subdirectories except for /wsl/ . So copy that to /troggle/ and make your own
edits to make it work with your own machine and file whereabouts.
- settings.py
is common to all configurations,
but these are different:
- localsettings.py
- dev.toml
2023-07-17 Philip Sargent
Trying to sort out configurations as we got into a bit of a mess on
Expo in the last couple of weeks with two (notionally identical Debian
Bullseye) expo laptops Crowley (which has local troggle installed and
can run locally) and Aziraphale (has local copy of troggle repo but is
not configured to run locally), Martin Green's laptop (Ubuntu 22.04.2),
Philip's Barbie laptop Ubuntu 22.04.3). And of course the server itself
expo.survex.com which is running Debian Bullseye. But most development
recently had been done on Philip's two other machines, desktop and PC,
both running Ubuntu on WSL on Windows and both using venv environments,
which Crowley also does.

View File

@@ -1,6 +1,11 @@
import sys
# link localsettings to this file for use on expo computer in austria
# This will ALL NEED TO BE CHANGED to match localsettingsWSL / python3 / Django v2.2
# This WILL NOT WORK as it is for an earlier version of Django
# consult localsettingsWSL for updates required.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
@@ -13,7 +18,7 @@ DATABASES = {
}
EXPOUSER = 'expo'
EXPOUSERPASS = 'realpasshere'
EXPOUSERPASS = "nnn:gggggg"
EXPOUSER_EMAIL = 'wookey@wookware.org'
REPOS_ROOT_PATH = '/home/expo/expofiles/'
@@ -24,7 +29,7 @@ sys.path.append(REPOS_ROOT_PATH + 'troggle')
PUBLIC_SITE = False
SURVEX_DATA = REPOS_ROOT_PATH + 'loser/'
TUNNEL_DATA = REPOS_ROOT_PATH + 'tunneldata/'
DRAWINGS_DATA = REPOS_ROOT_PATH + 'drawings/'
THREEDCACHEDIR = REPOS_ROOT_PATH + 'expowebcache/3d/'
CAVERN = 'cavern'

View File

@@ -0,0 +1,3 @@
The copy in this /_deploy/ folder may not be the latest if active development
has been going on in the parent folder. Check there for a later copy of
the localsettingsWSL file.

18
_deploy/wsl/gitpull.sh Executable file
View File

@@ -0,0 +1,18 @@
#! /bin/bash
echo troggle
cd ~/expo/troggle
git pull
echo expoweb
cd ../expoweb
git pull
echo drawings
cd ../drawings
git pull
cd ../loser
echo loser
git pull
cd ../troggle

View File

@@ -0,0 +1,182 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
# MARIADB_SERVER_PASSWORD =
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.eu" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "EXPO SERVER AUTOMATIC <django-test@klebos.eu>"
# -----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that secret_credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
# -----------------------------------------------------------------
# default values, real secrets will be imported from credentials.py in future
SQLITEFILE = "/home/philip/expo/troggle.sqlite" # can be ':memory:'
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote server. Tests are then less accurate.
# SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = "8000" # not needed as it is the default
ADMINS = (
('Philip', 'philip.sargent@klebos.eu'), # only on dev
)
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent # folder above troggle, expoweb, drawings, loser
LIBDIR = REPOS_ROOT_PATH / "lib" / PV
sys.path.append(str(REPOS_ROOT_PATH))
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / "templates"
MEDIA_ROOT = TROGGLE_PATH / "media"
JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility
EXPOFILES = REPOS_ROOT_PATH / "expofiles" # sometimes on a different filesystem
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos" # sometimes on a different filesystem
PHOTOS_YEAR = "2025"
KMZ_ICONS_PATH = REPOS_ROOT_PATH / "troggle" / "kmz_icons" # Google Earth export in /caves/
# URL that handles the media served from MEDIA_ROOT.
# Note that MEDIA_URL and PHOTOS_URL are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
URL_ROOT = "/"
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
DBSQLITE = {
"default": {
"ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"NAME": SQLITEFILE,
# 'NAME' : ':memory:',
"USER": "expo", # Not used with sqlite3.
"PASSWORD": "sekrit", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
"default": {
"ENGINE": "django.db.backends.mysql", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4",
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
"PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_PATH],
"OPTIONS": {
"debug": "DEBUG",
"context_processors": [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
"django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions
"core.context.troggle_context", # in core/context.py - only used in expedition.html
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media", # includes a variable MEDIA_URL
"django.template.context_processors.static", # includes a variable STATIC_URL used by admin pages
"django.template.context_processors.tz",
"django.template.context_processors.request", # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
"django.contrib.messages.context_processors.messages",
],
"loaders": [
"django.template.loaders.filesystem.Loader", # default lcation is troggle/templates/
"django.template.loaders.app_directories.Loader", # needed for admin 'app'
],
},
},
]
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
print(" + finished importing troggle/localsettings.py")

View File

@@ -0,0 +1,182 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
EXPOUSER = 'expo'
EXPOADMINUSER = 'expoadmin'
EXPOUSER_EMAIL = 'wookey@wookware.org'
EXPOADMINUSER_EMAIL = 'wookey@wookware.org'
from secret_credentials import *
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
# MARIADB_SERVER_PASSWORD =
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.eu" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "EXPO SERVER AUTOMATIC <django-test@klebos.eu>"
# -----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that secret_credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
# -----------------------------------------------------------------
# default values, real secrets will be imported from credentials.py in future
SQLITEFILE = "/home/philip/expo/troggle.sqlite" # can be ':memory:'
PHOTOSREMOTE = False # if True, then re-routes urls in expofiles/photos to remote server. Not implemented yet
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote server. Tests are then less accurate.
# SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = "8000" # not needed as it is the default
ADMINS = (
('Philip', 'philip.sargent@klebos.eu'), # only on dev
)
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent # folder above troggle, expoweb, drawings, loser
LIBDIR = REPOS_ROOT_PATH / "lib" / PV
sys.path.append(str(REPOS_ROOT_PATH))
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / "templates"
MEDIA_ROOT = TROGGLE_PATH / "media"
JSLIB_ROOT = TROGGLE_PATH / "media" / "jslib" # used for CaveViewer JS utility
EXPOFILES = REPOS_ROOT_PATH / "expofiles" # sometimes on a different filesystem
SCANS_ROOT = EXPOFILES / "surveyscans"
PHOTOS_ROOT = EXPOFILES / "photos" # sometimes on a different filesystem
PHOTOS_YEAR = "2025"
KMZ_ICONS_PATH = REPOS_ROOT_PATH / "troggle" / "kmz_icons" # Google Earth export in /caves/
# URL that handles the media served from MEDIA_ROOT.
# Note that MEDIA_URL and PHOTOS_URL are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
URL_ROOT = "/"
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
DBSQLITE = {
"default": {
"ENGINE": "django.db.backends.sqlite3", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"NAME": SQLITEFILE,
# 'NAME' : ':memory:',
"USER": "expo", # Not used with sqlite3.
"PASSWORD": "sekrit", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
"default": {
"ENGINE": "django.db.backends.mysql", # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
"OPTIONS": {
"charset": "utf8mb4",
},
"NAME": "troggle", # Or path to database file if using sqlite3.
"USER": "expo",
"PASSWORD": MARIADB_SERVER_PASSWORD,
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_PATH],
"OPTIONS": {
"debug": "DEBUG",
"context_processors": [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
"django.contrib.auth.context_processors.auth", # knowledge of logged-on user & permissions
"core.context.troggle_context", # in core/context.py - only used in expedition.html
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media", # includes a variable MEDIA_URL
"django.template.context_processors.static", # includes a variable STATIC_URL used by admin pages
"django.template.context_processors.tz",
"django.template.context_processors.request", # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
"django.contrib.messages.context_processors.messages",
],
"loaders": [
"django.template.loaders.filesystem.Loader", # default lcation is troggle/templates/
"django.template.loaders.app_directories.Loader", # needed for admin 'app'
],
},
},
]
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
# Sanitise these to be strings as Django seems to be particularly sensitive to crashing if they aren't
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
#TINY_MCE_MEDIA_ROOT = STATIC_ROOT + '/tiny_mce/' # not needed while TinyMCE not installed
#TINY_MCE_MEDIA_URL = STATIC_URL + '/tiny_mce/' # not needed while TinyMCE not installed
print(" + finished importing troggle/localsettings.py")

22
_deploy/wsl/os-survey.sh Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Run this in a terminal : 'bash os-survey.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
echo '###'
echo '### NOW INSTALLING tunnel and therion, go and have a cup of tea. Or a 3-course meal.'
echo '###'
sudo apt install tunnelx therion -y
sudo apt install survex-aven -y
sudo apt install gpsprune qgis -y
cd ~/expo
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

92
_deploy/wsl/os-trog24.04.sh Executable file
View File

@@ -0,0 +1,92 @@
#!/bin/bash
# Run this in a terminal in the troggle directory: 'bash os-trog.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in your home directory: "bash os-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 24.04 relatively clean install.
# 24.04 has python 3.12
# sudo apt install python-is-python3 -y
python --version : ensure python is an alias for python3 not python2.7
ssh -V
sudo apt update -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
# Already in Ubuntu 24.04 on WSL:
# sudo apt install git -y
# sudo apt install wget gpg
# sudo apt install sftp -y
# sudo apt install openssh-client -y
# sudo apt install rsync
# Now using uv not pip:
# sudo apt install python3-pip -y
sudo apt install sqlite3 -y
sudo apt install gedit -y
sudo apt install tig gitg meld -y
# python formatting https://docs.astral.sh/ruff/
sudo snap install ruff
# # do not actually use this any more
# sudo useradd expo
# sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
# as debian does not install everything that ubuntu does, you need:
sudo apt install python3-venv -y
sudo apt install python3-dev -y
# sudo apt install python3-distutils -y
# install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
sudo apt install mariadb-server -y
sudo apt install libmariadb-dev -y
# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools
# sudo service mysql start
# We don't install the later version or the earlier versions of python - for dev and "sever mimic" environments
# we leave that to uv to install now.
# In Dec.2024, the server is running 3.11 but dev work will be using 3.13
# The setup of the virtual environment is done by troggle/_deploy/wsl/venv-trog.sh
# install VS code - but ONLY on a native ubuntu install, NOT in WSL
# sudo apt install software-properties-common apt-transport-https
# wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
# sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
# sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
# sudo apt update
# sudo apt install code
mkdir ~/expo
cd ~/expo
echo '###'
echo '### Now YOU have to configure the git settings for YOURSELF (not "expo")'
echo '### because you can't clone the repos without a key
git config --global user.email "philip.sargent@gmail.com"
git config --global user.name "Philip Sargent"
git config --global pull.rebase true
#Change this to clone using https?? at least for troggle?
git clone ssh://expo@expo.survex.com/home/expo/troggle
git clone ssh://expo@expo.survex.com/home/expo/loser
git clone ssh://expo@expo.survex.com/home/expo/expoweb
git clone ssh://expo@expo.survex.com/home/expo/drawings
mkdir expofiles
rsync -azv --delete-after --prune-empty-dirs expo@expo.survex.com:expofiles/surveyscans/ expofiles/surveyscans
rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/2018/PhilipSargent/ expofiles/photos/2018/PhilipSargent
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" --exclude="mapapp" expo@expo.survex.com:expofiles/ expofiles
# rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.survex.com:expofiles/photos/ expofiles/photos

62
_deploy/wsl/pre-push.sh Normal file
View File

@@ -0,0 +1,62 @@
#! /bin/bash
# create and sanitise files for pushing to repo
# catatrophically forgot to sanitize localsettingsWSL.py - oops.
#Make sure you have the WSL permissions system working, or you will push unsanitized files as this will fail
# Philip Sargent 2022/04/12
echo "** This copies file to _deploy/wsl/ !"
HOSTNAME=`hostname`
echo "** This copies file to _deploy/${HOSTNAME}/ !"
cd ..
cd troggle
echo `pwd`
echo deprecations.
PYTHON="uv run"
source .venv/bin/activate
python3 -Wall manage.py check -v 3 2>deprecations.txt >/dev/null
deactivate
echo diffsettings.
rm diffsettings.txt
if test -f "diffsettings.txt"; then
echo "diffsettings.txt not deleted. You have a serious permissions problem. Aborting.."
exit
fi
$PYTHON manage.py diffsettings | grep "###" > diffsettings.txt
echo inspectdb.
# this next line requires database setting to be troggle.sqlite:
$PYTHON manage.py inspectdb > troggle-inspectdb.py
#egrep -in "unable|error" troggle-inspectdb.py
echo remove passwords.
cp localsettings.py localsettingsWSL.py
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOUSERPASS/ s/^.*$/EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"/' localsettingsWSL.py
echo " reset: EXPOUSERPASS = \"nnn:gggggg\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EXPOADMINUSERPASS/ s/^.*$/EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"/' localsettingsWSL.py
echo " reset: EXPOUSERPASS = \"gggggg:nnn\" - real-expo-password---imported-from-localsettings.py"
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' diffsettings.txt
sed -i '/EMAIL_HOST_PASSWORD/ s/^.*$/EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"/' localsettingsWSL.py
echo " reset: EMAIL_HOST_PASSWORD = \"real-email-password--imported-from-localsettings.py\""
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' diffsettings.txt
sed -i '/SECRET_KEY/ s/^.*$/SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"/' localsettingsWSL.py
echo " reset: SECRET_KEY = \"real-SECRET_KEY--imported-from-localsettings.py\""
mv _deploy/wsl/localsettingsWSL.py _deploy/wsl/localsettingsWSL.py.bak
mv localsettingsWSL.py _deploy/wsl
cp *.sh _deploy/wsl
#
# Do these before final testing, *not* just before pushing:
# in ./pre-run.sh
# $PYTHON reset-django.py
# $PYTHON manage.py makemigrations
# $PYTHON manage.py test
# $PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -i "unable|error" troggle-inspectdb.py

36
_deploy/wsl/pre-run.sh Normal file
View File

@@ -0,0 +1,36 @@
#! /bin/bash
# Do these before final testing, *not* just before pushing:
# Need to be in an ALREADY activated venv
PYTHON="python"
echo "** Run inspectdb:"
$PYTHON manage.py inspectdb > troggle-inspectdb.py
# egrep -in "unable|error" troggle-inspectdb.py
echo ""
# count non-blank lines of python and template HTML code
# includes all variants of settings.py files
# fix this as core/utils.py has 28,000 lines of numbers.
find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt
find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v ".venv" | grep -v "/migrations/" |grep -v "troggle-inspectdb.py"| awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt
echo "** Run reset-django.py - which deletes the database"
# This deletes the database so must run after generating troggle-inspectdb.py
$PYTHON reset-django.py
echo "** After cleanup deletion, remake all migrations."
$PYTHON manage.py makemigrations >/dev/null
$PYTHON manage.py migrate
echo "** Now running self check"
$PYTHON manage.py check -v 3 --deploy 2>security-warnings.txt >/dev/null
$PYTHON manage.py check -v 3 --deploy
echo "** Now running test suite"
# $PYTHON manage.py test -v 1
echo ""
echo `tail -1 lines-of-python.txt` non-comment lines of python. But core/utils.py has 28,000 lines of numbers.
echo `tail -1 lines-of-templates.txt` non-comment lines of HTML templates.
echo '** If you have an error running manage.py, maybe you are not in an activated venv ?'

View File

@@ -0,0 +1,12 @@
asgiref==3.3.4
confusable-homoglyphs==3.2.0
coverage==5.5
Django==3.2.12
docutils==0.14
gunicorn==20.1.0
Pillow==9.0.1
pytz==2019.1
reportlab==3.6.8
sqlparse==0.2.4
typing-extensions==3.7.4.3
Unidecode==1.0.23

View File

@@ -0,0 +1,20 @@
# Philip bleeding edge config
asgiref==3.6.0
beautifulsoup4==4.12.2
black==23.1.0
click==8.1.3
coverage==7.1.0
Django==4.2
docutils==0.19
isort==5.12.0
mypy-extensions==1.0.0
packaging==23.0
pathspec==0.11.0
Pillow==9.4.0
platformdirs==3.0.0
pytz==2022.7
ruff==0.0.245
soupsieve==2.4.1
sqlparse==0.4.3
Unidecode==1.3.6
piexif==1.1.3

View File

@@ -0,0 +1,44 @@
For debian bullseye (10)
python3-django (3.2.12)
tinymce (from where?)
mariadb-server
apache2
libapache2-mod-wsgi-py3
python3-django-registration ?
Django==1.7
django-extensions==2.2.9
django-registration==2.0
django-tinymce==2.0.1
six==1.14.0
Unidecode==1.1.1 python3-unidecode
Pillow==7.1.2 python3-willow
asgiref==3.7.2
attrs==22.2.0
beautifulsoup4==4.12.2
black==23.11.0
bs4==0.0.1
click==8.1.3
colorama==0.4.6
coverage==6.5.0
Django==5.0
docutils==0.20
interrogate==1.5.0
isort==5.11.4
mypy-extensions==0.4.3
packaging==23.2
pathspec==0.10.3
piexif==1.1.3
Pillow==10.1.0
platformdirs==2.6.2
py==1.11.0
pytz==2022.6
ruff==0.1.0
soupsieve==2.5
sqlparse==0.4.0
tabulate==0.9.0
toml==0.10.2
typing_extensions==4.4.0
Unidecode==1.3.6

View File

@@ -0,0 +1,17 @@
asgiref==3.6.0
black==23.1.0
click==8.1.3
coverage==7.1.0
Django==4.2
docutils==0.19
isort==5.12.0
mypy-extensions==1.0.0
packaging==23.0
pathspec==0.11.0
Pillow==9.4.0
platformdirs==3.0.0
pytz==2022.7
ruff==0.0.245
sqlparse==0.4.3
tomli==2.0.1
Unidecode==1.3.6

View File

@@ -0,0 +1,9 @@
asgiref==3.5.2
coverage==6.5.0
Django==3.2.16
docutils==0.19
Pillow==9.3.0
pytz==2022.6
sqlparse==0.4.3
typing_extensions==4.4.0
Unidecode==1.3.6

View File

@@ -0,0 +1,3 @@
asgiref==3.8.1
Django==5.1b1
sqlparse==0.5.1

View File

@@ -0,0 +1,21 @@
asgiref==3.6.0
beautifulsoup4==4.12.0
black==23.1.0
chardet==5.1.0
click==8.1.0
coverage==7.1.0
deptry==0.12.0
Django==4.2
docutils==0.19
isort==5.12.0
mypy-extensions==1.0.0
packaging==23.0
pathspec==0.11.0
piexif==1.1.3
Pillow==9.4.0
platformdirs==3.0.0
pytz==2022.7
ruff==0.0.245
soupsieve==2.5
sqlparse==0.4.0
Unidecode==1.3.0

View File

@@ -0,0 +1,21 @@
# to be used with pre-release Djangi install which installs other stuff too
beautifulsoup4==4.12
piexif==1.1
black==23.1
chardet==5.1
click==8.1
coverage==7.1
deptry==0.12
docutils==0.19
isort==5.12
mypy-extensions==1.0
packaging==23.0
pathspec==0.11
Pillow==9.4.0
platformdirs==3.0
pytz==2022.7
ruff==0.0.245
setuptools==67.7
soupsieve==2.5
Unidecode==1.3
piexif==1.1

View File

@@ -0,0 +1,20 @@
Pillow==10.2
Unidecode==1.3.8
asgiref==3.6
beautifulsoup4==4.12
black==24.2
chardet==5.2
click==8.1
coverage==7
deptry==0.12.0
docutils==0.20
isort==5
mypy-extensions==1.0
packaging==23
pathspec==0.12
platformdirs==4
pytz==2024.1
ruff==0.2
soupsieve==2.5
sqlparse
piexif

View File

@@ -0,0 +1,21 @@
asgiref==3.7.0
beautifulsoup4==4.12.0
black==23.3.0
click==8.1.3
coverage==7.2.0
Django==4.2
docutils==0.20
isort==5.12.0
mypy-extensions==1.0.0
packaging==23.0
pathspec==0.11.0
Pillow==10.0.0
pkg_resources==0.0.0
platformdirs==3.8.0
pytz==2023.3
ruff==0.0.245
soupsieve==2.4.1
sqlparse==0.4.0
tomli==2.0.1
typing_extensions==4.7.1
Unidecode==1.3.6

View File

@@ -0,0 +1,17 @@
asgiref==3.3.4
confusable-homoglyphs==3.2.0
Django==3.2
docutils==0.14
gunicorn==20.1.0
Pillow==5.4.1
sqlparse==0.2.4
typing-extensions==3.7.4.3
Unidecode==1.0.23
mariadb==1.0.11
mysql-connector-python==8.0.29
mysqlclient==2.1.0
Pillow==9.1.0
pytz==2022.5
asgiref==3.5.0
gunicorn==20.1.0

View File

@@ -0,0 +1,184 @@
#!/bin/bash
# footled lots to make this work with python 3.10 & 3.11 and WSL1 and WSL2 on Ubuntu 22.04
# Run this in a terminal in the troggle directory: 'bash venv-trog.sh'
echo '-- Run this in a terminal in the real troggle directory: "bash venv-trog.sh"'
# Expects an Ubuntu 22.04 (or 20.04) relatively clean install.
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog.sh
# If you are using Debian, then stick with the default version of python
# If you are using Ubuntu, then it is easy to use a later version of python, e.g. 3.11
# NOW we set up troggle
PYTHON=python3.11
VENAME=p11d32 # python3.x and django 4.2
echo "** You are logged in as `id -u -n`"
echo "The 50MB pip cache will be in /home/`id -u -n`/.cache/"
echo "The 150MB venv will created in /home/`id -u -n`/$VENAME/"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder (this script location): ${TROGDIR}"
REQUIRE=requirements-$VENAME.txt
if [ -d $REQUIRE ]; then
echo "-- No ${REQUIRE} found. You should be in the /troggle/ folder. Copy it from your most recent installation."
exit 1
fi
echo ## Using $REQUIRE :
cat $REQUIRE
echo ##
$PYTHON --version
# NOTE that when using a later or earlier verison of python, you MUST also
# use the allowed version of Pillow, see https://pillow.readthedocs.io/en/latest/installation.html
# NOW set up link from expo user folder
# needed for WSL2
echo Creating links from Linux filesystem user
# These links only need making once, for many venv
cd ~
if [ ! -d $VENAME ]; then
echo "## Creating venv $VENAME. (If this fails with a pip error, you need to ensure you have python3.11-venv installed and/or use a Ubuntu window)"
$PYTHON -m venv $VENAME
else
echo "## /$VENAME/ already exists ! Delete it first."
exit 1
fi
# Activate the virtual env and see what the default packages are
echo "### Activating $VENAME"
cd $VENAME
echo "-- now in: ${PWD}"
ls -tlarg
source bin/activate
echo $VIRTUAL_ENV
if [ -d ~/$VENAME/bin ]; then
echo "### Activating."
else
echo "## ~/$VENAME/bin does not exist. FAILed to create venv properly."
exit 1
fi
# update local version of pip, more recent than OS version
# debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3
# update local version of setuptools, more recent than OS version, needed for packages without wheels
echo "### installing later version of pip inside $VENAME"
$PYTHON -m pip install --upgrade pip
$PYTHON -m pip install --upgrade setuptools
PIP=pip
$PIP list > original-pip.list
$PIP freeze >original.txt
# we are in /home/$USER/$VENAME/
ln -s ${TROGDIR} troggle
ln -s ${TROGDIR}/../expoweb expoweb
ln -s ${TROGDIR}/../loser loser
ln -s ${TROGDIR}/../drawings drawings
#ln -s ${TROGDIR}/../expofiles expofiles
# fudge for philip's machine
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
if [ -d ${TROGDIR}/../expofiles ]; then
ln -s ${TROGDIR}/../expofiles expofiles
else
ln -s /mnt/d/EXPO/expofiles expofiles
fi
echo "### Setting file permissions.. may take a while.."
git config --global --add safe.directory '*'
sudo chmod -R 777 *
echo "### links to expoweb, troggle etc. complete:"
ls -tla
echo "###"
echo "### now installing ${TROGDIR}/${REQUIRE}"
echo "###"
cat ${TROGDIR}/${REQUIRE}
# NOW THERE IS A PERMISSIONS FAILURE THAT DIDN'T HAPPEN BEFORE
# seen on wsl2 as well as wsl1
# which ALSO ruins EXISTING permissions !
# Guessing it is to do with pip not liking non-standard py 3.11 installation on Ubuntu 22.04
read -p "Press any key to resume ..."
$PIP install -r ${TROGDIR}/${REQUIRE}
echo "### install from ${TROGDIR}/${REQUIRE} completed."
echo '### '
$PIP install --pre django
$PIP freeze > $REQUIRE
# so that we can track requirements more easily with git
# because we do not install these with pip, but they are listed by the freeze command
# Now find out what we actually installed by subtracting the stuff venv installed anyway
sort original.txt > 1
sort $REQUIRE >2
comm -3 1 2 --check-order | awk '{ print $1}'>fresh-$REQUIRE
rm 1
rm 2
# cp $REQUIRE requirements-$VENAME.txt
cp $REQUIRE troggle/$REQUIRE
$PIP list > installed-pip.list
$PIP list -o > installed-pip-o.list
REQ=installation-record
mkdir $REQ
mv original.txt $REQ
mv $REQUIRE $REQ
mv original-pip.list $REQ
mv installed-pip.list $REQ
mv installed-pip-o.list $REQ
cp fresh-$REQUIRE ../$REQUIRE
mv fresh-$REQUIRE $REQ
cp troggle/`basename "$0"` $REQ
$PYTHON --version
python --version
echo "Django version:`django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/$VENAME'
'source bin/activate'
'cd troggle'
'django-admin'
'python manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
## the tests may ALSO fail because of ssh and permissions errors
## So you will need to run
$sudo chown -Rhv philip:philip ~/$VENAME (if your username is philip)
# and then REBOOT (or at least, exit WSL and terminate and restart WSL)
# because this chmod only takes effect then.
'python manage.py test -v 2'
'./pre-run.sh' (runs the tests again)
'python databaseReset.py reset $VENAME'
'python manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
# if [ ! -d /mnt/d/expofiles ]; then
# echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.'
# fi

View File

@@ -0,0 +1,184 @@
#!/bin/bash
# footled lots to make this work with python 3.10 & 3.11 and WSL1 and WSL2 on Ubuntu 22.04
# Run this in a terminal in the troggle directory: 'bash venv-trog.sh'
echo '-- Run this in a terminal in the real troggle directory: "bash venv-trog.sh"'
# Expects an Ubuntu 22.04 (or 20.04) relatively clean install.
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog.sh
# If you are using Debian, then stick with the default version of python
# If you are using Ubuntu, then it is easy to use a later version of python, e.g. 3.11
# NOW we set up troggle
PYTHON=python3.11
VENAME=p11d42 # python3.x and django 4.2
echo "** You are logged in as `id -u -n`"
echo "The 50MB pip cache will be in /home/`id -u -n`/.cache/"
echo "The 150MB venv will created in /home/`id -u -n`/$VENAME/"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder (this script location): ${TROGDIR}"
REQUIRE=requirements-$VENAME.txt
if [ -d $REQUIRE ]; then
echo "-- No ${REQUIRE} found. You should be in the /troggle/ folder. Copy it from your most recent installation."
exit 1
fi
echo ## Using $REQUIRE :
cat $REQUIRE
echo ##
$PYTHON --version
# NOTE that when using a later or earlier verison of python, you MUST also
# use the allowed version of Pillow, see https://pillow.readthedocs.io/en/latest/installation.html
# NOW set up link from expo user folder
# needed for WSL2
echo Creating links from Linux filesystem user
# These links only need making once, for many venv
cd ~
if [ ! -d $VENAME ]; then
echo "## Creating venv $VENAME. (If this fails with a pip error, you need to ensure you have python3.11-venv installed and/or use a Ubuntu window)"
$PYTHON -m venv $VENAME
else
echo "## /$VENAME/ already exists ! Delete it first."
exit 1
fi
# Activate the virtual env and see what the default packages are
echo "### Activating $VENAME"
cd $VENAME
echo "-- now in: ${PWD}"
ls -tlarg
source bin/activate
echo $VIRTUAL_ENV
if [ -d ~/$VENAME/bin ]; then
echo "### Activating."
else
echo "## ~/$VENAME/bin does not exist. FAILed to create venv properly."
exit 1
fi
# update local version of pip, more recent than OS version
# debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3
# update local version of setuptools, more recent than OS version, needed for packages without wheels
echo "### installing later version of pip inside $VENAME"
$PYTHON -m pip install --upgrade pip
$PYTHON -m pip install --upgrade setuptools
PIP=pip
$PIP list > original-pip.list
$PIP freeze >original.txt
# we are in /home/$USER/$VENAME/
ln -s ${TROGDIR} troggle
ln -s ${TROGDIR}/../expoweb expoweb
ln -s ${TROGDIR}/../loser loser
ln -s ${TROGDIR}/../drawings drawings
#ln -s ${TROGDIR}/../expofiles expofiles
# fudge for philip's machine
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
if [ -d ${TROGDIR}/../expofiles ]; then
ln -s ${TROGDIR}/../expofiles expofiles
else
ln -s /mnt/d/EXPO/expofiles expofiles
fi
echo "### Setting file permissions.. may take a while.."
git config --global --add safe.directory '*'
sudo chmod -R 777 *
echo "### links to expoweb, troggle etc. complete:"
ls -tla
echo "###"
echo "### now installing ${TROGDIR}/${REQUIRE}"
echo "###"
cat ${TROGDIR}/${REQUIRE}
# NOW THERE IS A PERMISSIONS FAILURE THAT DIDN'T HAPPEN BEFORE
# seen on wsl2 as well as wsl1
# which ALSO ruins EXISTING permissions !
# Guessing it is to do with pip not liking non-standard py 3.11 installation on Ubuntu 22.04
read -p "Press any key to resume ..."
$PIP install -r ${TROGDIR}/${REQUIRE}
echo "### install from ${TROGDIR}/${REQUIRE} completed."
echo '### '
$PIP install --pre django
$PIP freeze > $REQUIRE
# so that we can track requirements more easily with git
# because we do not install these with pip, but they are listed by the freeze command
# Now find out what we actually installed by subtracting the stuff venv installed anyway
sort original.txt > 1
sort $REQUIRE >2
comm -3 1 2 --check-order | awk '{ print $1}'>fresh-$REQUIRE
rm 1
rm 2
# cp $REQUIRE requirements-$VENAME.txt
cp $REQUIRE troggle/$REQUIRE
$PIP list > installed-pip.list
$PIP list -o > installed-pip-o.list
REQ=installation-record
mkdir $REQ
mv original.txt $REQ
mv $REQUIRE $REQ
mv original-pip.list $REQ
mv installed-pip.list $REQ
mv installed-pip-o.list $REQ
cp fresh-$REQUIRE ../$REQUIRE
mv fresh-$REQUIRE $REQ
cp troggle/`basename "$0"` $REQ
$PYTHON --version
python --version
echo "Django version:`django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/$VENAME'
'source bin/activate'
'cd troggle'
'django-admin'
'python manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
## the tests may ALSO fail because of ssh and permissions errors
## So you will need to run
$sudo chown -Rhv philip:philip ~/$VENAME (if your username is philip)
# and then REBOOT (or at least, exit WSL and terminate and restart WSL)
# because this chmod only takes effect then.
'python manage.py test -v 2'
'./pre-run.sh' (runs the tests again)
'python databaseReset.py reset $VENAME'
'python manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
# if [ ! -d /mnt/d/expofiles ]; then
# echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.'
# fi

View File

@@ -0,0 +1,190 @@
#!/bin/bash
# footled lots to make this work with python 3.10 & 3.11 and WSL1 and WSL2 on Ubuntu 22.04
# Run this in a terminal in the troggle directory: 'bash venv-trog.sh'
echo '-- Run this in a terminal in the real troggle directory: "bash venv-trog.sh"'
# Expects an Ubuntu 22.04 (or 20.04) relatively clean install.
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog.sh
# If you are using Debian, then stick with the default version of python
# If you are using Ubuntu, then it is easy to use a later version of python, e.g. 3.12
# NOW we set up troggle
PYTHON=python3.12
VENAME=p12d5 # python3.x and django version
echo "** You are logged in as `id -u -n`"
echo "The 50MB pip cache will be in /home/`id -u -n`/.cache/"
echo "The 150MB venv will created in /home/`id -u -n`/$VENAME/"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder (this script location): ${TROGDIR}"
if [[ "${VENAME:(-1)}" == 5 ]]; then
echo "The variable '$VENAME' ends in 5."
else
echo "The variable '$VENAME' does not end in 5."
fi
REQUIRE=requirements-$VENAME.txt
if [ -d $REQUIRE ]; then
echo "-- No ${REQUIRE} found. You should be in the /troggle/ folder. Copy it from your most recent installation."
exit 1
fi
echo ## Using $REQUIRE :
cat $REQUIRE
echo ##
$PYTHON --version
# NOTE that when using a later or earlier verison of python, you MUST also
# use the allowed version of Pillow, see https://pillow.readthedocs.io/en/latest/installation.html
# NOW set up link from expo user folder
# needed for WSL2
echo Creating links from Linux filesystem user
# These links only need making once, for many venv
cd ~
if [ ! -d $VENAME ]; then
echo "## Creating venv $VENAME. (If this fails with a pip error, you need to ensure you have python3.12-venv installed and/or use a Ubuntu window)"
$PYTHON -m venv $VENAME
else
echo "## /$VENAME/ already exists ! Delete it first."
exit 1
fi
# Activate the virtual env and see what the default packages are
echo "### Activating $VENAME"
cd $VENAME
echo "-- now in: ${PWD}"
ls -tlarg
source bin/activate
echo $VIRTUAL_ENV
if [ -d ~/$VENAME/bin ]; then
echo "### Activating."
else
echo "## ~/$VENAME/bin does not exist. FAILed to create venv properly."
exit 1
fi
# update local version of pip, more recent than OS version
# debian bullseye installs pip 20.3.4 which barfs, we want >22.0.3
# update local version of setuptools, more recent than OS version, needed for packages without wheels
echo "### installing later version of pip inside $VENAME"
$PYTHON -m pip install --upgrade pip
$PYTHON -m pip install --upgrade setuptools
$PYTHON -m pip list > original-pip.list
$PYTHON -m pip freeze >original.txt
# we are in /home/$USER/$VENAME/
ln -s ${TROGDIR} troggle
ln -s ${TROGDIR}/../expoweb expoweb
ln -s ${TROGDIR}/../loser loser
ln -s ${TROGDIR}/../drawings drawings
#ln -s ${TROGDIR}/../expofiles expofiles
# fudge for philip's machine
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
if [ -d ${TROGDIR}/../expofiles ]; then
ln -s ${TROGDIR}/../expofiles expofiles
else
ln -s /mnt/d/EXPO/expofiles expofiles
fi
echo "### Setting file permissions.. may take a while.."
git config --global --add safe.directory '*'
sudo chmod -R 777 *
echo "### links to expoweb, troggle etc. complete:"
ls -tla
echo "###"
echo "### now installing ${TROGDIR}/${REQUIRE}"
echo "###"
cat ${TROGDIR}/${REQUIRE}
cp -f ${TROGDIR}/${REQUIRE} ${TROGDIR}/${REQUIRE}.orig
read -p "Press any key to resume ..."
$PYTHON -m pip install -r ${TROGDIR}/${REQUIRE}
echo "### install from ${TROGDIR}/${REQUIRE} completed."
echo '### '
# this installs pre-release django 5.0
if [[ "${VENAME:(-1)}" == 5 ]]; then
echo "### Installing pre-release version of Django"
$PYTHON -m pip install --pre django
fi
$PYTHON -m pip freeze > $REQUIRE.freeze
# so that we can track requirements more easily with git
# because we do not install these with pip, but they are listed by the freeze command
# Now find out what we actually installed by subtracting the stuff venv installed anyway
sort original.txt > 1
sort $REQUIRE.freeze >2
comm -3 1 2 --check-order | awk '{ print $1}'>fresh-$REQUIRE
rm 1
rm 2
# cp $REQUIRE requirements-$VENAME.txt
cp $REQUIRE troggle/$REQUIRE
$PYTHON -m pip list > installed-pip.list
$PYTHON -m pip list -o > installed-pip-o.list
REQ=installation-record
mkdir $REQ
mv $REQUIRE.freeze $REQ
mv original.txt $REQ
mv $REQUIRE $REQ
mv original-pip.list $REQ
mv installed-pip.list $REQ
mv installed-pip-o.list $REQ
# cp fresh-$REQUIRE ../$REQUIRE
mv fresh-$REQUIRE $REQ
cp troggle/`basename "$0"` $REQ
$PYTHON --version
python --version
echo "Django version:`django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/$VENAME'
'source bin/activate'
'cd troggle'
'django-admin'
'python manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
## the tests may ALSO fail because of ssh and permissions errors
## So you will need to run
$sudo chown -Rhv philip:philip ~/$VENAME (if your username is philip)
# and then REBOOT (or at least, exit WSL and terminate and restart WSL)
# because this chmod only takes effect then.
'python manage.py test -v 2'
'./pre-run.sh' (runs the tests again)
'python databaseReset.py reset $VENAME'
'python manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
# if [ ! -d /mnt/d/expofiles ]; then
# echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.'
# fi

53
_deploy/wsl/venv-trog.sh Normal file
View File

@@ -0,0 +1,53 @@
#!/bin/bash
# now using uv, unbelieveably simpler.
# Run this in a terminal in ~/expo above the troggle directory: 'bash ~/expo/venv-trog.sh'
echo '-- Run this in a terminal in the directory above the troggle directory: "bash ~/expo/venv-trog.sh"'
# Expects an Ubuntu 24.04 with all the gubbins already installed
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog24.04.sh runniing it in /home/username/
python3 --version
cd ~/expo/troggle
echo "-- EXPO folder [current directory]: `pwd`"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder: ${TROGDIR}"
cp dev.toml pyproject.toml
cp ~/expo/troggle/_deploy/wsl/localsettingsWSL.py ~/expo/troggle/localsettings.py
uv self update
uv sync
# fudge for philip's laptop prior to M2 SSD upgrade
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
uv pip list
echo "Django version:`uv run django-admin --version`"
echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd ~/expo/troggle'
'uv run django-admin'
'uv run manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html
## you need to follow the Linux instructions.
'ssh expo@expo.survex.com'
## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine
'uv run manage.py test -v 2'
'./pre-run.sh' (runs the tests again)
'uv run databaseReset.py reset INIT'
'uv run manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)'
"
# if [ ! -d /mnt/d/expofiles ]; then
# echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.'
# fi

View File

@@ -0,0 +1,181 @@
import sys
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
#-----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
#-----------------------------------------------------------------
# default values, real secrets imported from credentials.py
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever. Tests are then less accurate.
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = '8000' # not needed
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent
LIBDIR = REPOS_ROOT_PATH / 'lib' / PV
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / 'templates'
MEDIA_ROOT = TROGGLE_PATH / 'media'
JSLIB_ROOT = TROGGLE_PATH / 'media' / 'jslib' # used for CaveViewer JS utility
# EXPOFILES = REPOS_ROOT_PATH / "expofiles"
EXPOFILES = Path('/media/philip/sd-huge1/cucc-expo/expofiles/')
SCANS_ROOT = EXPOFILES / 'surveyscans'
PHOTOS_ROOT = EXPOFILES / 'photos'
PHOTOS_YEAR = "2023"
NOTABLECAVESHREFS = ["290", "291", "264", "258", "204", "359", "76", "107"]
# PYTHON_PATH = os.fspath(PYTHON_PATH)
PYTHON_PATH = REPOS_ROOT_PATH / "troggle"
LOGFILE = PYTHON_PATH / "troggle.log"
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
MEDIA_URL = '/site-media/'
DIR_ROOT = Path("") #this should end in / if a value is given
URL_ROOT = '/'
# URL_ROOT = 'http://localhost:'+ SERVERPORT +'/'
# Note that these constants are not actually used in urls.py, they should be..
# and they all need to end with / so using 'Path' doesn't work..
MEDIA_URL = Path(URL_ROOT, "/site_media/")
PHOTOS_URL = Path(URL_ROOT, "/photos/")
STATIC_URL = Path(URL_ROOT, "/static/") # used by Django admin pages. Do not delete.
JSLIB_URL = Path(URL_ROOT, "/javascript/") # used for CaveViewer JS utility
# STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
# executables:
CAVERN = 'cavern' # for parsing .svx files and producing .3d files
SURVEXPORT = 'survexport' # for parsing .3d files and producing .pos files
DBSQLITE = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME' : 'troggle.sqlite',
'USER' : 'expo', # Not used with sqlite3.
'PASSWORD' : 'sekrit', # Not used with sqlite3.
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME' : 'troggle', # Or path to database file if using sqlite3.
'USER' : 'expo',
'PASSWORD' : 'my-secret-password-schwatzmooskogel',
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
"DIRS": [TEMPLATE_PATH],
'OPTIONS': {
'debug': 'DEBUG',
'context_processors': [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
'django.contrib.auth.context_processors.auth', # knowledge of logged-on user & permissions
'core.context.troggle_context', # in core/troggle.py - only used in expedition.html
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media', # includes a variable MEDIA_URL
'django.template.context_processors.static', # includes a variable STATIC_URL used by admin pages
'django.template.context_processors.tz',
'django.template.context_processors.request', # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
'django.contrib.messages.context_processors.messages',
],
'loaders': [
'django.template.loaders.filesystem.Loader', # default lcation is troggle/templates/
'django.template.loaders.app_directories.Loader', # needed for admin 'app'
],
},
},
]
EXPOUSER = "expo"
EXPOUSER_EMAIL = "philip.sargent@gmail.com"
EXPOADMINUSER = "expoadmin"
EXPOADMINUSER_EMAIL = "philip.sargent@gmail.com"
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.net" # Philip Sargent really
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = "django-test@klebos.net"
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
EXPOWEB_URL = ''
# SCANS_URL = '/survey_scans/' # defunct, removed.
sys.path.append(str(REPOS_ROOT_PATH))
sys.path.append(str(PYTHON_PATH))
# Sanitise these to be strings as all other code is expecting strings
# and we have not made the change to pathlib Path type in the other localsettings-* variants yet.
#CAVEDESCRIPTIONS = os.fspath(CAVEDESCRIPTIONS)
#ENTRANCEDESCRIPTIONS = os.fspath(ENTRANCEDESCRIPTIONS)
STATIC_URL = str(STATIC_URL) + "/"
MEDIA_URL = str(MEDIA_URL) + "/"

View File

@@ -0,0 +1,196 @@
import sys
import os
import urllib.parse
from pathlib import Path
"""Settings for a troggle installation which may vary among different
installations: for development or deployment, in a docker image or
python virtual environment (venv), on ubuntu, debian or in Windows
System for Linux (WSL), on the main server or in the potato hut,
using SQLite or mariaDB.
It sets the directory locations for the major parts of the system so
that e.g. expofiles can be on a different filesystem, or /javascript/ can be in
a system-wide location rather than just a local directory.
This file is included at the end of the main troggle/settings.py file so that
it overwrites defaults in that file.
Read https://realpython.com/python-pathlib/
Read https://adamj.eu/tech/2020/03/16/use-pathlib-in-your-django-project/
"""
print(" * importing troggle/localsettings.py")
#-----------------------------------------------------------------
# THINK before you push this to a repo
# - have you checked that credentials.py is in .gitignore ?
# - we don't want to have to change the expo system password !
#-----------------------------------------------------------------
# default values, real secrets imported from credentials.py
SECRET_KEY = "real-SECRET_KEY--imported-from-localsettings.py"
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EXPOADMINUSERPASS = "gggggg:nnn - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
EXPOFILESREMOTE = False # if True, then re-routes urls in expofiles to remote sever. Tests are then less accurate.
#SECURE_SSL_REDIRECT = True # breaks 7 tests in test suite 301 not 200 (or 302) and runserver fails completely
SERVERPORT = '8000' # not needed
PV = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor)
# Troggle does a lot of file-handling. This is very error-prone when using primitive methods,
# so we use pathlib which has been standard since python 3.4
# If pathlib is new to you, you will need to read https://realpython.com/python-pathlib/
# --------------------- MEDIA redirections BEGIN ---------------------
REPOS_ROOT_PATH = Path(__file__).parent.parent
LIBDIR = REPOS_ROOT_PATH / 'lib' / PV
#LIBDIR = REPOS_ROOT_PATH / 'lib' / 'python3.9' # should be finding this automatically: python --version etc.
TROGGLE_PATH = Path(__file__).parent
TEMPLATE_PATH = TROGGLE_PATH / 'templates'
MEDIA_ROOT = TROGGLE_PATH / 'media'
JSLIB_ROOT = TROGGLE_PATH / 'media' / 'jslib' # used for CaveViewer JS utility
#FILES = Path('/mnt/d/expofiles/')
EXPOFILES = Path('/media/philip/sd-huge1/cucc-expo/expofiles/')
SCANS_ROOT = EXPOFILES / 'surveyscans'
PHOTOS_ROOT = EXPOFILES / 'photos'
PHOTOS_YEAR = "2022"
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
MEDIA_URL = '/site-media/'
DIR_ROOT = ''#this should end in / if a value is given
URL_ROOT = '/'
# URL_ROOT = 'http://localhost:'+ SERVERPORT +'/'
#Note that these constants are not actually used in urls.py, they should be..
MEDIA_URL = urllib.parse.urljoin(URL_ROOT , '/site_media/')
SCANS_URL = urllib.parse.urljoin(URL_ROOT , '/survey_scans/')
PHOTOS_URL = urllib.parse.urljoin(URL_ROOT , '/photos/')
SVX_URL = urllib.parse.urljoin(URL_ROOT , '/survex/')
STATIC_URL = urllib.parse.urljoin(URL_ROOT , '/static/') # used by Django admin pages. Do not delete.
JSLIB_URL = urllib.parse.urljoin(URL_ROOT , '/javascript/') # used for CaveViewer JS utility
#STATIC_ROOT removed after merging content into MEDIA_ROOT. See urls.py & core/views/surveys.py
# --------------------- MEDIA redirections END ---------------------
PUBLIC_SITE = True
DEBUG = True # Always keep this True, even when on public server. Otherwise NO USEFUL ERROR MESSAGES !
CACHEDPAGES = True # experimental page cache for a handful of page types
# executables:
CAVERN = 'cavern' # for parsing .svx files and producing .3d files
SURVEXPORT = 'survexport' # for parsing .3d files and producing .pos files
DBSQLITE = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME' : 'troggle.sqlite',
# 'NAME' : ':memory:',
'USER' : 'expo', # Not used with sqlite3.
'PASSWORD' : 'sekrit', # Not used with sqlite3.
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
DBMARIADB = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME' : 'troggle', # Or path to database file if using sqlite3.
'USER' : 'expo',
'PASSWORD' : 'my-secret-password-schwatzmooskogel',
'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
'PORT' : '', # Set to empty string for default. Not used with sqlite3.
}
}
# default database for me is squlite
DBSWITCH = "sqlite"
if DBSWITCH == "sqlite":
DATABASES = DBSQLITE
if DBSWITCH == "mariadb":
DATABASES = DBMARIADB
NOTABLECAVESHREFS = [ "290", "291", "359", "264", "258", "204", "76", "107"]
PYTHON_PATH = REPOS_ROOT_PATH / 'troggle'
sys.path.append(os.fspath(REPOS_ROOT_PATH))
sys.path.append(os.fspath(PYTHON_PATH))
LOGFILE = PYTHON_PATH / 'troggle.log'
PYTHON_PATH = os.fspath(PYTHON_PATH)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
TEMPLATE_PATH
],
'OPTIONS': {
'debug': 'DEBUG',
'context_processors': [
# django.template.context_processors.csrf, # is always enabled and cannot be removed, sets csrf_token
'django.contrib.auth.context_processors.auth', # knowledge of logged-on user & permissions
'core.context.troggle_context', # in core/troggle.py - only used in expedition.html
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media', # includes a variable MEDIA_URL
'django.template.context_processors.static', # includes a variable STATIC_URL used by admin pages
'django.template.context_processors.tz',
'django.template.context_processors.request', # must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.
'django.contrib.messages.context_processors.messages',
],
'loaders': [
'django.template.loaders.filesystem.Loader', # default lcation is troggle/templates/
'django.template.loaders.app_directories.Loader', # needed for admin 'app'
]
},
},
]
EXPOUSERPASS = "nnn:gggggg - real-expo-password---imported-from-localsettings.py"
EMAIL_HOST_PASSWORD = "real-email-password---imported-from-localsettings.py"
EXPOUSER = 'expo'
EXPOUSER_EMAIL = 'philip.sargent@gmail.com'
EXPOADMINUSER = 'expoadmin'
EXPOADMINUSER_EMAIL = 'philip.sargent@gmail.com'
EMAIL_HOST = "smtp-auth.mythic-beasts.com"
EMAIL_HOST_USER = "django-test@klebos.net" # Philip Sargent really
EMAIL_PORT=587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'django-test@klebos.net'
SURVEX_DATA = REPOS_ROOT_PATH / "loser"
DRAWINGS_DATA = REPOS_ROOT_PATH / "drawings"
EXPOWEB = REPOS_ROOT_PATH / "expoweb"
#SURVEYS = REPOS_ROOT_PATH
CAVEDESCRIPTIONS = EXPOWEB / "cave_data"
ENTRANCEDESCRIPTIONS = EXPOWEB / "entrance_data"
EXPOWEB_URL = ''
# SCANS_URL = '/survey_scans/' # defunct, removed.
# Sanitise these to be strings as all other code is expecting strings
# and we have not made the change to pathlib Path type in the other localsettings-* variants yet.
CAVEDESCRIPTIONS = os.fspath(CAVEDESCRIPTIONS)
ENTRANCEDESCRIPTIONS = os.fspath(ENTRANCEDESCRIPTIONS)
LOGFILE = os.fspath(LOGFILE)
#SURVEYS = os.fspath(SURVEYS)
EXPOWEB = os.fspath(EXPOWEB)
DRAWINGS_DATA = os.fspath(DRAWINGS_DATA)
SURVEX_DATA = os.fspath(SURVEX_DATA)
REPOS_ROOT_PATH = os.fspath(REPOS_ROOT_PATH)
TEMPLATE_PATH = os.fspath(TROGGLE_PATH)
MEDIA_ROOT = os.fspath(MEDIA_ROOT)
JSLIB_ROOT = os.fspath(JSLIB_ROOT)
SCANS_ROOT = os.fspath(SCANS_ROOT)

112
_deploy/xubuntu/os-trog.sh Executable file
View File

@@ -0,0 +1,112 @@
#!/bin/bash
# Run this in a terminal in the troggle directory: 'bash os-trog.sh'
# On WSL, do Shift-click in the file explorer on the troggle folder to open a Linux command line
# 'Open Linux shell here'
echo 'Run this in a terminal in the troggle directory: "bash venv-trog.sh"'
cat /etc/os-release
# Expects an Ubuntu 22.04 relatively clean install.
sudo apt install python-is-python3 -y
python --version : ensure python is an alias for python3 not python2.7
sudo apt update -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
sudo apt install sqlite3 -y
sudo apt install python3-pip -y
# this installs a shed-load of other stuff: binutils etc.sudo apt install survex-aven
sudo apt install git openssh-client -y
# On a clean debian 11 (bullseye) installation with Xfce & ssh,
#on ubuntu 20.04:
#Package sftp is not available, but is referred to by another package.
#This may mean that the package is missing, has been obsoleted, or
#is only available from another source
#E: Package 'sftp' has no installation candidate
# On Ubuntu 20.04, with python10, the pip install fails.
# So you need to get the pip from source
# sudo curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
# but really you should be using 22.04
# and also, isf using debian,
# sudo python3.10 -m pip install -U virtualenv
# do not actually use this any more
sudo useradd expo
sudo usermod -a -G sudo expo # to put expo in sudoers group, re-login required
# as debian does not install everything that ubuntu does, you need:
sudo apt install python3-venv -y
sudo apt install python3-dev -y
# default since 22.04
# sudo apt install python3.10
sudo apt install python3.11-venv -y
sudo apt install python3.11-dev -y
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1
sudo apt install mariadb-server -y
sudo apt install libmariadb-dev -y
sudo python -m pip install --upgrade pip
sudo apt install sftp -y
echo '###'
echo '### NOW INSTALLING tunnel and therion, go and have a cup of tea. Or a 3-course meal.'
echo '###'
sudo apt install tunnelx therion -y
sudo apt install gedit
# Go to https://expo.survex.com/handbook/troggle/troglaptop.html#dbtools
# sudo service mysql start
echo "### python 3.12"
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install python3.12-full -y
sudo apt install python3.12-distutils -y
sudo apt install python3.12-venv -y
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.12 7
sudo update-alternatives --config python
sudo rm /usr/bin/python3
sudo ln -s /etc/alternatives/python /usr/bin/python3
sudo apt dist-upgrade
# install VS code - but ONLY on a native ubuntu install, NOT in WSL
sudo apt install software-properties-common apt-transport-https wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code
#this next crashes, why?
#sudo python -m pip install --upgrade pip
sudo apt install gpsprune qgis gedit tig gitg meld rsync
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global pull.rebase true
echo '###'
echo '### Currently set version of python'
python --version
echo '###'
echo '### Now YOU have to configure the git settings for YOURSELF (not "expo")'
echo '### because you can't clone the repos without a key
# cd ~/expo
git clone ssh://expo@expo.survex.com/home/expo/troggle
git clone ssh://expo@expo.survex.com/home/expo/loser
git clone ssh://expo@expo.survex.com/home/expo/expoweb
git clone ssh://expo@expo.survex.com/home/expo/drawings
mkdir expofiles
rsync -azv --delete-after --prune-empty-dirs --exclude="photos" --exclude="video" expo@expo.survex.com:expofiles/ expofiles
rsync -azv --exclude="*.jpg.xml" --exclude="*.jpeg.xml" --exclude="*.JPG.xml" expo@expo.s^Cvex.com:expofiles/photos/ expofiles/photos

Some files were not shown because too many files have changed in this diff Show More