← Back to team overview

elementary-dev-community team mailing list archive

Re: How many luna-beta2 bugs?


Here's a slightly better one (1 less instance of curl) using a simple regex:

echo $(expr $(curl https://launchpad.net/elementary/+milestone/luna-beta2 |
grep -c "sprite milestone") - $(curl
https://launchpad.net/elementary/+milestone/luna-beta2 | egrep -c "Fix

In my opinion, using 'wget' instead of 'curl' here is better (less output):
echo $(expr $(wget
https://launchpad.net/elementary/+milestone/luna-beta2-q -O-| grep -c
"sprite milestone") - $(wget
https://launchpad.net/elementary/+milestone/luna-beta2 -q -O- | egrep -c
"Fix Committed|Released"))

Strangely, though, these give me 1 more bug than your script. I got 109
from yours and 110 from mine.

I'm pretty sure there's a much easier way with just one command, but I
can't get it to work properly.

Regardless, that's needless optimization for this simple task, in my
opinion ;)


On Mon, Nov 26, 2012 at 9:36 AM, David Gomes <david@xxxxxxxxxxxxxxxx> wrote:

> Actually, because Shnatsel told me I could do this in Bash, I went ahead
> this and turned it into a Bash one-liner:
> echo $(expr $(curl https://launchpad.net/elementary/+milestone/luna-beta2| grep -c "sprite milestone") - $(curl
> https://launchpad.net/elementary/+milestone/luna-beta2 | grep -c "Fix
> Committed") - $(curl
> https://launchpad.net/elementary/+milestone/luna-beta2 | grep -c "Fix
> Released"))
> That will output the *exact* number of bugs left for luna-beta2, my
> original script wasn't as precise as that. Right now? 113 bugs.
> On Sun, Nov 18, 2012 at 12:06 PM, David Gomes <david@xxxxxxxxxxxxxxxx>wrote:
>> Curious about how many luna-beta2 bugs there are? I wrote a Python 3
>> script (attached) that counts the number of unfixed bugs for luna-beta2
>> from the luna-beta2 milestone page on Launchpad.
>> It has a rather small margin of error and it's a bit hacky. Right now,
>> we're at over 100 bugs.
>> David "Munchor" Gomes
> --
> Mailing list: https://launchpad.net/~elementary-dev-community
> Post to     : elementary-dev-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~elementary-dev-community
> More help   : https://help.launchpad.net/ListHelp

Follow ups