You are here

Create your own custom daily Get Satisfaction email report with emailReport.rb

Submitted by Roland on Mon, 2010-08-02 23:42

UPDATE November 2011:

The code has been dramatically re-factored so i deleted it from the gist. Please use the revised code at:
https://github.com/rtanglao/momogs/blob/master/emailReport-m.rb

For my technical support lead job at Mozilla Messaging, I continue to try to find the best way to sort and sift and help out folks who need support and identify the hot issues. We currently use Get Satisfaction for Thunderbird support and I subscribe via email to everything but it's really difficult to read through the over 200 emails a day that Get Satisfaction sends

So I developed over the last 9 months a series of Ruby scripts to see the most active support topics (getactive.rb),  the contributors who are actually being marked by the community of users as solving a support topic (getcontributors.rb), who's doing the most replies (gethappykludged.rb) and pick out some random support topics (getrandom.rb)

Up until last week I have been using these scripts on a manual basis but not as consistently as I would like since it's pain to run all four manually.

To make a single email report that ties together everything in one nice summary, last week I finally took 3 hours and wrote emailReport.rb (code after the jump). It's crude but it works and is a useful report that I run every day now for the previous day (e.g. on Monday morning, I run it for Sunday and Saturday). It runs all the above mentioned scripts and then emails a summary email:

Here's an example of how you invoke it:

(for August 2, 2010)

./emailReport.rb 2010 8 2 2010 8 2 2>emailreport.20100802.20100802.stderr 1>emailreport.2010082002.20100802.stdout

And here's a sample email:

From: xxxx@gmail.com
To: yyyy@zzzzzo.com
subject: MoMo Support Report FROM: 2010.8.2 TO: 2010.8.2
Date: Mon, 02 Aug 2010 23:31:16 -0700
Get Satisfaction Top 5 active:
5,http://getsatisfaction.com/mozilla_messaging/topics/how_do_i_export_folders_as_mbox_files_thanks_chris
5,http://getsatisfaction.com/mozilla_messaging/topics/migration_of_thunderbird_data_from_old_to_new_computer
4,http://getsatisfaction.com/mozilla_messaging/topics/delivering_mail_98_thunderbird_problem
4,http://getsatisfaction.com/mozilla_messaging/topics/from_thunderbird_to_outlook_how
4,http://getsatisfaction.com/mozilla_messaging/topics/cannot_start_thunderbird_already_runnning

Get Satisfaction Contributors:


Top 10 Get Satisfaction Repliers:
2, cam_1319937
3, simonpaquet
3, ankitgupta1980
3, davro
3, pat_drummond
3, kent_james
4, bhuvnesh_thakar
5, wayne_mery
9, archaeopteryx
30, michael_a_pasek


5 Random Get Satisfaction Topics:
http://getsatisfaction.com/mozilla_messaging/topics/crashing_after_start_up
http://getsatisfaction.com/mozilla_messaging/topics/problems_editing_an_email_to_be_forwarded
http://getsatisfaction.com/mozilla_messaging/topics/dmg_file_whats_this
http://getsatisfaction.com/mozilla_messaging/topics/want_to_use_thunderbird_for_mass_mailing
http://getsatisfaction.com/mozilla_messaging/topics/pasting_images_takes_minutes

What I did well

  • It works and when it doesn't I can check stderr for diagnostics and usually quickly figure out what went wrong (Get Satisfaction has a known bug on topics that have URLS that begin with numbers and also JSON can't cope when folks paste binary data into support topics; fortunately both cases are rare -:-) !)

What could be improved

  • The JSON API is called on the same data four times, once for each script (i.e. I don't store any of the GS data) so it takes 5-10 minutes to run emailReport.rb!
  • It would be more efficient to just read the data into a database, e.g. couchdb and then have the four scripts read from the database
  • Ruby is not an excellent choice for Windows users; would be better to write this in JavaScript and then anybody (i.e. other support contributors not just folks on Mac OS X or Linux) could use it
  • Badly need to way to extract the GS conversations I am involved in and highlight the top 5
  • Although a separate can of worms :-), I would love to have a really great search engine that works on the GS support data; unfortunately the GS management view search doesn't work so well.

Help Wanted

I'd love some help :-) (what's in it for you! Open Source Whuffie, fame and adventure :-) !!!)   in the following areas:

  • Convert to JavaScript and to a web app so all can use it :-) !
  • Put the GS support data into a JSON friendly database like CouchDB

 

The Code

The code has been dramatically re-factored so i deleted it from the gist. Please use the revised code at:
https://github.com/rtanglao/momogs/blob/master/emailReport-m.rb

 

Comments

Very awesome post , i am really impressed with it a lot

<a href="http://www.zecrosoft.com/2014/09/Benefits-of-Ginger.html">فوائد الزنجبيل</a>   <a href="http://www.zecrosoft.com/2014/09/Pomegranate-benefits-for-diet.html">فوائد الرمان</a>

 <a href="http://www.zecrosoft.com/2014/09/Benefits-of-the-ring.html">فوائد الحلبة</a>

 <a href="http://www.zecrosoft.com/2014/09/Onion-benefits.html">فوائد البصل </a>

 <a href="http://www.zecrosoft.com/2014/09/Benefits-thyme.html">فوائد الزعتر</a>

 <a href="http://www.zecrosoft.com/2014/09/benefits-sesame-oil.html">فوائد زيت السمسم </a>

 <a href="http://www.zecrosoft.com/2014/10/hemorrhoids-treatment.html">علاج البواسير</a>

 <a href="http://www.zecrosoft.com/2014/10/Benefits-of-anise.html">فوائد اليانسون</a>

 <a href="http://www.zecrosoft.com/2014/09/turmeric-benefits-for-hair.html">فوائد الكركم</a>

<a href="http://www.zecrosoft.com/2014/10/joha-stories.html">قصص جحا</a>   <a href="http://www.zecrosoft.com/2014/10/Photos-on-Friday.html">صور يوم الجمعه</a>

 <a href="http://www.zecrosoft.com/2014/10/Signs-of-Pregnancy.html">علامات الحمل</a>

 <a href="http://www.zecrosoft.com/2014/10/Definition-of-Love.html">تعريف الحب</a>

 <a href="http://www.zecrosoft.com/2014/10/life-of-isthmus.html">حياة البرزخ</a>

 <a href="http://www.zecrosoft.com/2014/10/Benefits-of-Raisins.html">فوائد الزبيب</a>

The clarity in your post is simply great Must confess that you present powerful steps on this blog, MrqePromoCode You definitely know what you were talking about and Your intelligence on the post could be giving us new knowledge.Pretty great post. InkPromoCode I simply stumbled upon your  weblog and wanted to say that I have really loved browsing your blog posts.Simply wish to say your article is as astonishing. The clarity in your post is simply great and i could asume you are an expert on this subject. AutoPartsPromoCode Well with your permission let me to grab your RSS feed to keep updated with forthcoming post.

Add new comment