* Added custom data processor classes where the following methods are called on a per value basis - process_type_<type_name>(field_data) - process_field_<field_name>(field_data) - def process_message_<mesg_name>(data_message) * Updated profile.py and its data structures in record.py to leave out values in its `__init__` method and have None by default. (Updated profile export script as well) * Tweaked `__str__`/`__repr__` methods on records.py classes * Minor Refactor For Timestamp Field and Record Base Class * Made the argparse module a `setup.py`/pip requirement for Python 2.6 and lower in anticipation in using it for the fitdump script.
* Renamed/added some keywords for consistency * Added readable __repr__()'s to some record objects (WIP) * Changed record objects with unknown names to be named "unknown-NN" where NN is the relevant definition message number or field definition number.
Committing the work I've been doing over the past little while on a rewrite for python-fitparse. Major Changes ------------- * New, hopefully cleaner public API with a clear division between accessible and internal parts. (Still unstable and partially complete.) * Proper documentation! Going to use Sphinx. * Unit tests and example programs. * (WIP) Command line tools (eg a `.FIT` to `.CSV` converter). * Component fields and compressed timestamp headers now supported and not just an afterthought. Closes issues #6 and #7. * FIT file parsing is generic enough to support all types. Going to have specific `FitFile` subclasses for more popular file types like activities. * (WIP) Converting field types to normalized values (for example, `bool`, `date_time`, etc) done in a consistent way, that's easy to customize by subclassing the converter class. I'm going to use something like the Django form-style `convert_<field name>` idiom on this class. * The FIT profile is its own complete python module, rather than using `profile.def`. * Bonus! The profile generation script is less ugly (but still an atrocity) and supports every ANT FIT SDK from version 1.00 up to 5.10. * A working `setup.py` module. Closes issue #2, finally! I'll upload the package to PyPI when it's done. * Support for parsing one record at a time. This can be done using `<FitFile>.parse_one()` for now, but I'm not sure of the exact implementation yet.