Bugmail is a Thunderbird extension by Fabrice Desre. I patched it to add
full CSV support (multi-line descriptions, embedded commas). The xpi is
attached. Here is the patch.
diff -ur bugmail-1.3-tb+sm/chrome/content/trac.js
bugmail-1.3-tb+sm-csvpatch/chrome/content/trac.js
--- bugmail-1.3-tb+sm/chrome/content/trac.js 2008-12-01
05:30:01.000000000 -0500
+++ bugmail-1.3-tb+sm-csvpatch/chrome/content/trac.js 2009-04-13
13:24:22.000000000 -0400
@@ -38,7 +38,13 @@
var lines = text.split(/\r\n/);
var bugDoc = document.implementation.createDocument(null, "trac",
null);
var head = lines[0].split(',');
- var content = lines[1].split(',');
+ lines.shift();
+ var content = lines.join("\r\n").replace(/,/g,"\b");
+ var commaRe = /"[^"]+"/gm;
+ var result;
+ while ((result = commaRe.exec(content)) != null)
+ content = content.substring(0,result.index) +
result[0].replace(/[\b]/gm,",") + content.substring(commaRe.lastIndex);
+ content = content.split("\b");
for (var i = 0; i < head.length; i++) {
var elem = bugDoc.createElement(head[i]);
elem.appendChild(bugDoc.createTextNode(content[i]));
Ted
--
+ -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---
bugmail-1.3-tb+sm-csvpatch.xpi
Description: application/xpinstall
