diff options
author | Sam Wenham <sam@wenhams.co.uk> | 2019-03-06 23:20:34 +0000 |
---|---|---|
committer | Sam Wenham <sam@wenhams.co.uk> | 2019-03-06 23:20:34 +0000 |
commit | 9fc80bed35a03295fad492601f802cab830144ae (patch) | |
tree | 0be95a5e56fe69e403c934151d90a301c92ddf0e /settings.py | |
parent | 59f8647e0faaa37cc250db7dd2670fd7e0c4db5b (diff) | |
download | troggle-9fc80bed35a03295fad492601f802cab830144ae.tar.gz troggle-9fc80bed35a03295fad492601f802cab830144ae.tar.bz2 troggle-9fc80bed35a03295fad492601f802cab830144ae.zip |
Make the logbook parser a little more sane
Move the parser to expo mapping to settings
Set a default parser
Iterate over the expo years rather than the mapping list!
Diffstat (limited to 'settings.py')
-rw-r--r-- | settings.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/settings.py b/settings.py index 3c3b8d2..b0656ae 100644 --- a/settings.py +++ b/settings.py @@ -53,6 +53,40 @@ SURVEYS_URL = urlparse.urljoin(URL_ROOT , '/survey_scans/') PHOTOS_URL = urlparse.urljoin(URL_ROOT , '/photos/') SVX_URL = urlparse.urljoin(URL_ROOT , '/survex/') +DEFAULT_LOGBOOK_PARSER = "Parseloghtmltxt" +DEFAULT_LOGBOOK_FILE = "logbook.html" + +LOGBOOK_PARSER_SETTINGS = { + "2018": ("2018/logbook.html", "Parseloghtmltxt"), + "2017": ("2017/logbook.html", "Parseloghtmltxt"), + "2016": ("2016/logbook.html", "Parseloghtmltxt"), + "2015": ("2015/logbook.html", "Parseloghtmltxt"), + "2014": ("2014/logbook.html", "Parseloghtmltxt"), + "2013": ("2013/logbook.html", "Parseloghtmltxt"), + "2012": ("2012/logbook.html", "Parseloghtmltxt"), + "2011": ("2011/logbook.html", "Parseloghtmltxt"), + "2010": ("2010/logbook.html", "Parselogwikitxt"), + "2009": ("2009/2009logbook.txt", "Parselogwikitxt"), + "2008": ("2008/2008logbook.txt", "Parselogwikitxt"), + "2007": ("2007/logbook.html", "Parseloghtmltxt"), + "2006": ("2006/logbook/logbook_06.txt", "Parselogwikitxt"), + "2005": ("2005/logbook.html", "Parseloghtmltxt"), + "2004": ("2004/logbook.html", "Parseloghtmltxt"), + "2003": ("2003/logbook.html", "Parseloghtml03"), + "2002": ("2002/logbook.html", "Parseloghtmltxt"), + "2001": ("2001/log.htm", "Parseloghtml01"), + "2000": ("2000/log.htm", "Parseloghtml01"), + "1999": ("1999/log.htm", "Parseloghtml01"), + "1998": ("1998/log.htm", "Parseloghtml01"), + "1997": ("1997/log.htm", "Parseloghtml01"), + "1996": ("1996/log.htm", "Parseloghtml01"), + "1995": ("1995/log.htm", "Parseloghtml01"), + "1994": ("1994/log.htm", "Parseloghtml01"), + "1993": ("1993/log.htm", "Parseloghtml01"), + "1992": ("1992/log.htm", "Parseloghtml01"), + "1991": ("1991/log.htm", "Parseloghtml01"), + } + APPEND_SLASH = False SMART_APPEND_SLASH = True |