Bueno estimados, esto es mas para los rurales o satelitales; pq en mi zona los profes estan full ingresando datos a su sistema SIAGIE y PERU EDUCA del Ministerio de Educacion, asi que comparto el plugin recien formulado...... espero sus gracias :).
minedu
http://www.minedu.gob.pe/ (http://www.minedu.gob.pe/)
(http://www.minedu.gob.pe/2Banners/logomed4.gif)
siagie
http://sistemas10.minedu.gob.pe/siagie3/ (http://sistemas10.minedu.gob.pe/siagie3/)
(http://www.minedu.gob.pe/2Banners/siagie_1.gif)
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o minedu.gob.pe.so minedu.gob.pe.cpp
//regex
// http.*\.minedu\.gob\.pe.*(\.swf|\.jpg|\.png|\.gif|\.exe|\.rar|\.flv|\.pdf|\.zip)
string dominiotxt="minedu";
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-4) + "_" + resultado.at(resultado.size()-3) + "_" + resultado.at(resultado.size()-2) + "_" +resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-4) + "_" + resultado.at(resultado.size()-3) + "_" + resultado.at(resultado.size()-2) + "_" +resultado.at(resultado.size()-1); ;
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find("sistemas10") != string::npos)
) {
dominiotxt="minedu_siagie";
}
if ( (url.find(".minedu.gob.pe") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = dominiotxt;
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
PeruEduca
http://aulavirtual.perueduca.pe/ (http://aulavirtual.perueduca.pe/)
(http://www.minedu.gob.pe/2Banners/banner_perueduca_1.gif)
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o perueduca.pe.so perueduca.pe.cpp
// regex
// http.*\.perueduca\.pe.*(\.swf|\.jpg|\.png|\.gif|\.exe|\.rar|\.flv|\.pdf|\.zip)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".perueduca.pe/") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "MINEDU-PeruEduca";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}