Make me a real-time reputation counter!

-4

Recently, I have found my reputation changing time to time. I would like to know my reputation changing real-time.


The job

Given an id of a user on PPCG (ex.64499), Print the user's reputation every 10 seconds. You may ignore the daily quota.


Examples

64499
3808
40695

Possible output format

12345
12,345

Matthew Roh

Posted 2017-04-15T05:14:34.980

Reputation: 5 043

Question was closed 2017-04-15T16:39:09.137

8You really hate using the sandbox, right? – Mr. Xcoder – 2017-04-15T05:30:18.970

2@Mr.Xcoder I do dislike it but I don't hate it, I just use it very hardly. – Matthew Roh – 2017-04-15T05:31:12.830

Do we have to worry about stack overflows? – Dennis – 2017-04-15T05:34:20.407

1@Dennis stack overflows? – Matthew Roh – 2017-04-15T05:35:47.840

Yes. If we call our function/program recursively, it will eventually stop working. Also, should we print the reputation exactly every 10 seconds or can we wait 10 seconds after printing the rep, not taking the time the query took into account? – Dennis – 2017-04-15T05:37:16.893

@Dennis Worrying about stack overflows? no. The second question: the latter. – Matthew Roh – 2017-04-15T05:39:09.547

Yeah. Make a programming language where the function call stack is limited to size 5! :P Continue discussion here if wanted

– HyperNeutrino – 2017-04-15T05:45:05.063

For reputation 123456, can we print 123,456? – Dennis – 2017-04-15T05:54:18.090

@Dennis Sure, if we can see the actual reputation. – Matthew Roh – 2017-04-15T05:56:32.417

Can I print 123,456 reputation instead? If so, what additional information is allowed? I assume I couldn't simply display the entire web page... – Dennis – 2017-04-15T16:35:22.320

1If you edit your clarifications from the comments into the question and rule what exactly may be displayed in the output and if subsequent outputs are allowed to overwrite the previous one, I think this can be reopened. – Dennis – 2017-04-15T19:57:31.620

Answers

4

Bash + coreutils + w3m, 90 71 69 67 bytes

watch -tn10 w3m codegolf.stackexchange.com/u/$1\|grep -Pom1 ^[,-9]+

Takes the user ID as a command line argument and displays the reputation of the corresponding user (e.g., 135,249) in the upper left corner of the terminal.

Alternate version, 57 bytes, invalid?

watch -tn10 w3m codegolf.stackexchange.com/u/$1\|sed 44!d

This displays 135,249 reputation instead of 135,249.

Dennis

Posted 2017-04-15T05:14:34.980

Reputation: 196 637

This reply seems to assure you that if you can see the reputation it's valid, so I think that you can as well print 135,119 reputation. – Erik the Outgolfer – 2017-04-15T15:57:45.217

Also, this test run seems a little bit fake... – Erik the Outgolfer – 2017-04-15T15:58:05.507

1Hm, if I interpret it what way, I could just open the URL in any browser and let the user search for the reputation count. – Dennis – 2017-04-15T16:14:32.723

Right, then you should ask OP if that's allowed. And I believe that the , is already interpreter that way, although it is in fact valid numeric representation. – Erik the Outgolfer – 2017-04-15T16:29:14.877