pipeworks_mud_mapper.services.db_tools

Utility helpers for backing up and exporting the mapper SQLite database.

Functions

backup_db(db_path, output_path)

Create a consistent backup of the SQLite database.

dump_db_sql(db_path, output)

Write a SQL dump of the database to the given output stream.

export_map_json(db_path, output_dir[, map_id])

Export authoring map JSON files from SQLite.

export_zone_json(db_path, output_dir[, map_id])

Export zone JSON files (game truth) from SQLite.

Module Contents

pipeworks_mud_mapper.services.db_tools.backup_db(db_path, output_path)[source]

Create a consistent backup of the SQLite database.

Uses the SQLite backup API so the copy is consistent even while the app has the database open.

pipeworks_mud_mapper.services.db_tools.dump_db_sql(db_path, output)[source]

Write a SQL dump of the database to the given output stream.

pipeworks_mud_mapper.services.db_tools.export_map_json(db_path, output_dir, map_id=None)[source]

Export authoring map JSON files from SQLite.

pipeworks_mud_mapper.services.db_tools.export_zone_json(db_path, output_dir, map_id=None)[source]

Export zone JSON files (game truth) from SQLite.