https://github.com/weakish/nbcount
nbcount is a naive, bad counter for source code.
https://github.com/weakish/nbcount
Last synced: 3 months ago
JSON representation
nbcount is a naive, bad counter for source code.
- Host: GitHub
- URL: https://github.com/weakish/nbcount
- Owner: weakish
- License: other
- Created: 2016-10-07T00:23:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-07T00:23:12.000Z (over 9 years ago)
- Last Synced: 2025-03-02T05:28:33.595Z (over 1 year ago)
- Language: Makefile
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
nbcount is a naive, bad counter for source code.
Currently only supports code with single line comment starting with one of:
- `#`
- `"`
- `%`
- `--`
- `//`
- `REM`
No support for multi-line comments.
No distinguish comment marks between languages,
for example, `REM = 2` in C will be considered as comment line (not count).
Install
--------
### Dependencies
- sh
- grep
- wc
### With `make`
```sh
; git clone https://github.com/weakish/nbcount
; cd nbcount
; make
```
Files will be installed to `/usr/local/bin`.
If you want to install other place, edit `config.mk` before running `make`.
Makefile is compatible with both GNU make and BSD make.
### With basher
```sh
; basher install weakish/nbcount
```
### Manually
Copy `bin/nbcount` to `$PATH`.
Usage
------
cat source.code | nbcount
License
--------
0BSD