Skip to content

Commit 6c2c4ac

Browse files
committed
Add shebang to .pyz and update README to use .pyz as executable
1 parent 608085c commit 6c2c4ac

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@
99
```sh
1010
sudo apt-get install python3-cairocffi
1111

12-
curl -LO --output-dir ~ https://github.com/leonyu/mysql-visual-explain-cli/releases/latest/download/mysql_visual_explain_cli.pyz
12+
curl -L https://github.com/leonyu/mysql-visual-explain-cli/releases/latest/download/mysql_visual_explain_cli.pyz -o ./mysql_visual_explain_cli
13+
chmod +x ./mysql_visual_explain_cli
1314
```
1415

1516
### Convert JSON Explain file to PNG
1617
```
17-
python3 ~/mysql_visual_explain_cli.pyz explain.json explain.png
18+
./mysql_visual_explain_cli explain.json explain.png
1819
```
1920

2021
### Pipe EXPLAIN Output from MySQL to CLI
2122

2223
```
23-
mysql example.com -ABN --raw -e "EXPLAIN FORMAT=JSON SELECT * FROM HelloWorld;" | python3 ~/mysql_visual_explain_cli.pyz - hello_world_explained.png
24+
mysql example.com -ABN --raw -e "EXPLAIN FORMAT=JSON SELECT * FROM HelloWorld;" | ./mysql_visual_explain_cli - hello_world_explained.png
2425
```
2526

2627
### Development (Poetry)
2728

2829
```sh
2930
poetry install
30-
poetry run python ./mysql_visual_explain_cli explain.json explain.png
31+
poetry run python ./mysql_visual_explain_cli/ explain.json explain.png
3132
```
3233

3334
## Notes

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ if command -v git; then
66
git clean -dfx
77
fi
88
mkdir -p dist
9-
python3 -m zipapp -c mysql_visual_explain_cli -o ./dist/mysql_visual_explain_cli.pyz
9+
python3 -m zipapp -c mysql_visual_explain_cli -p '/usr/bin/env python3' -o ./dist/mysql_visual_explain_cli.pyz
1010
7z l ./dist/mysql_visual_explain_cli.pyz

0 commit comments

Comments
 (0)