Files

15 lines
501 B
Python

#!/usr/bin/env python3
"""Export complete editable catalog, including inactive records; no secrets."""
import argparse
from pathlib import Path
import server
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('output', type=Path)
args = parser.parse_args()
if args.output.exists():
parser.error('Output exists. Choose a new file to avoid overwriting a backup.')
server.init_db()
print(server.export_import_bundle(args.output.resolve()))