From 1ccf45a97d237af5b385f0cf6f174799e0fe88f3 Mon Sep 17 00:00:00 2001 From: Markus Bilz Date: Sun, 7 Jan 2024 14:26:42 +0100 Subject: [PATCH] refactor: remove 'test.py' --- utils/test.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 utils/test.py diff --git a/utils/test.py b/utils/test.py deleted file mode 100644 index c7b7b21..0000000 --- a/utils/test.py +++ /dev/null @@ -1,39 +0,0 @@ -import sys -import pathlib -from ccl_chrome_indexeddb import ccl_chromium_indexeddb - - -def main(args): - ldb_path = pathlib.Path(args[0]) - wrapper = ccl_chromium_indexeddb.WrappedIndexDB(ldb_path) - - for db_info in wrapper.database_ids: - db = wrapper[db_info.dbid_no] - print("------Database------") - print(f"db_number={db.db_number}; name={db.name}; origin={db.origin}") - print() - print("\t---Object Stores---") - for obj_store_name in db.object_store_names: - obj_store = db[obj_store_name] - print( - f"\tobject_store_id={obj_store.object_store_id}; name={obj_store.name}" - ) - try: - one_record = next(obj_store.iterate_records()) - except StopIteration: - one_record = None - if one_record is not None: - print("\tExample record:") - print(f"\tkey: {one_record.key}") - print(f"\tvalue: {one_record.value}") - else: - print("\tNo records") - print() - print() - - -if __name__ == "__main__": - if len(sys.argv) < 2: - print(f"USAGE: {pathlib.Path(sys.argv[0]).name} ") - exit(1) - main(sys.argv[1:])