m-zakeri / OpenUnderstand

An open-source implementation of Understand Python API
https://m-zakeri.github.io/OpenUnderstand/
MIT License
12 stars 47 forks source link
antlr4 code-metrics compiler java static-analysis symbol-table understand

OpenUnderstand

OpenUnderstand Logo

An open-source implementation of Understand API in Python.

Useful links

Configuration Setup Script

This script allows you to set up and save configuration options using command-line arguments.

Prerequisites

Usage

  1. Open a terminal or command prompt.

  2. Run the script with the following command:

Options

  1. Provide the desired values for the options you want to set. If any option is not provided, default values will be used.

  2. Once the script finishes, a config.ini file will be generated with the provided or default values.


To set up the configuration options with specific addresses, run the following command:

python openunderstand.py [-r REPO_ADDRESS] [-dba DB_ADDRESS] [-dbn DB_NAME] [-e ENGINE_CORE] [-l LOG_ADDRESS]

Arguments

This will save the provided addresses in the config.ini file.

If you don't provide any options, default values will be used for all addresses.

python openunderstand.py

This will generate a config.ini file with default values.

[DEFAULT]

Feel free to modify the default values directly in the config.ini file.


Default Values

If an argument is not provided, the following default values will be used:

repo_address: Current working directory with "project" appended.

db_address: Current working directory.

db_name: "default.oudb".

engine_core: "Python".

log_address: Current working directory with "app.log" appended.

Examples

1.Set the repository address to "/path/to/repo":

python openunderstand.py -r /path/to/repo

2.Set the database address to "/path/to/db", the database name to "database.oudb", and the engine core to "C++":

python cli.py -dba /path/to/db -dbn database.oudb -e C++

3.Set the log address to "/path/to/log/file.log":

python cli.py -l /path/to/log/file.log

BUILDING

python3 setup.py sdist bdist_wheel