Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ml31415
ml31415 / buildclean.py
Last active October 19, 2023 20:55
Clean up script for all temporary binaries and build artifacts, that might pile up within a python project and possibly disturb a clean execution.
#!/usr/bin/env python3
from shutil import rmtree
from sys import argv
from pathlib import Path
from typing import Iterable
DELETE_DIRS: set[str] = {
"build",
@ml31415
ml31415 / zodbtool.py
Created July 22, 2022 15:09
Toolkit for repairing and converting a ZODB file with all kinds of errors
"""
Tool to verify, update, migrate and pack the ZODB database. Ignores and or fix possible read errors in the process.
usage: zodbtool {verify,repair,convert,pack} [{verify,repair,convert,pack} ...]
[-h] [-f FILE | -c CONFIG] [-D] [-o OID] [-p] [--zlib] [--convert-py3]
[--encoding ENCODING] [--encoding-fallback [ENCODING_FALLBACKS ...]] [-v]
Verifies, converts, migrates or packs a ZODB database.
positional arguments: