-
Notifications
You must be signed in to change notification settings - Fork 20
Usage Guide
Ayush Bhardwaj edited this page Jul 5, 2020
·
4 revisions
Nirjas is a fully dedicated python library to extract the comments and source code out of your file(s). The extracted comments can be processed in various ways to detect licenses, generate documentation, process info, etc.
Apart from that, the library serves you with all the required metadata about your Code, Comments and File(s)
- To extract comments out of a source file.
- To extract comments out of a whole project directory (Each and every source files one by one).
- To get all the metadata regarding comments (Single line and Multiline) and file.
The metadata includes comments line number(start & end), file name, language, blank lines, sloc, total lines, etc
- To extract only the source code from a file(leaving all the comments)
- For help
nirjas -h
- To extract comments from a single file
nirjas -p <path to file>
- To extract comments from all the files in directory/sub-directory
nirjas -p <path to directory>
- To extract only source code (excludes commented part) out of a file
nirjas -i <target file> -s <new file name including extension>
or for default file generation (default file: source.txt)
nirjas -i <target file>
If you encounter any bug in the usage, feel free to raise an issue.