From 5de99d28021bfc8a68424e9ed1c4f417928fbb75 Mon Sep 17 00:00:00 2001 From: Ben West Date: Mon, 4 May 2015 16:53:37 -0700 Subject: [PATCH] bump version, new tool pretty print carelink csv --- bin/mm-pretty-csv | 13 +++++++++++++ setup.py | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 bin/mm-pretty-csv diff --git a/bin/mm-pretty-csv b/bin/mm-pretty-csv new file mode 100755 index 0000000..dbbddb8 --- /dev/null +++ b/bin/mm-pretty-csv @@ -0,0 +1,13 @@ +#!/bin/bash + +INPUT=${1-'-'} + +cat $INPUT \ + | cut -d',' -f 1-4,34- \ + | while IFS=',' read x dd tt dt name details; do + if [[ -n "$details" && -n "$dd$tt$dt$name" ]] ; then + _date=$( (date --date="$dt" +%FT%T || echo $dt) 2>/dev/null) + echo "$_date,$name,$details" + fi + done + diff --git a/setup.py b/setup.py index 9e2cf22..6049cc6 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ def readme(): return f.read() setup(name='decocare', - version='0.0.9', # http://semver.org/ + version='0.0.10', # http://semver.org/ description='Audit, inspect, and command MM insulin pumps.', long_description=readme(), author="Ben West", @@ -28,6 +28,7 @@ def readme(): 'bin/mm-latest.py', 'bin/mm-bolus.py', 'bin/mm-set-rtc.py', + 'bin/mm-pretty-csv', ], classifiers = [ 'Development Status :: 3 - Alpha',