2003 logbook export/re-import as now HTML format

This commit is contained in:
2022-12-09 23:45:07 +00:00
parent 17b2b7b89c
commit cabcada0b8
6 changed files with 98 additions and 70 deletions

View File

@@ -101,7 +101,7 @@
<h3>Export to a different format:</h3>
<p>This creates 'newlogbook.html' in the years/&lt;year&gt;/ folder
<p>This creates 'logbook-new-format.html' in the years/&lt;year&gt;/ folder
<table>
<tr>
@@ -128,8 +128,7 @@
Output style:
<select name="extension">
<option value="html2005">.html file - 2005 style</option>
<option value="html2022">.html file - 2022 style</option>
</select>
</select>
</p>
<p>
<input name="download_logbook" type="submit" value="Download logbook" />

View File

@@ -1,26 +1,27 @@
<!DOCTYPE html>
<html>
<head><title>{{logbook_entries.0.expedition}} Expo Logbook</title></head>
<link rel="stylesheet" type="text/css" href="../../css/main2.css" />
<style type="text/css">
.tripdate { float: left;}
.trippeople { float: right;}
.triptitle { font-size: 120%; text-align: center; font-weight: bold; clear: both }
.timeug { text-align: right; font-weight: bold }
p { clear: both }
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{logbook_entries.0.expedition}} Expo Logbook</title>
<link rel="stylesheet" href="../../css/main2.css" />
</head>
<!-- Exported by troggle in this format after having been imported using a different format and a different parser.
This is because we are steadily converting old formats to a new common format so that we do not need to maintain half
a dozen parser functions.
Exported on {% now 'Y-m-d D' %} using control panel webpage and exportlogbook() in troggle/code/views/other.py
-->
<body>
<h1>Expo {{logbook_entries.0.expedition}}</h1>
{%for logbook_entry in logbook_entries%}
<hr />
<div class="tripdate" id="t{{logbook_entry.date}}A">{{logbook_entry.date}}</div>
<div class="trippeople"><u>{{logbook_entry.author.person}}</u>
{% for persontrip in logbook_entry.persontrip_set.all %}{{ persontrip.personexpedition.person }} {{ persontrip.personexpedition.time_underground }}, {% endfor %}
</div>
<div class="tripdate" id="{{logbook_entry.slug}}">{{logbook_entry.date|date:'Y-m-d'}}</div>
<div class="trippeople">{% for persontrip in logbook_entry.persontrip_set.all %}{% if persontrip.is_logbook_entry_author %}<u>{{persontrip.personexpedition.person}}</u>{% else %}{{ persontrip.personexpedition.person }}{% endif %}, {% endfor %}</div>
<div class="triptitle">{{logbook_entry.place}} - {{logbook_entry.title}}</div>
{{logbook_entry.text|safe}}
<div class="timeug">T/U: {{logbook_entry.time_underground}}</div>
{% endfor %}
<hr />
</body>
</html>