Viewing a response to: @deradministrator/re-inertia-how-to-find-hidden-gems-with-ruby-20180218t210649989z
Yep, I think there's a mistake in that script that nobody ever noticed. ```ruby next if (created = (Time.now - Time.parse(comment.created + ' UTC')).to_i / 60) < 30 ``` Should be: ```ruby next if (created = (Time.now - Time.parse(comment.created + ' UTC')).to_i / 60) > 30 ``` You can use this to do the same thing instead: http://steem-ganymede.herokuapp.com/discussions?vote_ready=true The code for that is here, which is correct: https://github.com/steem-third-party/ganymede/blob/master/app/controllers/discussions_controller.rb#L176
author | inertia |
---|---|
permlink | re-deradministrator-re-inertia-how-to-find-hidden-gems-with-ruby-20180218t214944488z |
category | radiator |
json_metadata | {"tags":["radiator"],"links":["http://steem-ganymede.herokuapp.com/discussions?vote_ready=true","https://github.com/steem-third-party/ganymede/blob/master/app/controllers/discussions_controller.rb#L176"],"app":"steemit/0.1"} |
created | 2018-02-18 21:49:45 |
last_update | 2018-02-18 21:49:45 |
depth | 2 |
children | 3 |
last_payout | 2018-02-25 21:49:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 548 |
author_reputation | 346,568,901,399,561 |
root_title | "How to Find Hidden Gems with Ruby" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 38,619,521 |
net_rshares | 3,940,570,684 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
deradministrator | 0 | 3,940,570,684 | 100% |
Worked flawless now =) Thank you, couldnt find the error. Alright, seems like my customizing works somehow. Can you explain me this part with the argv?: options[:tag] = @ARGV if ARGV.any? I m trying to wrap my head around ruby as a begginer, buts its kinda hard. Thank you for all your effort with your tutorials. They help me a lot :D
author | deradministrator |
---|---|
permlink | re-inertia-re-deradministrator-re-inertia-how-to-find-hidden-gems-with-ruby-20180218t224627108z |
category | radiator |
json_metadata | {"tags":["radiator"],"users":["argv"],"app":"steemit/0.1"} |
created | 2018-02-18 22:46:27 |
last_update | 2018-02-18 22:46:27 |
depth | 3 |
children | 2 |
last_payout | 2018-02-25 22:46:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 339 |
author_reputation | 1,084,361,388,464 |
root_title | "How to Find Hidden Gems with Ruby" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 38,628,897 |
net_rshares | 0 |
There's a typo too. It should be: ```ruby options[:tag] = ARGV.first if ARGV.any? ``` The `ARGV` constant is created by the ruby interpreter and just gives you access to the parameters passed when you launch. So, once you apply that fix, this command will work: ```bash ruby vote_ready.rb dmania ``` And that will narrow down the query to the `dmania` tag.
author | inertia |
---|---|
permlink | re-deradministrator-re-inertia-re-deradministrator-re-inertia-how-to-find-hidden-gems-with-ruby-20180218t234943240z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2018-02-18 23:49:42 |
last_update | 2018-02-18 23:49:42 |
depth | 4 |
children | 1 |
last_payout | 2018-02-25 23:49:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.018 HBD |
curator_payout_value | 0.003 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 362 |
author_reputation | 346,568,901,399,561 |
root_title | "How to Find Hidden Gems with Ruby" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 38,638,711 |
net_rshares | 4,201,104,283 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
deradministrator | 0 | 4,201,104,283 | 100% |
Got that, makes sense now. Will try it at home. You received a quest reward via memo ;) Edit: WORKED!
author | deradministrator |
---|---|
permlink | re-inertia-re-deradministrator-re-inertia-re-deradministrator-re-inertia-how-to-find-hidden-gems-with-ruby-20180219t061956523z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2018-02-19 06:19:57 |
last_update | 2018-02-19 17:32:30 |
depth | 5 |
children | 0 |
last_payout | 2018-02-26 06:19:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 102 |
author_reputation | 1,084,361,388,464 |
root_title | "How to Find Hidden Gems with Ruby" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 38,708,584 |
net_rshares | 0 |