This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Mad Mimi Archives Plugin | |
Plugin URI: http://mimi.fascinationstreet.co.za/mimi_archives.php | |
Version: 0.01 | |
Author: <a href="http://fascinationstreet.co.za/">Marc Heiligers</a> | |
Description: A plugin which displays archived newsletters from Mad Mimi in your blog | |
Distributed under the MIT license. Please don't sue me :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Revamp::Mail::MadMimiMail; | |
use Switch; | |
use HTTP::Request::Common; | |
use LWP::UserAgent; | |
use YAML; | |
use Data::Dumper; | |
sub new { | |
my ($class, @args) = @_; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Text; | |
using System.Net; | |
namespace MadMimi | |
{ | |
class Program | |
{ | |
static string apiKey = "YOUR MAD MIMI API KEY"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Text; | |
using System.IO; | |
namespace MadMimi | |
{ | |
class Program | |
{ | |
const string MAD_MIMI_USER_NAME = "YOUR MAD MIMI LOGIN"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def perform(url, rules, file_name) | |
response = Net::HTTP.get_response(URI.parse(url)) | |
doc = Hpricot(response.body) | |
file = File.open(file_name, "a") | |
rules.each do |rule| | |
(doc/rule).each do |element| | |
file.puts element.inner_html | |
end | |
end | |
file.close |
NewerOlder