Gnumed.timelinelib.db.backends.file.FileTimeline

Package Gnumed :: Package timelinelib :: Package db :: Package backends :: Module file :: Class FileTimeline |
[frames] | no frames]

# Class FileTimeline

source code

             object --+
                      |
    observer.Observable --+
                          |
            memory.MemoryDB --+
                              |
                             FileTimeline

    The general format of the file looks like this for version >= 0.3.0:

      # Written by Timeline 0.3.0 on 2009-7-23 9:40:33
      PREFERRED-PERIOD:...
      CATEGORY:...
      ...
      EVENT:...
      ...
      # END

    Only the first and last line are required. See comments in _load_*
    functions for information how the format looks like for the different
    parts.

Instance Methods
__init__(self, path) Create a new timeline and read data from file. | source code
Inherited from `memory.MemoryDB`: `delete_category`, `delete_event`, `disable_save`, `enable_save`, `find_event_with_id`, `get_all_events`, `get_categories`, `get_containers`, `get_events`, `get_first_event`, `get_last_event`, `get_time_type`, `is_read_only`, `load_view_properties`, `place_event_after_event`, `place_event_before_event`, `save_category`, `save_event`, `save_view_properties`, `search`, `supported_event_data` Inherited from `observer.Observable`: `register`, `unregister` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, path) (Constructor) | source code
Create a new timeline and read data from file. If the file does not exist a new timeline will be created. Overrides: object.__init__