Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'bb announcements' displays all announcements when specified course is not found #28

Open
AstralSorceress opened this issue Jan 24, 2015 · 6 comments

Comments

@AstralSorceress
Copy link
Member

I'm not sure if this is a bug or a feature, but having my terminal spammed with every BlackBoard announcement I've ever recieved is not optimal, IMHO.

@clehner
Copy link
Member

clehner commented Jan 24, 2015

Possible solutions:

  1. auto pipe through pager if there is a lot of output (like how git does it)
  2. limit to last N announcements, with option to change N
  3. reverse order of announcements so that the most recent are left visible in terminal at the end

@AstralSorceress
Copy link
Member Author

Personally, I think it would be best to display an error message and exit without printing any announcements.

@joeljk13
Copy link
Member

On the bright side, this means that implementing the 'get announcements for all courses' feature will be extremely easy.


Note that there's really 2 problems here:

  1. specifying a course that doesn't exist prints announcements for all courses.
  2. bb announcements outputs too much

For problem 1, I'd say it's probably best to display an error message.
For problem 2, I think all of clehner's options would work well.

For option 1: git doesn't pipe to a pager only if there's a lot of output. Commands like git log always pipe to the pager (unless you do git --no-pager log). The pager might exit immediately if the output is short enough though. Git lets the user specify their pager; we'd probably just want an argument --pager or --no-pager, and then choose one as the default (I'd vote for --pager as the default personally).

Another possible option: limit to announcements since a user specified date, or within a user-specified number of days back. This will probably be more useful than option 2 but more difficult to implement.

@clehner
Copy link
Member

clehner commented Jan 26, 2015

Commands like git log always pipe to the pager (unless you do git --no-pager log). The pager might exit immediately if the output is short enough though.

Good point, I didn't realize that. I agree then that piping through the pager always would be a good idea. (Probably also for grades and others too).

For announcements, I think it would also help readability to make the output more compact by removing blank lines within each posting (e.g. between the Posted by/to/on and the title)

@AstralSorceress
Copy link
Member Author

+1 pager. As another extention to option 2, I'd like the ability to see only new (unread) announcements, but this might be extremely hard to implement.

@joeljk13
Copy link
Member

The unread announcements is very similar to my idea of limiting by date - if bb stored the last date it got announcements for a course, then it could just limit by that date by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants