Note about peoples names and filenames in wallets files

and link to troggle-generated page on svxfiles and logbook trips
This commit is contained in:
Philip Sargent 2019-12-13 02:54:37 +01:00
parent 588466f646
commit 6181ac0dd5
2 changed files with 18 additions and 10 deletions

View File

@ -116,6 +116,10 @@ looks like this:
Yes, this is <a href="https://en.wikipedia.org/wiki/JSON">a programming format</a> Yes, this is <a href="https://en.wikipedia.org/wiki/JSON">a programming format</a>
(standardised in 2013) and every comma is critical. (standardised in 2013) and every comma is critical.
<p>When entering people's names it is important not to use any funny characters (such as "?") because
peoples names here are used by the software to construct filenames for the surveying to-do lists. And "?" (for instance) is illegal
in filenames on Windows computers.
<h3>"To do" lists for every caver</h3> <h3>"To do" lists for every caver</h3>
<p>The folder containing all the wallets for the year, e.g. <p>The folder containing all the wallets for the year, e.g.
<pre> <pre>

24
noinfo/wallets.py Executable file → Normal file
View File

@ -12,23 +12,23 @@ if len(sys.argv) > 1 :
if sys.argv[1] != "": if sys.argv[1] != "":
loser_dir = sys.argv[1] loser_dir = sys.argv[1]
print loser_dir print "Loser repo is assumed to be in: " + loser_dir
html_base = "<html><head><style>div { column-count:5;}</style></head><body>%(body)s</body></html>" html_base = "<html><body>%(body)s</body></html>"
html_year_index = html_base % {"body": "<H1>%(year)s surveys: wallets status</H1><H2>Persons</H2><UL>%(persons)s</UL><H2>Wallets</H2><table>%(wallets)s</table><H2>Needing Scanning</H2><div><ul>%(needing scanning)s</ul></div><H2>Website (Guidebook description) needing updating</H2><div><ul>%(website needing updating)s</ul></div>"} html_year_index = html_base % {"body": "<H1>%(year)s surveys: wallets status</H1>\n<p>List of trips: <a href=\"http://expo.survex.com/expedition/2019\">expedition/2019</a> - data taken from.svx files and logbook entries on server</p>\n<H2>Persons</H2>\n<UL>\n%(persons)s</UL>\n<H2>Wallets</H2>\n<table>%(wallets)s</table>\n<H2>Needing Scanning</H2>\n<UL>\n%(needing scanning)s</ul>\n<H2>Website (Guidebook description) needing updating\n</H2>\n<UL>\n%(website needing updating)s</ul>\n"}
html_year_person = "<li><a href='%(person)s.html'>%(person)s</a><ul>%(complaints)s</ul></li>" html_year_person = "<li><a href='%(person)s.html'>%(person)s</a><UL>\n%(complaints)s</ul></li>\n"
html_year_wallet_entry = "<tr><td><a href='%(walletindex)s'>%(walletname)s %(cave)s %(name)s</a></td> <td>%(complaints)s</td></tr>" html_year_wallet_entry = "<tr><td><a href='%(walletindex)s'>%(walletname)s %(cave)s %(name)s</a></td> <td>%(complaints)s</td></tr>\n"
html_person_wallet_entry = "<li><a href='%(walletindex)s'>%(walletname)s</a> <ul>%(complaints)s</ul></li>" html_person_wallet_entry = "<li><a href='%(walletindex)s'>%(walletname)s</a> <UL>\n%(complaints)s</ul></li>\n"
html_year_scanning_entry = "<li><a href='%(walletindex)s'>%(walletname)s %(cave)s %(name)s</a></li>" html_year_scanning_entry = "<li><a href='%(walletindex)s'>%(walletname)s %(cave)s %(name)s</a></li>\n"
html_wallet_file_entry = "<li><a href='%(fileurl)s'>%(filename)s</a></li>" html_wallet_file_entry = "<li><a href='%(fileurl)s'>%(filename)s</a></li>\n"
html_wallet_index = html_base % {"body": "<H1>%(title)s : %(cave)s : %(name)s</H1><p>Date: %(date)s</p><p>People: %(people)s</p><p>Cave <a href='%(description)s'>Guidebook description</a> - %(description_needed)s <p>Survex file:<br>&nbsp;&nbsp;Local (Windows): <a href='%(loser_dirw)s%(survex)s'>%(loser_dirw)s%(survex)s</a><br>&nbsp;&nbsp;Local (Linux): <a href='%(loser_dir)s%(survex)s' download>%(loser_dir)s%(survex)s</a><br>&nbsp;&nbsp;Server: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='http://expo.survex.com/survexfile/%(survex)s'>%(survex)s</a></p><a href='../index.html'>Wallet index for this year</a> </p><H2>Issues</H2>%(complaints)s<H2>Files</H2><UL>%(files)s</UL>"} html_wallet_index = html_base % {"body": "<H1>%(title)s : %(cave)s : %(name)s</H1>\n<p>Date: %(date)s</p><p>People: %(people)s</p>\n<p>Cave <a href='%(description)s'>Guidebook description</a> - %(description_needed)s \n<p>Survex file:<br>&nbsp;&nbsp;Local (Windows): <a href='%(loser_dirw)s%(survex)s' download>%(loser_dirw)s%(survex)s</a><br>&nbsp;&nbsp;Local (Linux): <a href='%(loser_dir)s%(survex)s' download>%(loser_dir)s%(survex)s</a><br>&nbsp;&nbsp;Server: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='http://expo.survex.com/survexfile/%(survex)s' download>%(survex)s</a></p><a href='../index.html'>Wallet index for this year</a> </p>\n<H2>Issues</H2>\n%(complaints)s\n<H2>Files</H2>\n<UL>\n%(files)s</UL>\n"}
html_survex_required = {True: "Survex ", False: ""} html_survex_required = {True: "Survex ", False: ""}
html_plan_scanned = {True: "", False: "Plan "} html_plan_scanned = {True: "", False: "Plan "}
html_elev_scanned = {True: "", False: "Elev "} html_elev_scanned = {True: "", False: "Elev "}
html_description_written = {True: "", False: "Desc "} html_description_written = {True: "", False: "Desc "}
html_qms_written = {True: "", False: "QMs "} html_qms_written = {True: "", False: "QMs "}
html_status = {True: "Issues: ", False: ""} html_status = {True: "Issues: ", False: ""}
html_person = html_base % {"body": "<H1>%(person)s</H1><H2>Outstanding Wallets</H2><UL>%(wallets)s</UL>"} html_person = html_base % {"body": "<H1>%(person)s</H1><H2>Outstanding Wallets</H2><UL>\n%(wallets)s</UL>"}
html_complaint_items = "<li>%(count)i %(complaint)s</li>" html_complaint_items = "<li>%(count)i %(complaint)s</li>"
html_items = "<li>%s</li>" html_items = "<li>%s</li>"
@ -77,6 +77,10 @@ for item in sorted(os.listdir(".")):
json_file = open(contents_path) json_file = open(contents_path)
#print json_file #print json_file
data = json.load(json_file) data = json.load(json_file)
if not data["people"]:
data["people"]=["NOBODY"]
json_file.close() json_file.close()
write_required = False write_required = False
try: try: