From c74dc32dafd9ef9f8efbb580a09b4252093e44b5 Mon Sep 17 00:00:00 2001 From: Markus Bilz Date: Sun, 7 Jan 2024 14:18:17 +0100 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20add=20gh=20action=20for=20build=20?= =?UTF-8?q?=F0=9F=90=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..de9eade --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,22 @@ +on: + push: +jobs: + build: + name: Build exectuable 📦 + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt pyinstaller + - name: Build binary 🔢 + run: pyinstaller "main.spec" + - name: Run conversion ↩️ + run: .\dist\ms_teams_parser.exe -f ".\testdata\John Doe\IndexedDB\https_teams.microsoft.com_0.indexeddb.leveldb" -o "current_output.json" + # - name: Calculate diff 👽 + # run: git diff --no-index --word-diff expected_output/john_doe.json current_output.json From 1ccf45a97d237af5b385f0cf6f174799e0fe88f3 Mon Sep 17 00:00:00 2001 From: Markus Bilz Date: Sun, 7 Jan 2024 14:26:42 +0100 Subject: [PATCH 2/2] 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:])