CLI part of Linked Software Artifacts project
Project description
LSA (Linked Software Artifacts) CLI
A part of LSA project,
this CLI tool is used to parse annotations
from source code and convert them
to entities
. Entities are then used to visualize the codebase on the
webpage.
Installation
pip install lsa-cli
Usage
lsa-cli <path-to-source-code>
Options:
-a, --annotations Save intermediate annotations model as JSON
-c, --config Path to the configuration file
Configuration file
Default configuration file is .lsa-config.json
in the current working directory.
You can specify the path to the configuration file using the -c
option.
lsa-cli -c <path-to-config-file> <path-to-source-code>
If the file is not found, default configuration is used:
{
"markers": {
"prefix": "@lc-",
"identifier": "identifier",
"name": "name",
"type": "type",
"description": "description",
"entity": "entity",
"property": "property",
"method": "method",
"source": "source"
},
"output": {
"entities": "entities.json",
"annotations": "annotations.json"
},
"parser": {
"exclude": [],
"extend": {}
},
}
markers
In the markers
section you can specify the names of the fields that are used
in the annotations.
output
In the output
section you can specify the names of the files where the
entities and annotations will be saved.
parser
In the parser
section you can specify the file extensions that should be
parsed and the files that should be excluded from the parsing.
Example:
...
"parser": {
"exclude": ["node_modules"],
"extend": {
"cjs": "application/javascript",
"mjs": "application/javascript",
"jsx": "application/javascript"
}
}
...
Development
Installation
poetry install
Usage
poetry run lsa-cli
Testing
pytest -c pyproject.toml
Formatting
poetry run poe format-code
Pre-commit
poetry shell
pre-commit install
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.