Add a simple, direct way to use BAT, without requiring to setup a venv etc.

Allows to use `python3 path/to/cli.py my args` just from source code,
without requiring to set up a whole venv for that. Much simpler when
only 'regular' debuging in code logic itself is needed.
This commit is contained in:
Bastien Montagne 2024-08-13 17:52:45 +02:00
parent 42dd5ec1b6
commit fe0b3e8f5e
2 changed files with 38 additions and 0 deletions

View File

@ -8,6 +8,15 @@ Blender Asset Tracer, a.k.a. BAT🦇, is the replacement of
Development is driven by choices explained in [T54125](https://developer.blender.org/T54125).
## Basic access to command line operations
The `cli.py` wrapper at the root of the project can be used to directly access the command line
tools, without requiring any setup involving `venv` and so on:
```
python3 path/to/repo/cli.py list path/to/blendfile.blend
```
## Setting up development environment
```

29
cli.py Normal file
View File

@ -0,0 +1,29 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Copyright (C) 2014-2018 Blender Foundation
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import blender_asset_tracer.cli
if __name__ == "__main__":
print("\n\n *** Running {} *** \n".format(__file__))
blender_asset_tracer.cli.cli_main()