SamVerschueren / dev-time-cli

Get the current local time of a GitHub user.
MIT License
179 stars 12 forks source link

FR: Pass in multiple users #2

Closed hemanth closed 8 years ago

hemanth commented 8 years ago

It will be useful if this util takes a list of devs.

sindresorhus commented 8 years ago

Just do bash loop?

hemanth commented 8 years ago

Well, echo passy sindresorhus | xargs -n1 dev-time vs dev-time --user=passy,sindersorhus and we could also have the output in the form of <user>:<time> maybe?

sindresorhus commented 8 years ago

I guess it could be useful if you want to have a meeting or something and want to see people's time.

dev-time --user=passy,sindersorhus and we could also have the output in the form of :

:+1:

SamVerschueren commented 8 years ago

Which one do you prefer?

$ dev-time sindresorhus
12:37 - 10 Dec. 2015

$ dev-time sindresorhus hemanth
sindresorhus
     12:37 - 10 Dec. 2015
hemanth
     17:07 - 10 Dec. 2015

Or for multiple users with a flag (--users,-u)?

$ dev-time -u=sindresorhus,hemanth
sindresorhus
     12:37 - 10 Dec. 2015
hemanth
     17:07 - 10 Dec. 2015
hemanth commented 8 years ago

$dev-time sindresorhus hemanth is more intuitive for me.

Output could be like:

sindresorhus: 12:37 - 10 Dec. 2015
hemanth: 17:07 - 10 Dec. 2015
SamVerschueren commented 8 years ago

Don't like the output that much. Very unreadable when having a lot of names with different length.

hemanth commented 8 years ago

Agree, I was thinking in terms of parseable format.

SamVerschueren commented 8 years ago

If someone comes up with a use case to have it parseable, we might think about a --json flag.

hemanth commented 8 years ago

Ok usecase: Lets say we have a webpage that lists all the members of an github org, will their current time ;) [Wired usecase, this is the first thing that came to my mind]

SamVerschueren commented 8 years ago

@hemanth create a new issue for that one ;).

hemanth commented 8 years ago

Done #7 ;)

SamVerschueren commented 8 years ago

What do you think?

dev-time

hemanth commented 8 years ago

Sweet! :+1:

hemanth commented 8 years ago

@SamVerschueren Are you bumping the version now?

SamVerschueren commented 8 years ago

Fixing the tests first :).

hemanth commented 8 years ago

Cool, just noticed.

SamVerschueren commented 8 years ago

Released

hemanth commented 8 years ago
$ dev-time --version
1.2.0

Isn't notifying me to update to the latest version, you were using update-notifier right?

SamVerschueren commented 8 years ago

Yes I'm using it here cli.js#L47. Not sure why it isn't notifying. Probably it is checking it only once a day (the first time it is used) as it uses configstore to store the last checked time.

https://github.com/yeoman/update-notifier#updatecheckinterval