I just hacked this. Shame on me !
Let's say, it might be useful to those who test bash on W10...
echo 0 $( \
wget -O - https://hackaday.io/api/misc/prizeLeaderboard |\
sed 's/},/\n/g' |\
grep \
-e 'name of your project' \
-e 'another project name' \
-e 'A third project' \
-e 'and a last one' \
sed 's/.*award\"\:/ + /'
)|bc
20170321
Slightly updated version :
DATECODE=$(date '+%Y%m%d')
wget -O board$DATECODE https://hackaday.io/api/misc/prizeLeaderboard
echo 0 $( \
sed 's/},/\n/g' board$DATECODE |\
grep \
-e 'FlappyScope' \
-e 'HTTaP' \
-e 'micro HTTP server in C' \
-e 'Game of Life bit-parallel algorithm' \
-e 'C GPIO library for Raspberry Pi' \
-e 'Electronics Workshops Resources' \
-e 'AMBAP: A Modest Bitslice Architecture Proposal' \
-e 'dual-mode 16-segments LED display module' \
-e 'YGREC16 - YG.s 16bits Relay Electric Computer' \
-e 'C SPI library for Raspberry Pi' \
-e 'Power supply power-on sequencer' \
-e '4014 LED minimodule' \
| sed 's/.*award\"\:/ + /'
)|bc
What's your code ?
20170323: To get the total number, here's the script:
DATECODE=$(date '+%Y%m%d')
wget -O board$DATECODE https://hackaday.io/api/misc/prizeLeaderboard
echo 0 $( \
| sed 's/},/\n/g' board$DATECODE \
| sed 's/.*award\"\:/ + /' \
| sed -e 's/}//' -e 's/]//' \
)|bc
2017-03-23 17:21:05 : 763
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Not exactly what I would like it to be (a way to list the 2017 HaD prize projects by date, in order to see the newly added projects) but pretty useful for zero programming effort:
https://hackaday.io/projects/tag/2017hackadayprize/sort/date
Most of the people add the '2017hackadayprize' tag, so it kind of works to see what's new instead of scrolling through a random list of hundreds of projects.
Are you sure? yes | no
Your post belongs to the Feedback page :-)
Are you sure? yes | no
I have two more questions, please:
1. what is the meaning of "count" and "award" values?
2. why does the 'prizeLeaderboard' list is about 50 projects shorter then the https://hackaday.io/submissions/prize2017/list ?
Are you sure? yes | no
1) there is an adjustment : the total number of actual likes, and the attribution depending on the available total bucks. When the total likes > total bucks, bucks are allocated to the most liked, leaving the poorly liked projects unbucked.
2) no idea
Are you sure? yes | no
My code?
<code>JavaScript:$.ajax({url : "/project/6621/event/skull", method : "POST", timeout : 15e3, data : { _csrf : csrftoken }})</code>
Hint:
1 Free Dollar for each project on HackadayPrize2017
https://hackaday.io/project/6621-hack-the-hack-a-day-editor/log/20782-give-yourself-a-skull
:o)
I am here to ask where from did you get the https://hackaday.io/api/misc/prizeLeaderboard URL, please? Are there any other interesting URLs you have?
Are you sure? yes | no
a) I got it last year, while parsing the leaderboard page. The team reused the same API address so my script worked right away.
b) I must investigate your script.
oh my.
Are you sure? yes | no
At least that hole was closed, it seems :-)
Are you sure? yes | no
Indeed, seems like it doesn't work any more. I wonder why. Too bad I don't have time to investigate it now, maybe later.
Are you sure? yes | no
I think the bug was reported and fixed lately, but I may be wrong.
It doesn't matter much anyway...
Are you sure? yes | no