summaryrefslogtreecommitdiffstats
path: root/glucometer.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename the shim to match the old name.Diego Elio Pettenò2017-12-281-0/+7
|
* Move the binary script to glucometerutils/ and create a starting shim.Diego Elio Pettenò2017-12-281-150/+0
| | | | The shim needs to be renamed, but this makes the history simpler to read.
* Use Python3 Enum class for glucose units.Diego Elio Pettenò2017-12-281-1/+2
| | | | This makes the code more idiomatic and less brittle.
* Raise minimum Python version to 3.4, to allow using the enum module.Diego Elio Pettenò2017-12-281-2/+2
| | | | | Supporting older Python is becoming harder, and modern Python is more readable, particularly as it allows for less brittle code.
* Fix with_ketoneLeonard Lausen2017-10-021-1/+1
|
* Fix ketone readingLeonard Lausen2017-10-021-1/+1
|
* glucometer.py: add --with-ketone option to the dump actionSamuel Martin2017-09-251-0/+7
|
* glucometer.py: restrict sorting choices to the common reading fieldsSamuel Martin2017-09-251-1/+1
| | | | | This change mainly aims to avoid breaking the glucometer.py script when introducing the ketone reading in the following patches.
* Use python3 in the shebang to mark this as not Python 2-compatible.Diego Elio Pettenò2017-06-181-1/+1
| | | | | Thanks to DorianScholz for pointing this out in pull request #14, and pointing me at https://www.python.org/dev/peps/pep-0394/.
* Raise an exception right away if the Python version is unsupported.Diego Elio Pettenò2017-06-151-0/+4
| | | | | | | | As suggested by @DorianScholz in pull request #14. Use 3.2 as minimum version since that's what I originally targeted. I wonder if there is an easy way to track which features the code is relying upon to keep this up to date.
* Update message and fix line length.Diego Elio Pettenò2017-06-051-1/+2
|
* Merge pull request #13 from DorianScholz/make_dateutil_optionalDiego Elio Pettenò2017-05-301-2/+4
|\ | | | | Make dateutil optional:
| * Make dateutil optional:Dorian Scholz2017-05-301-2/+4
| | | | | | | | - import it only when user sets a date from a date string
* | Show import error when loading driver, so the actual cause of the problem can be seenDorian Scholz2017-05-301-3/+3
|/
* Add support for a "help" action that prints the driver module's docstring.Diego Elio Pettenò2017-04-171-0/+10
| | | | | | | | This allows the drivers to provide information on what they support directly, rather than relying on the README file. It also allows to provide further information for the quirkier devices. This is again trying to resolve Issue #9.
* glucometer: make the error fatal and more clear when setting an invalid date.Diego Elio Pettenò2017-04-151-2/+4
|
* glucometer: log a better error if the driver name is not found.Diego Elio Pettenò2017-04-151-1/+8
|
* all drivers: make --device optional at the tool level.Diego Elio Pettenò2017-04-151-2/+3
| | | | | | | | This requires the drivers to validate their device, but also means they can provide a more explicit error message for the user as to what should be passed. This is a first step to help solving Issue 9.
* Add a --vlog option to enable verbose logging.Diego Elio Pettenò2017-02-251-0/+8
| | | | | This helps adding debug information to drivers, particularly those sending encoded messages.
* Update copyrights, cleanup whitespace where needed.Diego Elio Pettenò2017-01-161-1/+1
|
* Move the readings-to-csv conversion to the Reading class.Diego Elio Pettenò2017-01-151-3/+1
|
* Fetch the device information in all commands.Diego Elio Pettenò2017-01-151-4/+6
| | | | It's usually cheap and can provide assurance the device is connected and the right type.
* Wrap the meter information to a namedtuple, instead of a string.Diego Elio Pettenò2017-01-151-1/+5
| | | | | | This matches the gdef MeterInfo message, and produces a similar (though not identical) string as before. Importantly, it allows providing semantic information.
* Add connect/disconnect methods to otultra2 and send \x11\r on connection.Diego Elio Pettenò2014-01-291-0/+4
| | | | | The otultraeasy requires explicit connect/disconnect so implementing this before is helpful.
* Add confirmation prompt to zero log argumentjimsiff2013-12-141-2/+7
| | | | | I’m sure there’s a cleaner way to do this, but I wanted a confirmation when zeroing the glucometer data log.
* Clean up the code to remove methods that should be functions and imports.Diego Elio Pettenò2013-12-111-1/+0
|
* Allow sorting the dumped data; sort by date by default.Diego Elio Pettenò2013-12-111-1/+11
| | | | | This changes the dump output for otultra2 devices as they would dump data in record format, last reading first.
* glucometer.py: if no unit is provided on command line, use the default of the meter.Diego Elio Pettenò2013-12-111-1/+5
|
* Generalise the meal/comment handling to the Reading object.Diego Elio Pettenò2013-12-111-2/+3
| | | | | While not all readers implement before/after meal notes, it's possible to implement an heuristics for that.
* Better error handling.Diego Elio Pettenò2013-12-081-21/+23
| | | | | If any exception is thrown by the library, print an error statement and return a non-zero exit value.
* Add a new command to dump the identification of the glucometer.Diego Elio Pettenò2013-12-081-4/+8
| | | | This allows to get the serial number, as well as other details about the glucometer once it's installed.
* otultra2: implement a zero log command to clear a device's memory.Diego Elio Pettenò2013-12-081-0/+9
|
* otultra2: implement decoding of meal and comment codes.Diego Elio Pettenò2013-12-081-1/+2
| | | | This also dumps the comment with the dump command.
* Read more data out of the OTUltra2 dump lines. Return data in a Reading object.Diego Elio Pettenò2013-09-291-2/+2
| | | | | The Reading object will be extended to cater for flags, comments and other device-specific information.
* glucometer: allow providing a freeform arbitrary date to set on the meter.Diego Elio Pettenò2013-08-041-2/+10
|
* glucometer: mark executable.Diego Elio Pettenò2013-08-031-0/+0
|
* Relicense everything under MIT license.Diego Elio Pettenò2013-08-031-1/+1
| | | | | There is no reason for me to use GPLv3 now that I'm not using the CRC32-Sick code, so I'll go with the most liberal license out there.
* glucometer: remove unused argv usage.Diego Elio Pettenò2013-08-031-2/+1
|
* Update function names to follow PEP8.Diego Elio Pettenò2013-08-031-3/+3
|
* Add utf-8 encoding specification to all files.Diego Elio Pettenò2013-08-031-0/+1
|
* glucometer: add support for selecting output units on dump.Diego Elio Pettenò2013-08-031-1/+4
|
* glucometer: fix script to actually work and provide actions.Diego Elio Pettenò2013-08-031-2/+13
|
* Initial import of the raw data.Diego Elio Pettenò2013-08-031-0/+42