New release - utopian-cli 0.3.1

in #utopian-io6 years ago (edited)

terminal.png

About five days ago I released utopian-cli 0.2.1, and today I'm back with the new and improved version 0.3.1! Use the following command to upgrade if you have already installed it

pip install utopian --upgrade

otherwise use the command to install it

pip install utopian

Features overview

Usage: utopian performance [OPTIONS] ACCOUNT

  Takes a given account and either shows the account's performance as a
  contributor or as a moderator (if applicable) in a given time period.

The "points" command has been renamed "performance", since that makes much more sense as a name. It also now prints everything in a pretty table, has a lot more options and can now also show a contributor's performance (instead of just a moderator's performance)! To see its documentation click here.

Options & arguments

As mentioned above the "performance" command has some new options. Its structure has also changed slightly, --date is now no longer an argument and has been changed to an option instead.

The first new option is the --days option

--days INTEGER   See performance for the last N days.

If you want to see your performance in the last 5 days, you can simply set that as the amount of days!

I also wanted a way to distinguish between the performance of a contributor and the performance of a moderator, since I'm both. To do this I added the --contributor (the default) and --moderator flags, which allows you to quickly switch between the two. The --contributor flag lets you see your performance in the last N days in all the categories you contributed in, as seen below

image.png

If you want to see a moderator's performance, simply change the flag to --moderator instead

image.png

I was also pretty interested in which moderators review my contributions the most and which authors I review the most, with the acceptance % for each. For this I added the --details flag, which shows your top --limit (default is 10) authors that you have reviewed / moderators that have reviewed you. For example, the top 10 authors I reviewed in the last 21 days

image.png

and the moderators that have reviewed my contributions in the last 21 days

image.png

How was it implemented?

The printing of the tables was done by using the Python package PrettyTables, the rest I implemented myself. It took quite a lot of code (went from 235 lines to 436 lines), so it took a while to implement and get everything working how I wanted to. I can definitely improve the quality in the future, as I think some functions can probably be combined together and changed to be more dynamic.

Currently the code creates two dictionaries, depending on the --contributor and --moderator flags. The first one stores all the information about the account's performance and the other one stores all the extra details that are printed when the --details flag is used. These dictionaries are then printed in a pretty table using the PrettyTable package, which I think looks much better than how it did in the previous version. The only "problem" I encountered was that getting a contributor's rejected posts requires another call to the API, but that's it really.

Roadmap

Just like last time, I will add things as they pop into my mind. I do want to see if it's possible to generate a pie chart (or something similar) of an account's performance and save it to a file, I think that would be cool! If anyone has any other ideas, please let me know!

How to contribute?

  1. Fork the repository
  2. Create a feature branch with git checkout -b your-feature
  3. Code and document your feature
  4. Commit your changes with git commit -m "add my features"
  5. Push to your branch with git push origin your-feature
  6. Create a new pull request

Anything you can add to the project is valuable to me, be it bug reports, suggestions etc. so please don't hesitate!



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @amosbastian I am @utopian-io. I have just upvoted you!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

soon we won't need a browser. that's looking fantastic.
i was going to play with source code but after installing through pip, i couldn't managed to do that.

sometimes i need to filter based on project's contributions. like how many contributions a project get or how many times a user contributed to same project.

some users start to delete old rejected contributions and tries again. it could be helpful to see it faster i guess. just a suggestion if you stuck on ideas.

also i had an idea about pitching logo design proposals all in one for mostly contributed projects to grab some attention for Utopian. it could help with it too.

1UP-Kayrex_tiny.png

You've got upvoted by Utopian-1UP!

You can give up to ten 1UP's to Utopian posts every day after they are accepted by a Utopian moderator and before they are upvoted by the official @utopian-io account. Install the @steem-plus browser extension to use 1UP. By following the 1UP-trail using SteemAuto you support great Utopian authors and earn high curation rewards at the same time.


1UP is neither organized nor endorsed by Utopian.io!

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.033
BTC 62480.78
ETH 3045.78
USDT 1.00
SBD 3.91