Simple CLI tool to extract table names from query files.
leblanko
provides an easy way to put accross a clearer summary of all SQL tables used in your project.
TODO: publish package to PYPI
Install the latest version of leblanko
:
pip install git+https://github.com/axelbellec/leblanko.git
No external dependencies: leblanko
only use python internal libraries like os
, re
and argparse
.
Extract SQL table names inside query.sql
.
leblanko query.sql
leblanko
supports pathnames so you can use it to inspect recursively an entire folder, e.g.:
leblanko queries/
If you only want to scan a bunch of SQL files you can specify file extension:
leblanko *.sql
It also supports ZSH shortcuts. Suppose we want to summarize table names coming from 3 SQL query files:
leblanko *.sql
... is interpreted as:
leblanko query_1.sql query_2.sql query_3.sql
You can clone this repository:
git clone https://github.com/axelbellec/leblanko.git
Install test dependencies:
pip install -r dev-requirements.txt
Then, launch test suite:
./launch_tests.sh