https://github.com/deepsourcecorp/dracula
Library to calculate lines of code for a given project. Works for all languages.
https://github.com/deepsourcecorp/dracula
Last synced: 5 months ago
JSON representation
Library to calculate lines of code for a given project. Works for all languages.
- Host: GitHub
- URL: https://github.com/deepsourcecorp/dracula
- Owner: DeepSourceCorp
- License: mit
- Created: 2022-12-08T08:42:14.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-07-08T03:58:29.000Z (7 months ago)
- Last Synced: 2025-08-17T23:53:23.614Z (5 months ago)
- Language: Rust
- Size: 104 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# "Count" Dracula
A parser + utils for counting lines and figuring out their meaningfulness for better line counting API.
Can identify lines based on the following criteria:
- Blank, (contains only whitespace)
- Meaningless (has no impact on the code, e.g. braces, comments, etc.)
- Comment (number of lines with comments)
- String (strings, language strings, raw strings, literal strings, format strings, etc.)
- Source (the actual code)
## How to run?
Tentative, planned to be made into a library + binary.
The APIs for use as libraries are WIP.
```sh
# to test
cargo test
# to run as a dumb util
cargo run -- /path/to/file
```
## Table of Contents
- ["Count" Dracula](#count-dracula)
- [How to run?](#how-to-run)
- [Table of Contents](#table-of-contents)
- [Key Goals](#key-goals)
- [Works with](#works-with)
- [Dependencies](#dependencies)
- [Development](#development)
- [Credits](#credits)
## Key Goals
- General enough to work over any language.
- Performant enough to work with as many files as possible, and allow scanning huge files.
- Pull Parsing for lazy parsing of the code to allow flexible usage.
## Works with
- C & C++
- Python
- Rust
- etc...
## Dependencies
Default runtime dependencies: None.
Rust version dependencies:`1.59.0` (Could possibly work with older Rust versions)
## Development
## Credits