Skip to content
/ gloc Public

Count and badge the lines of code in a github repository.

Notifications You must be signed in to change notification settings

shdwmtr/gloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LOC Badge  

A simplistic web wrapper for codetabs loc to create custom badges for project readme's.

Setup

the live build is at https://loc-counter.onrender.com/

Parameter Name Description Optional Default Value
repo repository in owner/repo format -
vendor github or gitlab github
ignored relative path or file to exclude from count. comma seperated -
branch target branch master
languages whitelisted languages to count. to find langauge strings, go to count loc, put in your repo details, go to network tab in inspector, find the api request and open it in a new tab. you'll see all the available languages in your repo. -
stat specificy what to count. input types are linesOfCode, comments, blanks, lines, files linesOfCode

Important

Remember to properly url encode your request otherwise special characters wont work.

Example

https://loc-counter.onrender.com?repo=ShadowMonster99/LOC-Counter&branch=master&ignored=pnpm-lock.yaml,README.md,package.json,.gitignore&stat=lines

Using in Markdown

head over to https://shields.io/badges/endpoint-badge and put your LOC counter url as the query url.

You can then use the generated badge in markdown!

Note

You can also override any of the properties in the schema by adding them as an extra query param in the result url

About

Count and badge the lines of code in a github repository.

Topics

Resources

Stars

Watchers

Forks