XAMPPRocky / tokei

Count your code, quickly.
Other
11.21k stars 537 forks source link

Badge not working #881

Closed 3kh0 closed 1 year ago

3kh0 commented 2 years ago

I have a repo with over 200k lines of code and it is only showing 0 lines.

Here is the repo: https://github.com/3kh0/3kh0.github.io

Here is what I see: Lines of code

ljedrz commented 2 years ago

No need to look that far, the same happened with tokei 😃.

ljedrz commented 2 years ago

Seems to be working again :+1:.

DomWilliams0 commented 2 years ago

It's broken again, showing 0 lines :crying_cat_face:

ekzhang commented 2 years ago

I also ran into the server being a bit on/off. If you want to set up your own mirror of tokei, I figured out how to do this in ~5 minutes with Render.

Since the tokei_rs web application is just a standard Actix app that you can run with cargo run --release, and it serves web requests to a HTTP port, you can just make a web service on Render, enter https://github.com/XAMPPRocky/tokei_rs as the source of the code, set the build to Rust, and keep all of the default options. It'll automatically compile and build the code. E.g., I have one running on tokei.ekzhang.com right now.

Here's an example badge from it (https://tokei.ekzhang.com/b1/github/XAMPPRocky/tokei):

This also costs me $0/month with their free plan, which is nice.

sgbaird commented 2 years ago

@ekzhang thank you! Planning to use your server for now if that's OK. https://tokei.ekzhang.com/b1/github/sparks-baird/mat_discover

aschey commented 2 years ago

I tried self-hosting using Render as suggested above, but sometimes I was having issues with request timeouts, so I decided to port the API to a Vercel serverless function: https://github.com/aschey/vercel-tokei. You can fork the repo and host it on your own Vercel account for free or you can use the URL I provided in the repo. I've been using it for a few months now and it's been working great so far. It should be pretty resilient against going down for very long since it's serverless and the containers it runs on will frequently be destroyed and recreated.

3kh0 commented 1 year ago

Is this still a issue?

AnalogFeelings commented 1 year ago

Is this still a issue?

From my repositories, yes, it still is an issue.

3kh0 commented 1 year ago

Damn, over a whole year too

XAMPPRocky commented 1 year ago

Thank you for your issue! I'm going to close as a duplicate of https://github.com/XAMPPRocky/tokei_rs/issues/123 and wont fix. I don't control shields.io. I can't do anything about their implementation, I only control using tokei.rs directly.

Damn, over a whole year too

@3kh0 This a passion project I maintain in my spare time after a full-time job, other obligations, and other side-projects. Maintaining popular services require time and money, GitHub sponsors barely cover food for the month, so you can understand why this not my focus.

3kh0 commented 1 year ago

@XAMPPRocky I completely understand, luck to you!

calebcartwright commented 1 year ago

hey there @XAMPPRocky :wave: I'm one of the maintainers of Shields and wanted to chime in (and to be clear, not in opposition to closing this issue; I agree with closing it), but more specifically on this :point_down:

I'm going to close as a duplicate of https://github.com/XAMPPRocky/tokei_rs/issues/123 and wont fix. I don't control shields.io. I can't do anything about their implementation, I only control using tokei.rs directly.

I'm not completely convinced that I correctly understand this, but it gives me the impression you believe there's an issue on our side, which if so would puzzle me.

We're not doing anything particularly interesting nor esoteric from Shields, we're simply querying the tokei.rs API with the json content type header, and then looking at the response. We've seen https://github.com/XAMPPRocky/tokei_rs/issues/123 intermittently (where the API responds with values of 0), and more recently https://github.com/XAMPPRocky/tokei_rs/issues/233 where the API response structure changed at some point and no longer contains the lines field.

If you think there's something we're missing and/or need to do differently to properly consume your API then please let us know (feel free to tag me on any relevant issues in tokei.rs or reach out to us in https://github.com/badges/shields)

AleixMT commented 8 months ago

2024 and this issue is still happening. We know it is a tokei problem, not a problem with shields.io, but anyway I thought that they were going to fix it...

XAMPPRocky commented 8 months ago

There's no "they" there's only me, and I am not paid to work on this project. It's a personal project. If you want a more reliable service feel free to host it yourself. 🙂

AleixMT commented 8 months ago

There's no "they" there's only me, and I am not paid to work on this project. It's a personal project. If you want a more reliable service feel free to host it yourself. 🙂

Okay, sorry for my ignorance. I completely understand. So it is a problem about the cost of hosting and not about the code not working right?

Anyway, either if you can or can't fix it I think this is a very valuable software and it should be a service that is integrated in github... At least we could sponsor you (this is what I will do). Thank you!