A tool which turns project repo into a SQLite3 database. Use it to query various info about it.
Project description
psanalyzer
This tool supports 2 commands:
build
- it walks current work dir recursively, finds all files and dirs, calculates their hash and collects various info about every file/dir. Output is sqlite3 database.- Default db path is
${PWD}/psanalyzer.sqlite3
. You can open it with any sqlite3 tool and query it by yourself.
- Default db path is
query
- it runs hardcoded SQL queries against sqlite3 database.- run
psanalyzer query --help
to get a list of supported queries
- run
Example:
$ cd project
$ psanalyzer build
Total files found: 2056
Total dirs found: 333
Processing files: 100%|██████████████████████████████████████████| 2056/2056 [00:00<00:00, 6991.67files/s]
Processing dirs: 100%|█████████████████████████████████████████████| 333/333 [00:00<00:00, 7816.48dirs/s]
Success! Now run queries:
psanalyzer query duplicates --format csv > output.csv
$ psanalyzer query duplicates --format csv
path,hash,size_bytes,type
.venv\Scripts\pip.exe,314bc6d461c15eab5ce073d44e735efceb8ac76f6182e626effd20f56a97ee47,108412,file
.venv\Scripts\pip3.10.exe,314bc6d461c15eab5ce073d44e735efceb8ac76f6182e626effd20f56a97ee47,108412,file
.venv\Scripts\pip3.exe,314bc6d461c15eab5ce073d44e735efceb8ac76f6182e626effd20f56a97ee47,108412,file
.venv\Scripts\pip-3.10.exe,314bc6d461c15eab5ce073d44e735efceb8ac76f6182e626effd20f56a97ee47,108412,file
.venv\Scripts\wheel.exe,2908e4480db497f164d0a157b62baa8f8875a5f5f192f2c3337b1b0654581386,108399,file
.venv\Scripts\wheel3.10.exe,2908e4480db497f164d0a157b62baa8f8875a5f5f192f2c3337b1b0654581386,108399,file
.venv\Scripts\wheel3.exe,2908e4480db497f164d0a157b62baa8f8875a5f5f192f2c3337b1b0654581386,108399,file
.venv\Scripts\wheel-3.10.exe,2908e4480db497f164d0a157b62baa8f8875a5f5f192f2c3337b1b0654581386,108399,file
.venv\Lib\site-packages\setuptools\cli.exe,75f12ea2f30d9c0d872dade345f30f562e6d93847b6a509ba53beec6d0b2c346,65536,file
.venv\Lib\site-packages\setuptools\cli-32.exe,75f12ea2f30d9c0d872dade345f30f562e6d93847b6a509ba53beec6d0b2c346,65536,file
.venv\Lib\site-packages\setuptools\gui-32.exe,5c1af46c7300e87a73dacf6cf41ce397e3f05df6bd9c7e227b4ac59f85769160,65536,file
.venv\Lib\site-packages\setuptools\gui.exe,5c1af46c7300e87a73dacf6cf41ce397e3f05df6bd9c7e227b4ac59f85769160,65536,file
.venv\Lib\site-packages\setuptools\_vendor\packaging\specifiers.py,fb76a36790a442b8cd5b91fc34f8ef095d91060afec3dc1c60175bf248cf05f8,39046,file
........
- Does not depend on GIT.
- Cross-platform. If something doesn't work it's a bug.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
psanalyzer-0.1.0.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file psanalyzer-0.1.0.tar.gz
.
File metadata
- Download URL: psanalyzer-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e6968ae699d8425a83972f0619e71a58232667fefac34e22cce66f5f19e781 |
|
MD5 | cabfff23969f9a8b756a42053e2b8c1c |
|
BLAKE2b-256 | 4f944324134d6d264176cc8371ac22a039e004ec9b0d2f826ce2d0d997e9aabf |
File details
Details for the file psanalyzer-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: psanalyzer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a71c98cd36e0a90b247bd33b1ac893798d5877cb554619f5f3d18148922f4b2 |
|
MD5 | d25384c61475512ea762a83ed64b5a57 |
|
BLAKE2b-256 | 4044c2e6ffb700f79f07442784d8a245b381e79520b91a9eae8298a7e4760846 |