Daily Steem-Python Challenge #7, Win 1 Steem!

in #contest8 years ago (edited)

For each tutorial we release there will be a relevant challenge where the winner receives 1 STEEM!

Challenge

Take the code from the tutorial from here. Fellow Steemian @maxg suggested using at to schedule scripts at certain time instead of doing this inside the python script. Great idea!

> echo 'python post.py first_post.txt' | at 9:00AM
> echo 'python post.py second_post.txt' | at 11:00AM


  1. Adjust the code so that it takes the filename for thepost.txt from the command line arguments. Then alter the post.txt file where the first line is the title of the post, the second line are the tags (separated by whitespace) and the third line is the voting_weight. The rest of file should be the body of the post.

That's it! Good luck to everyone participating!

Deadline

The prize money will be rewarded to the person that solves the problem first. If there is no solution within 7 days after this post has been submitted the prize pool expires.

Note: We shift the release time of the daily challenge by ~6 hours every day, so everybody has a fair shot.

Relevant Tutorial

Part 7: How To Schedule Posts And Manually Upvote Posts For A Variable Voting Weight With Steem-Python


If you have questions about the tutorial or the challenge then don't hesitate to comment below or contact us on Discord!

Sort:  

My solution

I found an error on your solution so sending mine. @maxg 😎

There is also a small error in your submission, you forgot to cast the upvote_weight to a float. Since both of your entries together make up the correct solution and I have no fair way of notifying both of you at the same time. How do you feel when I split the prize pool for this one?

Also, I have been looking into beneficiaries. But this seems a lot more complicated due to errors with steem-python. Nice challenge ;)

Totally okay with splitting the prize pool :)

O damn, I can see a rivalry starting!

Ooh, you're right! I do leave the newlines on everything...

Maybe some people

are ok with

their posts getting longer

every now and then.

No worries mate, I will give you 12 hours next time. :P

Gotta beat out @emrebeyler 😜

damn! :)

You are quick! I will check it tomorrow. Looks good, going to bed now