Open AstralSorcerer opened 9 years ago
Possible solutions:
Personally, I think it would be best to display an error message and exit without printing any announcements.
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:
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.
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)
+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.
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.
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.