예제 #1
0
    def save(self):
        """
        Store the activity list in a file.

        This only stores the list data, not the actual activities.
        """
        serialise.dump(self.serialised(), self.path / LIST_FILENAME, gz=True)
예제 #2
0
 def save(self, path):
     serialise.dump(self.save_data,
                    path / f"{self.activity_id}.json.gz",
                    gz=True)
예제 #3
0
 def save(self):
     """Save settings to a configuration file."""
     serialise.dump(dataclasses.asdict(self), paths.SETTINGS, readable=True)
예제 #4
0
 def write(self):
     serialise.dump({str(k): v
                     for k, v in self.state.items()},
                    paths.SYNC_STATE,
                    gz=True)
예제 #5
0
def save_unsynced_edited(data):
    serialise.dump(list(data), paths.UNSYNCED_EDITED)