https://github.com/croketillo/docstring-tool
Include/remove docstrings at any python file found in the specified folder.
https://github.com/croketillo/docstring-tool
docstring docstring-documentation docstring-generator docstring-tool docstrings
Last synced: 3 months ago
JSON representation
Include/remove docstrings at any python file found in the specified folder.
- Host: GitHub
- URL: https://github.com/croketillo/docstring-tool
- Owner: croketillo
- License: gpl-3.0
- Created: 2023-11-04T16:12:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-06T05:07:52.000Z (over 1 year ago)
- Last Synced: 2025-01-21T10:09:38.919Z (5 months ago)
- Topics: docstring, docstring-documentation, docstring-generator, docstring-tool, docstrings
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DocString Tool
DOCSTRING TOOL is a script to include/remove docstrings at the beginning of any python file found in the specified folder.
The docstring text is stored in a file that will be specified by the user. It is possible to store tags to include in the text in ```docstring.cnf``` to be able to reuse docstring texts.## Usage
```
usage: dstr.py [-h] {add,del,show} ...Tool for managing docstrings in .py files
positional arguments:
{add,del,show} Available subcommands
add Add docstrings to .py files [-r for recursive]
del Remove docstrings from .py files [-r for recursive]
show Preview docstring textoptions:
-h, --help show this help message and exit
```### Usage add/del
Adds or removes the docstring specified in the file to all files with the extension ".py" in the specified directory.
```
usage: dstr.py add [-h] [-r] directory text_filepositional arguments:
directory Path to the directory where the .py files are located
text_file Path to the external file with the text for the docstringoptions:
-h, --help show this help message and exit
-r, --recursive Recursive search for .py files
```### Usage show
Shows how the docstring of the specified file looks like.
```
usage: dstr.py show [-h] text_filepositional arguments:
text_file Path to the external file with the text for the docstringoptions:
-h, --help show this help message and exit
```## EXAMPLE
``` python3 dstr.py add -r ./test_directory docstring_sample.txt ```