DailyJS

Node Roundup: Mailman, trayballoon, unembed

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

libraries node email modules scraping windows

Node Roundup: Mailman, trayballoon, unembed

Posted by Alex R. Young on .
Featured

libraries node email modules scraping windows

Node Roundup: Mailman, trayballoon, unembed

Posted by Alex R. Young on .

Mailman

Mailman (GitHub: vdemedes/mailman, License: MIT, npm: mailman) by Vadim Demedes is a module for sending emails that supports generators. It uses nodemailer for sending email, and consolidate.js for templates, which means it supports lots of different template languages.

Generators are used for sending emails, so you can do this:

var mail = new UserMailer({ to: 'vadim@example.com' }).welcome();  
yield mail.deliver();  

Mailman expects a specific directory layout for views, but the added level of structure might help if you've got a big mess of email-related code in your current projects.

trayballoon

trayballoon

trayballoon (GitHub: sindresorhus/trayballoon, License: MIT, npm: trayballoon) by Sindre Sorhus is a module for showing system tray balloons in Windows. You can set the text and image to display, and a callback that will run when the balloon disappears:

trayballoon({  
  text: 'Unicorns and rainbows'
  icon: 'ponies.ico',
  timeout: 20000
}, function() {
  console.log('Trayballoon disappeared');
});

It also has a command-line tool which you could use to display notifications when things like tests fail. trayballoon works by bundling an executable called nircmdc.exe which is called with child_process.spawn.

unembed

Given some "embed code" for sites like YouTube and Vimeo, unembed (GitHub: colearnr/unembed, License: MIT, npm: unembed) by Prabhu Subramanian will extract the markup and produce a JSON representation. This might be useful if you're scraping sites that use embed codes, like blogs and forums.

I've never thought of applying the tiny modules philosophy to scraping, but it seems like a great way of sharing all of those hacks we use to extract data in a more structured way.