RFE: Read and write text files with bug numbers

Bug #79142 reported by Henrik Nilsen Omma
4
Affects Status Importance Assigned to Milestone
Bug Helper
Fix Released
Wishlist
Andrew Ash

Bug Description

I would be useful to get bug # output as a list of plain numbers, HTML formatted URLs or Wiki links on the form {{{[http://url bug #<num>]}}} for easy cut and paste to the wiki.

bughelper should also be able to read these files as input. That way you can work on a subset of bugs and then narrow it down further with different searches, add remove bugs manually from the list or email it to someone for further analysis.

Changed in bughelper:
importance: Undecided → Wishlist
Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for the suggestion.

Does -rw (read wiki) and -ww (write wiki) sound good?

Changed in bughelper:
status: Unconfirmed → Needs Info
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Sure, along with -r/wp (read/plain text) and -r/wh (read/write html)

Revision history for this message
Daniel Holbach (dholbach) wrote :

What specifically do you think would the HTML options read or write? What would a format look like?

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

It would output <a href="URL">Bug # and title</a><br /> in to out.html.

I could then just click on the output file and it would open in firefox. I then Ctrl-Click on all the links and off I go triaging at speed :)

Revision history for this message
Daniel Holbach (dholbach) wrote :

Ok.

Changed in bughelper:
status: Needs Info → Confirmed
Revision history for this message
Andrew Ash (ash211) wrote :

I thought I'd take a stab at this one. The easiest part to implement seemed to be changing the output format, so that's all that this patch includes. It's currently in this form:

bughelper [--version]
     bughelper [-A] [--format=<plain|html|wiki>] [-p <source package>]
     bughelper [-A] [--format=<plain|html|wiki>] [-l <Launchpad-URL>]

It now outputs in these forms:
<a href="http://launchpad.net/bugs/43050">Bug 43050 </a> - Vino crasher bugs<br />
{{{[http://launchpad.net/bugs/43050 bug #43050] - Vino crasher bugs}}}
http://launchpad.net/bugs/43050 - Vino crasher bugs

I'm sure the patch needs more work done, but I'm putting it out here in case anyone's looking for a starting point on this one.

Revision history for this message
Andrew Ash (ash211) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

Good work on that Andrew. What do you think about splitting out the 'printing' to another 'module'? I'd love to keep the bughelper script as easy to understand as possible.

Also... what do you think about writing the file directly out to the disk?
So that'd be
   bughelper -A --format=wiki -p evolution
rather than:
   bughelper -A --format=wiki -p evolution > evolution.wiki
for our users. Any other opinions?

Revision history for this message
Andrew Ash (ash211) wrote :

Both of those sound reasonable. If anyone wants to make that happen, I'm sure they could do it faster than me. I have little experience with Python :)

Revision history for this message
Daniel Holbach (dholbach) wrote :

Do you need help with that? Anybody else wants to pick it up?

Revision history for this message
Andrew Ash (ash211) wrote :

Help would be nice. I'm going to be a bit busy, but I'll post updated patches if I get any work done. If anybody would like to jump in and finish the patch, I wouldn't be bothered.

I've moved the printBug function into commandLine.py, but I think a new file for output might be the best approach to adding automatic file output.

I'm attaching my most recent patch.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks Andrew for your work, I committed a modified version to ~bugsquad/bughelper/bughelper.main

------------------------------------------------------------
revno: 58
committer: Daniel Holbach <email address hidden>
branch nick: bughelper.main
timestamp: Wed 2007-01-31 17:49:17 +0100
message:
  committed a modified patch of Andrew Ash <email address hidden> to fix #79142
  modifications I did:
   - split out formatting code into bugHelper/output.py
   - remove a lot of formatting code from bughelper - YAY
   - added bugnumber attribute to Bug object
   - splitted up formatting code
------------------------------------------------------------

Changed in bughelper:
assignee: nobody → ash211
status: Confirmed → Fix Released
Revision history for this message
Daniel Holbach (dholbach) wrote :

Somebody might want to change the HTML/Wiki/plain formatting a bit - feel free to.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.