expoweb/handbook/troggle/exportjson.html

43 lines
1.9 KiB
HTML
Raw Normal View History

2021-04-12 23:07:38 +01:00
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Handbook Troggle JSON</title>
2024-02-09 00:01:17 +00:00
<link rel="stylesheet" type="text/css" href="/css/main2.css" />
2021-04-12 23:07:38 +01:00
</head>
2021-04-29 13:00:37 +01:00
<body>
<style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style>
2021-04-12 23:07:38 +01:00
<h2 id="tophead">CUCC Expedition Handbook</h2>
<h1>Handbook Troggle JSON</h1>
<p>
We can export cave and expo data with Django templates that generate JSON, which is <a href="https://www.cuyc.org.uk/committee/events_json_short/">what CUYC do</a> (and we have access to their code).
We already have a proof of principle JSON export API working at
<a href="http://expo.survex.com/api/expeditions_json">expo.survex.com/api/expeditions_json</a> and we also have
a text-format export as TSV (tab-separated values), which are like comma-separated values and similarly importable into spreadsheets.
<h3>Expoadmin method</h3>
<img border="1" class="onright" src='json-cmd.jpg'/></a>
<p>Log in as 'expoadmin' (password: 'beery:cavey') at <a href="/admin/login/">/admin/login/</a> then look at the entries for any one of
the objects: Caves, Expeditions, People etc.
<p>
In the top left-hand corner is a drop-down menu, 'export as json' is shown selected in the image.
Select one or more of the objects listed and press the 'Go' button next to the drop-down menu. A JSON-formatted file will be produced 'troggle-ouput.json' in the troggle installation directory (where the troggle code .git file is).
<p>There is also an 'export as XML' option.
<p>The code which adds this capability into the Troggle Administration control panel is in <var>troggle/core/admin.py</var>.
2021-04-29 13:00:37 +01:00
<h3>See also</h3>
<p><a href="exporttgz.html">Compressed data export</a>.
2021-04-12 23:07:38 +01:00
<hr />
Go on to: <a href="trogarch.html">Troggle architecture</a><br />
Return to: <a href="trog2030.html">Troggle in 2025-2030</a><br />
Troggle index:
<a href="trogindex.html">Index of all troggle documents</a><br />
2021-04-29 13:00:37 +01:00
<hr /></body>
2021-04-12 23:07:38 +01:00
</html>