Giter Site home page Giter Site logo

Comments (17)

viniciusdacal avatar viniciusdacal commented on August 15, 2024

Yah, I notice that too.
I think it's getting our currentStreak instead the longestStreak.

from write-code-every-day.

raphamorim avatar raphamorim commented on August 15, 2024

Yeah, I searching for others ways too.

Today the script takes rather longest streak only if are your currently longest streak.
'Cause Github API doesn't provide the longest streak, so I have to get this data manually (worst option ever).

What problems it generates?

1 - If you already spend 365 days and stopping the other. It simply does not credit the contributions.
2 - I need to run the build script to 00: 00h every day. (to create an automation)

I'm open to suggestions :)

from write-code-every-day.

orafaelfragoso avatar orafaelfragoso commented on August 15, 2024

Github makes it more complicated than it should actually be.

Maybe we could setup a background job to pull the contributions of the previous day and make our own database? We can reset the counter if a person forgets to contribute.


P.S.: The home page is getting too long, it's getting massive. Maybe we could only do a top 10 and a 'view all' page with pagination?

from write-code-every-day.

alanrsoares avatar alanrsoares commented on August 15, 2024

Sounds like a plan. Fairly easy to get done I'd say.

On 29 July 2015 at 01:46, Rafael Fragoso [email protected] wrote:

Github makes it more complicated than it should actually be.

Maybe we could setup a background job to pull the contributions of the
previous day and make our own database? We can reset the counter if a

person forgets to contribute.

P.S.: The home page is getting too long, it's getting massive. Maybe we
could only do a top 10 and a 'view all' page with pagination?


Reply to this email directly or view it on GitHub
#30 (comment)
.

from write-code-every-day.

alanrsoares avatar alanrsoares commented on August 15, 2024

As for the massive growth the page is having, I'd probably go for a
highlight size of the top ten, then following a thumbnail view for the next
20.

On 29 July 2015 at 10:56, Alan Rodrigues Soares [email protected]
wrote:

Sounds like a plan. Fairly easy to get done I'd say.

On 29 July 2015 at 01:46, Rafael Fragoso [email protected] wrote:

Github makes it more complicated than it should actually be.

Maybe we could setup a background job to pull the contributions of the
previous day and make our own database? We can reset the counter if a

person forgets to contribute.

P.S.: The home page is getting too long, it's getting massive. Maybe we
could only do a top 10 and a 'view all' page with pagination?


Reply to this email directly or view it on GitHub
#30 (comment)
.

from write-code-every-day.

viniciusdacal avatar viniciusdacal commented on August 15, 2024

For now, I think we could change the label 'Longest streak' to 'Current streak'. What do you think guys?

from write-code-every-day.

vitorleal avatar vitorleal commented on August 15, 2024

What if we use the SVG graphs that GitHub generate (like this one https://github.com/users/vitorleal/contributions) and make a script to count longest streak. Then we put a cronjob to run it midnight every day.

Cheers!

from write-code-every-day.

raphamorim avatar raphamorim commented on August 15, 2024

The cronjob will roll, I will put to this current build script. But the problem with the solution of SVG: Maximum days of contributions will always be 365 days

from write-code-every-day.

raphamorim avatar raphamorim commented on August 15, 2024

I'm thinking the solution with db. But I do not like the database option to solve this problem. So I opted file, since it generates static files.

from write-code-every-day.

raphamorim avatar raphamorim commented on August 15, 2024

Currently this script works well for what is proposed, considering it scans only the starting current streak. The problem is that it is too costly.

BTW: It's not only current streak. The script takes the longest current according to the user signed up for challenge (the current streak). If you stop the challenge, this data is saved in a file and does not change until you surpass that mark.

This is the case of @israelst

from write-code-every-day.

raphamorim avatar raphamorim commented on August 15, 2024

See the line 16, to see what I'm talking about: https://github.com/raphamorim/write-code-every-day/blob/master/src/contributors.build.js

from write-code-every-day.

raphamorim avatar raphamorim commented on August 15, 2024

But as I said, it is costly and heavy. Because have multiple requests and still spend a lot memory

from write-code-every-day.

orafaelfragoso avatar orafaelfragoso commented on August 15, 2024

Background Jobs and caching, no need to use DB for now.

from write-code-every-day.

gpedro avatar gpedro commented on August 15, 2024

I made a small service to pick up this github information: https://github.com/gpedro/github-streak

http://github-streak.herokuapp.com/gpedro
we can create a json with usernames to crawl streak and update the website ._.

from write-code-every-day.

alanrsoares avatar alanrsoares commented on August 15, 2024

Seems to be working fine, good job mate!

On 1 August 2015 at 02:04, Gabriel Pedro [email protected] wrote:

I made a small service to pick up this github information:
https://github.com/gpedro/github-streak

http://github-streak.herokuapp.com/gpedro
we can create a json with usernames to crawl streak and update the website
._.


Reply to this email directly or view it on GitHub
#30 (comment)
.

from write-code-every-day.

leaofelipe avatar leaofelipe commented on August 15, 2024

What about use something like CURL and get the information directly from the user page?

from write-code-every-day.

raphamorim avatar raphamorim commented on August 15, 2024

Guys, forget this issue, I removed the longstreak.

Reference: #82

from write-code-every-day.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.