o2g/gtfs/gtfs_writer.py
def write_zipped(self, filepath):
        """Write the GTFS feed in the given file."""
        with zipfile.ZipFile(filepath, mode='w', compression=zipfile.ZIP_DEFLATED) as zfile:
            for name, buffer in self._buffers.items():
                encoded_values = io.BytesIO(buffer.getvalue().encode('utf-8'))
                zfile.writestr('{}.txt'.format(name),
                               encoded_values.getbuffer())
            for name, path in self._files.items():
                zfile.write(path, arcname=name)
def write_zipped(self, filepath):
        """Write the GTFS feed in the given file."""
        with zipfile.ZipFile(filepath, mode='w', compression=zipfile.ZIP_DEFLATED) as zfile:
            for name, buffer in self._buffers.items():
                encoded_values = io.BytesIO(buffer.getvalue().encode('utf-8'))
                zfile.writestr('{}.txt'.format(name),
                               encoded_values.getbuffer())
            for name, path in self._files.items():
                zfile.write(path, arcname=name)
Write the GTFS feed in the given file.