Anonymous avatar Anonymous committed 5fe4ef7

reproduces trxht.py basic functionality for 200703sxsw-aus data

Comments (0)

Files changed (1)

travel-voucher.kid

+<?xml version="1.0" encoding="utf-8"?><!--*- nxml -*-->
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://purl.org/kid/ns#"
+      >
+  <head profile="http://www.w3.org/2003/g/data-view
+		 http://purl.org/NET/erdf/profile">
+    <title>SxSWi Travel Expense Voucher</title>
+    <!-- @@TODO: refactor as extension of MIT expense voucher template -->
+  <link rel="transformation"
+	href="http://www.w3.org/2002/12/cal/glean-hcal.xsl"/>
+  <style type="text/css">
+tbody.vevent tr.trx td { border-top: 1px solid }
+tbody.vevent td { padding: 3px; margin: 0}
+.amt { text-align: right }
+.even { background: grey }
+</style>
+
+<?python from trxtsv import isoDate, numField ?>
+
+  </head>
+<body>
+
+<h1>Transactions</h1>
+<div>Filter info: ${`criteria`}</div>
+
+<table>
+<!-- @@TODO: split table every 100 transactions? -->
+
+<tbody py:for="t in transactions" class='vevent'>
+ <?python date = t["trx"]["date"] ?>
+ <!-- todo grey/parity -->
+ <tr class='trx'>
+  <td><abbr class='dtstart' title='${isoDate(date)}'>${date}</abbr></td>
+  <td>${t["trx"].get("payee",'')}</td> <!-- descElt hcard stuff@@ -->
+
+  <?python num, splitflag, trxty = numField(t["trx"].get('num', '')) ?>
+
+  <td>${num or trxty or ''}</td>
+  <td>${t["trx"]['acct']}</td>
+ </tr>
+ <tr py:for="split in t['splits']" class='split description'>
+   <td></td>
+   <td>${split.get('memo', '')}</td>
+   <td>${split.get('clr', '')}</td>
+   <td>${split.get('L', '')}</td>
+   <td class='amt'>${split.get('subtot', '')}</td>
+</tr>
+
+</tbody>
+
+</table>
+
+</body>
+</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.