Crates.io | commentator |
lib.rs | commentator |
version | 0.2.3 |
source | src |
created_at | 2022-01-14 16:02:16.014566 |
updated_at | 2022-02-03 13:57:37.508285 |
description | Source code comments extractor binary and SDK |
homepage | |
repository | |
max_upload_size | |
id | 513931 |
size | 26,434 |
Commentator is a fucking fast source code comments finder CLI and Rust SDK (crate).
work in progress.
Existing source code comments extractors (see References) forcomments extracting are quite slow, not always accurate (don't find all comments) or doesn't provide SDK. This tool fixes all of this.
This library could be used as CLI or from code.
To build CLI from sources (you need Rust and Cargo installed):
# clone repo
git clone https://github.com/g4s8/commentator.git
cd commentator
# build with cargo
cargo build --release --bin commentator --features feat-bin
# move binary to your $PATH
sudo mv ./target/release/commentator /usr/local/bin
Or download from release pages: https://github.com/g4s8/commentator/releases/tag/0.1.0
commentator
require file name argument and supports these options:
--format
- output format: either plain
or json
--lang
- language comment specification, one of:
c
,java
, go
, cpp
- for C-like comment syntaxrust
- Rust comments syntaxbash
- for Bash, Python and Rubyhtml
- for HTML, XML--trim
- trim comment symbols and whitespaces, align to the first
sentence indent.Example:
./commentator --format=json --lang=java filename.java
TODO: SDK usage