Comments (17)
Yah, I notice that too.
I think it's getting our currentStreak instead the longestStreak.
from write-code-every-day.
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.
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.
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 aperson 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.
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 aperson 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.
For now, I think we could change the label 'Longest streak' to 'Current streak'. What do you think guys?
from write-code-every-day.
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.
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.
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.
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.
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.
But as I said, it is costly and heavy. Because have multiple requests and still spend a lot memory
from write-code-every-day.
Background Jobs and caching, no need to use DB for now.
from write-code-every-day.
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.
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-streakhttp://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.
What about use something like CURL and get the information directly from the user page?
from write-code-every-day.
Guys, forget this issue, I removed the longstreak.
Reference: #82
from write-code-every-day.
Related Issues (9)
- Wireframe HOT 14
- Counter stop? HOT 1
- Is died? HOT 10
- What is missing to complete? HOT 8
- Problem running "npm run build" HOT 6
- A better sort HOT 7
- Streak count is broken. [EOM] HOT 1
- Let's back to show the longest streak? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from write-code-every-day.