{
"metadata": {
"name": "Untitled0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": "Instalar\n========\nS\u00f3lo hace falta instalar pyld: https://github.com/digitalbazaar/pyld\n\n```bash\npip install pyld \n```\n\nTambi\u00e9n puedes instalar rdflib para convertir el fichero de xml-rdf a nt.\n\nModificar el frame\n==================\nLo que metas dentro del frame se usa para dos cosas:\n * La parte del contexto se usa para compactizar (reducir nombres, son los prefijos)\n * El total se usa para dar estructura al json final\n \nPor tanto, aqu\u00ed puedes decirle qu\u00e9 espacios de nombres y qu\u00e9 campos usar.\nComo ver\u00e1s, adem\u00e1s de hacer framing hago compact.\n\u00bfPor qu\u00e9?, pues porque el framing deja una lista de objetos colgando de \"@graph\", y si esa lista tiene un s\u00f3lo elemento podemos pasar esos atributos a la \"ra\u00edz\" para hacer m\u00e1s legible el json.\n\nPor ejemplo:\n```json\n{ ...\n \"@graph\": [ {\"@id\": \"test\", \"name\": \"testing\"}]\n}\n```\n\nSe convierte en:\n\n```json\n{ ...\n \"@id\": \"test\",\n \"name\": \"testing\"\n\n}\n```\n\nEn el caso de los channels, el frame contendr\u00e1 '\"@type\": \"ewe:Channel\"'; en las reglas '\"@type\": \"ewe:Rule\"'. El contexto no deber\u00eda cambiar.\n\n\nSin l\u00edos\n========\n\nPuedes usar el json-ld playground para estas cosas: [Enlace](http://json-ld.org/playground/index.html#startTab=tab-framed&json-ld=%7B%22%40context%22%3A%7B%22foaf%22%3A%22http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%22%2C%22owl%22%3A%22http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%22%2C%22rdfs%22%3A%22http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%22%2C%22image%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fschema.org%2Fimage%22%2C%22%40type%22%3A%22%40id%22%7D%2C%22tags%22%3A%22http%3A%2F%2Fwww.holygoat.co.uk%2Fowl%2Fredwood%2F0.1%2Ftags%2F%22%2C%22ewe%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%2Fns%2F%22%2C%22rdf%22%3A%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%2C%22xsd%22%3A%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%22%2C%22dcterms%22%3A%22http%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%22%2C%22homepage%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fschema.org%2Furl%22%2C%22%40type%22%3A%22%40id%22%7D%2C%22spinrdf%22%3A%22http%3A%2F%2Fspinrdf.org%2Fsp%23%22%7D%2C%22%40graph%22%3A%5B%7B%22%40id%22%3A%22_%3Ab0%22%2C%22spinrdf%3AvarName%22%3A%22message%22%7D%2C%7B%22%40id%22%3A%22_%3Ab1%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%2C%7B%22spinrdf%3Atemplates%22%3A%7B%22%40list%22%3A%5B%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22rdf%3Atype%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23Action%22%7D%2C%22%40id%22%3A%22_%3Ab11%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab38%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22New%20chat%20message%22%2C%22%40id%22%3A%22_%3Ab12%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab23%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23hasParameter%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab37%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%2C%22%40id%22%3A%22_%3Ab13%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab32%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22message%22%2C%22%40id%22%3A%22_%3Ab7%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab8%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Avalue%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab0%22%2C%22spinrdf%3AvarName%22%3A%22message%22%7D%2C%22%40id%22%3A%22_%3Ab2%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab3%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23providesAction%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab5%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%2C%22%40id%22%3A%22_%3Ab4%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fifttt.com%2FGoogleTalk%22%7D%7D%5D%7D%2C%22%40id%22%3A%22_%3Ab10%22%2C%22%40type%22%3A%22spinrdf%3AConstruct%22%2C%22spinrdf%3Awhere%22%3A%7B%22%40list%22%3A%5B%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22rdf%3Atype%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23Event%22%7D%2C%22%40id%22%3A%22_%3Ab14%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab36%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22Any%20new%20email%22%2C%22%40id%22%3A%22_%3Ab15%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab27%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23hasOutputParameter%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab35%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%2C%22%40id%22%3A%22_%3Ab16%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab33%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23generatesEvent%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab6%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%2C%22%40id%22%3A%22_%3Ab17%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fifttt.com%2FGmail%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22FromAddress%22%2C%22%40id%22%3A%22_%3Ab18%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab24%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Avalue%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab31%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%22%40id%22%3A%22_%3Ab19%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab9%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab20%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg2%22%3A%7B%22%40id%22%3A%22_%3Ab29%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%22spinrdf%3Aarg1%22%3A%22You%20have%20received%20a%20new%20message%20from%20%22%2C%22%40id%22%3A%22_%3Ab28%22%2C%22%40type%22%3A%22http%3A%2F%2Fwww.w3.org%2F2005%2Fxpath-functions%23concat%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab30%22%2C%22spinrdf%3AvarName%22%3A%22message%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab21%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg1%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontology%2Fewe%2Feamples%2Faction1%22%2C%22%40id%22%3A%22_%3Ab34%22%2C%22%40type%22%3A%22spinrdf%3Auri%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab1%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab22%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg1%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontology%2Fewe%2Feamples%2Fparam1%22%2C%22%40id%22%3A%22_%3Ab25%22%2C%22%40type%22%3A%22spinrdf%3Auri%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab26%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%5D%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22rdf%3Atype%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23Action%22%7D%2C%22%40id%22%3A%22_%3Ab11%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab38%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22New%20chat%20message%22%2C%22%40id%22%3A%22_%3Ab12%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab23%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23hasParameter%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab37%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%2C%22%40id%22%3A%22_%3Ab13%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab32%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22rdf%3Atype%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23Event%22%7D%2C%22%40id%22%3A%22_%3Ab14%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab36%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22Any%20new%20email%22%2C%22%40id%22%3A%22_%3Ab15%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab27%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23hasOutputParameter%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab35%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%2C%22%40id%22%3A%22_%3Ab16%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab33%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23generatesEvent%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab6%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%2C%22%40id%22%3A%22_%3Ab17%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fifttt.com%2FGmail%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22FromAddress%22%2C%22%40id%22%3A%22_%3Ab18%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab24%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Avalue%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab31%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%22%40id%22%3A%22_%3Ab19%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab9%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Avalue%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab0%22%2C%22spinrdf%3AvarName%22%3A%22message%22%7D%2C%22%40id%22%3A%22_%3Ab2%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab3%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab20%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg2%22%3A%7B%22%40id%22%3A%22_%3Ab29%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%22spinrdf%3Aarg1%22%3A%22You%20have%20received%20a%20new%20message%20from%20%22%2C%22%40id%22%3A%22_%3Ab28%22%2C%22%40type%22%3A%22http%3A%2F%2Fwww.w3.org%2F2005%2Fxpath-functions%23concat%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab30%22%2C%22spinrdf%3AvarName%22%3A%22message%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab21%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg1%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontology%2Fewe%2Feamples%2Faction1%22%2C%22%40id%22%3A%22_%3Ab34%22%2C%22%40type%22%3A%22spinrdf%3Auri%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab1%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab22%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg1%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontology%2Fewe%2Feamples%2Fparam1%22%2C%22%40id%22%3A%22_%3Ab25%22%2C%22%40type%22%3A%22spinrdf%3Auri%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab26%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab23%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%2C%7B%22%40id%22%3A%22_%3Ab24%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%2C%7B%22spinrdf%3Aarg1%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontology%2Fewe%2Feamples%2Fparam1%22%2C%22%40id%22%3A%22_%3Ab25%22%2C%22%40type%22%3A%22spinrdf%3Auri%22%7D%2C%7B%22%40id%22%3A%22_%3Ab26%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%2C%7B%22%40id%22%3A%22_%3Ab27%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%2C%7B%22spinrdf%3Aarg2%22%3A%7B%22%40id%22%3A%22_%3Ab29%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%22spinrdf%3Aarg1%22%3A%22You%20have%20received%20a%20new%20message%20from%20%22%2C%22%40id%22%3A%22_%3Ab28%22%2C%22%40type%22%3A%22http%3A%2F%2Fwww.w3.org%2F2005%2Fxpath-functions%23concat%22%7D%2C%7B%22%40id%22%3A%22_%3Ab29%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%7B%22%40id%22%3A%22_%3Ab3%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%2C%7B%22%40id%22%3A%22_%3Ab30%22%2C%22spinrdf%3AvarName%22%3A%22message%22%7D%2C%7B%22%40id%22%3A%22_%3Ab31%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%7B%22%40id%22%3A%22_%3Ab32%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%2C%7B%22%40id%22%3A%22_%3Ab33%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%2C%7B%22spinrdf%3Aarg1%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontology%2Fewe%2Feamples%2Faction1%22%2C%22%40id%22%3A%22_%3Ab34%22%2C%22%40type%22%3A%22spinrdf%3Auri%22%7D%2C%7B%22%40id%22%3A%22_%3Ab35%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%2C%7B%22%40id%22%3A%22_%3Ab36%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%2C%7B%22%40id%22%3A%22_%3Ab37%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%2C%7B%22%40id%22%3A%22_%3Ab38%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23providesAction%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab5%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%2C%22%40id%22%3A%22_%3Ab4%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fifttt.com%2FGoogleTalk%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab5%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%2C%7B%22%40id%22%3A%22_%3Ab6%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22message%22%2C%22%40id%22%3A%22_%3Ab7%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab8%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab8%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%2C%7B%22%40id%22%3A%22_%3Ab9%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%2C%7B%22ewe%3Aexecutes%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fifttt.com%2Fchannels%2Fgoogle_talk%2Factions%2F23%22%7D%2C%22dcterms%3Atitle%22%3A%22Inform%20of%20new%20emails%22%2C%22ewe%3AtimesUsed%22%3A%220%22%2C%22ewe%3AtriggeredBy%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fifttt.com%2Fchannels%2Fgmail%2Ftriggers%2F185%22%7D%2C%22ewe%3AhasCreator%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fexample%23User_1%22%7D%2C%22dcterms%3Adescription%22%3A%22It%20sends%20the%20user%20a%20new%20chat%20message%20thought%20the%20GoogleTalk%20channel%20every%20time%20a%20new%20email%20is%20received.%20The%20content%20of%20the%20chat%20message%20specify%20the%20senders%20email%20address%2C%20so%20the%20user%20can%20decide%20if%20it%20is%20important%20or%20not.%22%2C%22http%3A%2F%2Fspinrdf.org%2Fspin%23query%22%3A%7B%22spinrdf%3Atemplates%22%3A%7B%22%40list%22%3A%5B%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22rdf%3Atype%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23Action%22%7D%2C%22%40id%22%3A%22_%3Ab11%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab38%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22New%20chat%20message%22%2C%22%40id%22%3A%22_%3Ab12%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab23%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23hasParameter%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab37%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%2C%22%40id%22%3A%22_%3Ab13%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab32%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22message%22%2C%22%40id%22%3A%22_%3Ab7%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab8%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Avalue%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab0%22%2C%22spinrdf%3AvarName%22%3A%22message%22%7D%2C%22%40id%22%3A%22_%3Ab2%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab3%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23providesAction%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab5%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%2C%22%40id%22%3A%22_%3Ab4%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fifttt.com%2FGoogleTalk%22%7D%7D%5D%7D%2C%22%40id%22%3A%22_%3Ab10%22%2C%22%40type%22%3A%22spinrdf%3AConstruct%22%2C%22spinrdf%3Awhere%22%3A%7B%22%40list%22%3A%5B%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22rdf%3Atype%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23Event%22%7D%2C%22%40id%22%3A%22_%3Ab14%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab36%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22Any%20new%20email%22%2C%22%40id%22%3A%22_%3Ab15%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab27%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23hasOutputParameter%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab35%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%2C%22%40id%22%3A%22_%3Ab16%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab33%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%23generatesEvent%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab6%22%2C%22spinrdf%3AvarName%22%3A%22event%22%7D%2C%22%40id%22%3A%22_%3Ab17%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22https%3A%2F%2Fifttt.com%2FGmail%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Atitle%22%7D%2C%22spinrdf%3Aobject%22%3A%22FromAddress%22%2C%22%40id%22%3A%22_%3Ab18%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab24%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%7D%2C%7B%22spinrdf%3Apredicate%22%3A%7B%22%40id%22%3A%22dcterms%3Avalue%22%7D%2C%22spinrdf%3Aobject%22%3A%7B%22%40id%22%3A%22_%3Ab31%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%22%40id%22%3A%22_%3Ab19%22%2C%22spinrdf%3Asubject%22%3A%7B%22%40id%22%3A%22_%3Ab9%22%2C%22spinrdf%3AvarName%22%3A%22oParam%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab20%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg2%22%3A%7B%22%40id%22%3A%22_%3Ab29%22%2C%22spinrdf%3AvarName%22%3A%22oParamFrom%22%7D%2C%22spinrdf%3Aarg1%22%3A%22You%20have%20received%20a%20new%20message%20from%20%22%2C%22%40id%22%3A%22_%3Ab28%22%2C%22%40type%22%3A%22http%3A%2F%2Fwww.w3.org%2F2005%2Fxpath-functions%23concat%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab30%22%2C%22spinrdf%3AvarName%22%3A%22message%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab21%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg1%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontology%2Fewe%2Feamples%2Faction1%22%2C%22%40id%22%3A%22_%3Ab34%22%2C%22%40type%22%3A%22spinrdf%3Auri%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab1%22%2C%22spinrdf%3AvarName%22%3A%22action%22%7D%7D%2C%7B%22%40id%22%3A%22_%3Ab22%22%2C%22%40type%22%3A%22spinrdf%3ABind%22%2C%22spinrdf%3Aexpression%22%3A%7B%22spinrdf%3Aarg1%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontology%2Fewe%2Feamples%2Fparam1%22%2C%22%40id%22%3A%22_%3Ab25%22%2C%22%40type%22%3A%22spinrdf%3Auri%22%7D%2C%22spinrdf%3Avariable%22%3A%7B%22%40id%22%3A%22_%3Ab26%22%2C%22spinrdf%3AvarName%22%3A%22iParam%22%7D%7D%5D%7D%7D%2C%22%40id%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fexample%23Rule_1%22%2C%22%40type%22%3A%22ewe%3ARule%22%7D%5D%7D&frame=%7B%22%40context%22%3A%7B%22foaf%22%3A%22http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%22%2C%22owl%22%3A%22http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%22%2C%22rdf%22%3A%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%2C%22ewe%22%3A%22http%3A%2F%2Fgsi.dit.upm.es%2Fontologies%2Fewe%2Fns%2F%22%2C%22xsd%22%3A%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%22%2C%22rdfs%22%3A%22http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%22%2C%22dcterms%22%3A%22http%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%22%2C%22tags%22%3A%22http%3A%2F%2Fwww.holygoat.co.uk%2Fowl%2Fredwood%2F0.1%2Ftags%2F%22%2C%22spinrdf%22%3A%22http%3A%2F%2Fspinrdf.org%2Fsp%23%22%2C%22homepage%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fschema.org%2Furl%22%2C%22%40type%22%3A%22%40id%22%7D%2C%22image%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Fschema.org%2Fimage%22%2C%22%40type%22%3A%22%40id%22%7D%7D%2C%22%40type%22%3A%22ewe%3ARule%22%7D)\n\nCon lo que te genera el conversor que usaste, en principio s\u00f3lo te hace falta hacer compactaci\u00f3n.\nSi ves que te sigue saliendo lo de \"@graph\", prueba a hacer framing con el contexto de abajo :)"
},
{
"cell_type": "code",
"collapsed": false,
"input": "from rdflib import Graph\ng = Graph()",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": true,
"input": " # rdf = open('example.rdf', 'r')\n from StringIO import StringIO\n rdf = StringIO('''\n \n \n \n \n \n Gmail\n Googles approach to email, Gmail, is built on the idea that email can be moreintuitive, efficient, and useful. And maybe even fun.\n http://gmail.com\n https://ifttt.com/images/channels/gmail_lrg.png\n \n \n \n \n \n \n \n \n \n \n \n \n New email from search \n This Trigger fires every time a new email arrives in your inbox that matchesthe search query you specify. \n \n \n FromAddress \n Email address of sender. \n somebody@gmail.com \n \n \n \n \n Subject \n Email subject line. \n Hello there \n \n \n \n \n BodyPlain \n Plain text email body. \n Been having a good day so far... \n \n \n \n \n FirstAttachmentPrivateURL \n A URL to the first file attachment (if any) that only you can see. \n https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \n \n \n \n FirstAttachmentPublicURL \n A URL to the first file attachment (if any) that anyone can see. \n https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \n \n \n \n FirstAttachmentFilename \n The filename of the first file attachment (if any). \n LadyTheDog.png \n \n \n \n \n ReceivedAt \n Date and time email was received. \n August 23, 2010 at 11:01PM \n \n \n \n \n Search for \n string_value \n \n \n \n \n \n \n New email labeled \n This Trigger fires every time a new email arrives in your inbox with the labelyou specify. \n \n \n FromAddress \n Email address of sender. \n somebody@gmail.com \n \n \n \n \n Subject \n Email subject line. \n Hello there \n \n \n \n \n BodyPlain \n Plain text email body. \n Been having a good day so far... \n \n \n \n \n FirstAttachmentPrivateURL \n A URL to the first file attachment (if any) that only you can see. \n https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \n \n \n \n FirstAttachmentPublicURL \n A URL to the first file attachment (if any) that anyone can see. \n https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \n \n \n \n FirstAttachmentFilename \n The filename of the first file attachment (if any). \n LadyTheDog.png \n \n \n \n \n Label \n The Gmail label from trigger. \n Work \n \n \n \n \n ReceivedAt \n Date and time email was received. \n August 23, 2010 at 11:01PM \n \n \n \n \n Label \n string_value \n \n \n \n \n \n New starred email \n This Trigger fires every time you add any new star to an email. \n \n \n FromAddress \n Email address of sender. \n somebody@gmail.com \n \n \n \n \n Subject \n Email subject line. \n Hello there \n \n \n \n \n BodyPlain \n Plain text email body. \n Been having a good day so far... \n \n \n \n \n FirstAttachmentPrivateURL \n A URL to the first file attachment (if any) that only you can see. \n https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \n \n \n \n FirstAttachmentPublicURL \n A URL to the first file attachment (if any) that anyone can see. \n https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \n \n \n \n FirstAttachmentFilename \n The filename of the first file attachment (if any). \n LadyTheDog.png \n \n \n \n \n ReceivedAt \n Date and time email was received. \n August 23, 2010 at 11:01PM \n \n \n \n \n \n \n New email from \n This Trigger fires every time a new email arrives in your inbox from theaddress you specify. \n \n \n FromAddress \n Email address of sender. \n somebody@gmail.com \n \n \n \n \n Subject \n Email subject line. \n Hello there \n \n \n \n \n BodyPlain \n Plain text email body. \n Been having a good day so far... \n \n \n \n \n FirstAttachmentPrivateURL \n A URL to the first file attachment (if any) that only you can see. \n https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \n \n \n \n FirstAttachmentPublicURL \n A URL to the first file attachment (if any) that anyone can see. \n https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \n \n \n \n FirstAttachmentFilename \n The filename of the first file attachment (if any). \n LadyTheDog.png \n \n \n \n \n ReceivedAt \n Date and time email was received. \n August 23, 2010 at 11:01PM \n \n \n \n \n Email address \n string_value \n \n \n \n \n \n Any new attachment \n This Trigger fires for every email attachment that arrives in your inbox.NOTE: Multiple attachments each fire separately. \n \n \n FromAddress \n Email address of sender. \n somebody@gmail.com \n \n \n \n \n Subject \n Email subject line. \n Hello there \n \n \n \n \n BodyPlain \n Plain text email body. \n Been having a good day so far... \n \n \n \n \n AttachmentPrivateURL \n A URL to the file attachment that only you can see. \n https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \n \n \n \n AttachmentPublicURL \n A URL to the file attachment that anyone can see. \n https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \n \n \n \n AttachmentFilename \n The filename of the attachment. \n LadyTheDog.png \n \n \n \n \n ReceivedAt \n Date and time email was received. \n August 23, 2010 at 11:01PM \n \n \n \n \n \n \n Any new email \n This Trigger fires every time any new email arrives in Gmail. \n \n \n FromAddress \n Email address of sender. \n somebody@gmail.com \n \n \n \n \n Subject \n Email subject line. \n Hello there \n \n \n \n \n BodyPlain \n Plain text email body. \n Been having a good day so far... \n \n \n \n \n FirstAttachmentPrivateURL \n A URL to the first file attachment (if any) that only you can see. \n https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \n \n \n \n FirstAttachmentPublicURL \n A URL to the first file attachment (if any) that anyone can see. \n https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \n \n \n \n FirstAttachmentFilename \n The filename of the first file attachment (if any). \n LadyTheDog.png \n \n \n \n \n ReceivedAt \n Date and time email was received. \n August 23, 2010 at 11:01PM \n \n \n \n \n \n \n Send an email\n This Action will send an email to a single recipient from your Gmail account.\n \n \n To address\n single email address only \n \n \n \n \n Subject\n \n \n \n \n Body\n some HTML ok\n \n \n \n \n Attachment URL\n URL to include as an attachment\n \n \n \n \n \n ''')",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": "rdf = StringIO('''\n\n\n\n\t\n\t\n\t\tGmail\n\t\tGoogles approach to email, Gmail, is built on the idea that email can be moreintuitive, efficient, and useful. And maybe even fun.\n\t\thttp://gmail.com\n\t\thttps://ifttt.com/images/channels/gmail_lrg.png\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t \n\t\t\n\t\n\n\t\n\t\n\t New email from search \n \tThis Trigger fires every time a new email arrives in your inbox that matchesthe search query you specify. \n\t \n \t \n\t \tFromAddress \n\t \t Email address of sender. \n\t\t somebody@gmail.com \n \t \n\t \n\t \n\t\t \n\t\t Subject \n\t\t Email subject line. \n\t\t Hello there \n\t\t \n\t \n\t\t\n \t \n\t\t BodyPlain \n\t\t Plain text email body. \n\t\t Been having a good day so far... \n \t \n\t \n\t \n \t \n\t\t\t\tFirstAttachmentPrivateURL \n\t\t\t\tA URL to the first file attachment (if any) that only you can see. \n\t\t\t\thttps://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \t \n\t \n \t\n \t \n\t\t\t\tFirstAttachmentPublicURL \n\t\t\t\tA URL to the first file attachment (if any) that anyone can see. \n\t\t\t\thttps://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentFilename \n\t\t\t\tThe filename of the first file attachment (if any). \n\t\t\t\tLadyTheDog.png \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tReceivedAt \n\t\t\t\tDate and time email was received. \n\t\t\t\tAugust 23, 2010 at 11:01PM \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tSearch for \n\t\t\t\tstring_value \n \t \n\t \n\t\n\n\n\t\n \tNew email labeled \n\t This Trigger fires every time a new email arrives in your inbox with the labelyou specify. \n\t\t\n \t \n\t\t\t\tFromAddress \n\t\t\t\tEmail address of sender. \n\t\t\t\tsomebody@gmail.com \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tSubject \n\t\t\t\tEmail subject line. \n\t\t\t\tHello there \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tBodyPlain \n\t\t\t\tPlain text email body. \n\t\t\t\tBeen having a good day so far... \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentPrivateURL \n\t\t\t\tA URL to the first file attachment (if any) that only you can see. \n\t\t\t\thttps://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentPublicURL \n\t\t\t\tA URL to the first file attachment (if any) that anyone can see. \n\t\t\t\thttps://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentFilename \n\t\t\t\tThe filename of the first file attachment (if any). \n\t\t\t\tLadyTheDog.png \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tLabel \n\t\t\t\tThe Gmail label from trigger. \n\t\t\t\tWork \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tReceivedAt \n\t\t\t\tDate and time email was received. \n\t\t\t\tAugust 23, 2010 at 11:01PM \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tLabel \n\t\t\t\tstring_value \n \t \n\t\t\n\t\n\n\t\n\t\tNew starred email \n\t\tThis Trigger fires every time you add any new star to an email. \n\t\t\n \t \n\t\t\t\tFromAddress \n\t\t\t\tEmail address of sender. \n\t\t\t\tsomebody@gmail.com \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tSubject \n\t\t\t\tEmail subject line. \n\t\t\t\tHello there \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tBodyPlain \n\t\t\t\tPlain text email body. \n\t\t\t\tBeen having a good day so far... \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentPrivateURL \n\t\t\t\tA URL to the first file attachment (if any) that only you can see. \n\t\t\t\thttps://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentPublicURL \n\t\t\t\tA URL to the first file attachment (if any) that anyone can see. \n\t\t\t\thttps://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentFilename \n\t\t\t\tThe filename of the first file attachment (if any). \n\t\t\t\tLadyTheDog.png \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tReceivedAt \n\t\t\t\tDate and time email was received. \n\t\t\t\tAugust 23, 2010 at 11:01PM \n \t \n\t\t\n\t\n\n\n\t\n\t\tNew email from \n\t\tThis Trigger fires every time a new email arrives in your inbox from theaddress you specify. \n\t\t\n \t \n\t\t\t\tFromAddress \n\t\t\t\tEmail address of sender. \n\t\t\t\tsomebody@gmail.com \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tSubject \n\t\t\t\tEmail subject line. \n\t\t\t\tHello there \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tBodyPlain \n\t\t\t\tPlain text email body. \n\t\t\t\tBeen having a good day so far... \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentPrivateURL \n\t\t\t\tA URL to the first file attachment (if any) that only you can see. \n\t\t\t\thttps://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentPublicURL \n\t\t\t\tA URL to the first file attachment (if any) that anyone can see. \n\t\t\t\thttps://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentFilename \n\t\t\t\tThe filename of the first file attachment (if any). \n\t\t\t\tLadyTheDog.png \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tReceivedAt \n\t\t\t\tDate and time email was received. \n\t\t\t\tAugust 23, 2010 at 11:01PM \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tEmail address \n\t\t\t\tstring_value \n \t \n\t\t\n\t\n\n\t\n\t\tAny new attachment \n\t\tThis Trigger fires for every email attachment that arrives in your inbox.NOTE: Multiple attachments each fire separately. \n\t\t\n \t \n\t\t\t\tFromAddress \n\t\t\t\tEmail address of sender. \n\t\t\t\tsomebody@gmail.com \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tSubject \n\t\t\t\tEmail subject line. \n\t\t\t\tHello there \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tBodyPlain \n\t\t\t\tPlain text email body. \n\t\t\t\tBeen having a good day so far... \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tAttachmentPrivateURL \n\t\t\t\tA URL to the file attachment that only you can see. \n\t\t\t\thttps://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tAttachmentPublicURL \n\t\t\t\tA URL to the file attachment that anyone can see. \n\t\t\t\thttps://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tAttachmentFilename \n\t\t\t\tThe filename of the attachment. \n\t\t\t\tLadyTheDog.png \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tReceivedAt \n\t\t\t\tDate and time email was received. \n\t\t\t\tAugust 23, 2010 at 11:01PM \n \t \n\t\t\n\t\n\n\n\t\n\t\tAny new email \n\t\tThis Trigger fires every time any new email arrives in Gmail. \n\t\t\n \t \n\t\t\t\tFromAddress \n\t\t\t\tEmail address of sender. \n\t\t\t\tsomebody@gmail.com \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tSubject \n\t\t\t\tEmail subject line. \n\t\t\t\tHello there \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tBodyPlain \n\t\t\t\tPlain text email body. \n\t\t\t\tBeen having a good day so far... \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentPrivateURL \n\t\t\t\tA URL to the first file attachment (if any) that only you can see. \n\t\t\t\thttps://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentPublicURL \n\t\t\t\tA URL to the first file attachment (if any) that anyone can see. \n\t\t\t\thttps://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tFirstAttachmentFilename \n\t\t\t\tThe filename of the first file attachment (if any). \n\t\t\t\tLadyTheDog.png \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tReceivedAt \n\t\t\t\tDate and time email was received. \n\t\t\t\tAugust 23, 2010 at 11:01PM \n \t \n\t\t\n\t\n\n\t\n\t\n\t\tSend an email\n\t\tThis Action will send an email to a single recipient from your Gmail account.\n\t\t\n \t \n\t\t\t\tTo address\n\t\t\t\tsingle email address only \n \t \n\t\t\n\t\t\n \t \n\t\t\t\tSubject\n \t \n\t\t\n\t\t\n \t \n\t\t\t\tBody\n\t\t\t\tsome HTML ok\n \t \n\t\t\n\t\t\n \t \n\t\t\t\tAttachment URL\n\t\t\t\tURL to include as an attachment\n \t \n\t\t\n\t\n\n\n''')",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": "g.parse(rdf)\nnt = g.serialize(format='nt')\nnt",
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 4,
"text": "'_:N902dc61e92d24ac4b8c7d0e9dfa444b9 \"Subject\" .\\n_:N0dd4c4ac84064309b41dcf1e7fe3918c \"FirstAttachmentPrivateURL\" .\\n \"Send an email\" .\\n_:N615b6ec4c6bd434ca92ac7314fd27f19 \"ReceivedAt\" .\\n_:Nf4fc972a2dad4c4bb88dc7a7a80280a3 \"somebody@gmail.com\" .\\n_:N615b6ec4c6bd434ca92ac7314fd27f19 \"Date and time email was received.\" .\\n_:N0210346037ba4ac2bdc1155a9ef60c63 \"The filename of the first file attachment (if any).\" .\\n _:N6ebd190ec7554496aa6b24d1fae9e33a .\\n_:N902dc61e92d24ac4b8c7d0e9dfa444b9 \"Hello there\" .\\n_:N9448220723f74fbd98e67f1880de1ced .\\n_:Nec46842ec98a4ac08437c492563b0bb9 \"Date and time email was received.\" .\\n_:Neb3f393873c247ed8d4b70731dc7bbcf .\\n _:N8fa2723166854100bb95cadcbe808e2d .\\n_:N401f62004d1142fb9f1eb85694c32c32 \"ReceivedAt\" .\\n .\\n _:N6fbae96ee43a4e8aa5b4e1e968719dec .\\n _:N178bffdecedc4013ba4ae1ed4cefd0f0 .\\n_:Nb2bf44e27916498e9eddf9a486ee8dc7 .\\n _:N76df4cf31348496e8a394c137d0200f8 .\\n _:N9448220723f74fbd98e67f1880de1ced .\\n_:Nf3422c781f97402291ba9dec3e5bed06 \"https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf\" .\\n_:N1c63fdb0196a44c19ea23f031c6e1571 .\\n_:N8fa2723166854100bb95cadcbe808e2d .\\n _:Nb2bf44e27916498e9eddf9a486ee8dc7 .\\n_:N76df4cf31348496e8a394c137d0200f8 \"The filename of the first file attachment (if any).\" .\\n_:N6fbae96ee43a4e8aa5b4e1e968719dec .\\n_:N0d990526ca5349af9bc84d189e57ebe2 \"Been having a good day so far...\" .\\n_:Na387f99b32994cfcbe029c0d3dc7a9c7 \"Date and time email was received.\" .\\n _:N238780b0d04b408187ff5e9dbbb35849 .\\n_:N2a4af8059cd54651a33f77bc82fcabf6 .\\n_:Nee0e3d565db5471c9efd5248f8aa66b1 .\\n_:N2a4af8059cd54651a33f77bc82fcabf6 \"Work\" .\\n _:Nec46842ec98a4ac08437c492563b0bb9 .\\n_:Nb2bf44e27916498e9eddf9a486ee8dc7 \"FirstAttachmentPublicURL\" .\\n \"Gmail\" .\\n .\\n_:N056eb50561fd4033bebf876fbd3ab506 .\\n_:Nefdd2d99954044e9bddd147924124c88 \"Subject\" .\\n_:N774339656e8340718d7bed1070fdaab1 \"Email subject line.\" .\\n_:Nefdd2d99954044e9bddd147924124c88 \"Hello there\" .\\n_:Nff8dd67dab5847b7999f0b7b3f925896 .\\n_:Nb4720ccafadb434c8259bb4f4c8cf198 .\\n_:N401f62004d1142fb9f1eb85694c32c32 .\\n_:Nff8dd67dab5847b7999f0b7b3f925896 \"FirstAttachmentPrivateURL\" .\\n_:N8fa2723166854100bb95cadcbe808e2d \"https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf\" .\\n_:Ncea892d43d894bb1990b3bc8182c1ed2 .\\n .\\n_:Nb2bf44e27916498e9eddf9a486ee8dc7 \"A URL to the first file attachment (if any) that anyone can see.\" .\\n_:N238780b0d04b408187ff5e9dbbb35849 \"AttachmentPublicURL\" .\\n_:Nf3422c781f97402291ba9dec3e5bed06 \"A URL to the first file attachment (if any) that anyone can see.\" .\\n_:Nb35e69dc8711426bbeb72e4b412af4d0 \"Subject\" .\\n_:N060b3a5887d74a8f9770ea087550f7e3 .\\n_:N66a860efc4d54b11b9b6d811d8e7b95c \"A URL to the first file attachment (if any) that only you can see.\" .\\n_:N2a4af8059cd54651a33f77bc82fcabf6 \"Label\" .\\n_:N902dc61e92d24ac4b8c7d0e9dfa444b9 \"Email subject line.\" .\\n_:N9ea6892b0ad64e23999e7ac50b2e516e \"Date and time email was received.\" .\\n_:N73eba7c77cc84b068dd425274688c193 \"The filename of the attachment.\" .\\n_:Na387f99b32994cfcbe029c0d3dc7a9c7 .\\n _:Nefdd2d99954044e9bddd147924124c88 .\\n_:N28b1a3f9227b40efaa2e8492555b1964 \"Been having a good day so far...\" .\\n _:N0d990526ca5349af9bc84d189e57ebe2 .\\n _:Nf3422c781f97402291ba9dec3e5bed06 .\\n_:N76df4cf31348496e8a394c137d0200f8 .\\n _:N62da3b21c7734efb8ce02558c9ae0276 .\\n_:N056eb50561fd4033bebf876fbd3ab506 \"https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf\" .\\n_:N9ea6892b0ad64e23999e7ac50b2e516e \"ReceivedAt\" .\\n_:Neb3f393873c247ed8d4b70731dc7bbcf \"Been having a good day so far...\" .\\n_:N715f4ee23c58419bb8c4a2d21216acf3 \"FirstAttachmentPublicURL\" .\\n_:N178bffdecedc4013ba4ae1ed4cefd0f0 \"Email address of sender.\" .\\n_:N40665263942e4579a6c65e0780c53223 \"Email address of sender.\" .\\n_:N0210346037ba4ac2bdc1155a9ef60c63 \"FirstAttachmentFilename\" .\\n_:Nf4fc972a2dad4c4bb88dc7a7a80280a3 \"FromAddress\" .\\n_:N2bcbcbfa16014aaa92de53c383872184 \"URL to include as an attachment\" .\\n_:N66a860efc4d54b11b9b6d811d8e7b95c .\\n_:N902dc61e92d24ac4b8c7d0e9dfa444b9 .\\n_:Na387f99b32994cfcbe029c0d3dc7a9c7 \"ReceivedAt\" .\\n_:N28b1a3f9227b40efaa2e8492555b1964 \"Plain text email body.\" .\\n _:N73eba7c77cc84b068dd425274688c193 .\\n \"This Trigger fires every time a new email arrives in your inbox from theaddress you specify.\" .\\n _:Nf4fc972a2dad4c4bb88dc7a7a80280a3 .\\n _:N060b3a5887d74a8f9770ea087550f7e3 .\\n_:Nb2bf44e27916498e9eddf9a486ee8dc7 \"https://locker.ifttt.com/f/4bfc930c-ac73-11e2-b086-22000a9730cf\" .\\n_:N97ac368f8f6e4d7194718af57863883a \"Label\" .\\n_:N0210346037ba4ac2bdc1155a9ef60c63 \"LadyTheDog.png\" .\\n_:N178bffdecedc4013ba4ae1ed4cefd0f0 \"somebody@gmail.com\" .\\n_:N615b6ec4c6bd434ca92ac7314fd27f19 .\\n \"New email labeled\" .\\n \"https://ifttt.com/images/channels/gmail_lrg.png\" .\\n _:N20c0b7d7582e428e9c2012a064cf3d12 .\\n _:N1c63fdb0196a44c19ea23f031c6e1571 .\\n_:N774339656e8340718d7bed1070fdaab1 .\\n_:N9448220723f74fbd98e67f1880de1ced \"somebody@gmail.com\" .\\n _:Neb3f393873c247ed8d4b70731dc7bbcf .\\n _:N890d18e7509b45c2a78da0751ba0a102 .\\n _:N88747f85dfc24bd7baf4afaa790aa7d1 .\\n_:Nb4720ccafadb434c8259bb4f4c8cf198 \"FirstAttachmentFilename\" .\\n _:Nb4720ccafadb434c8259bb4f4c8cf198 .\\n_:N178bffdecedc4013ba4ae1ed4cefd0f0 .\\n _:Nee0e3d565db5471c9efd5248f8aa66b1 .\\n_:N9ea6892b0ad64e23999e7ac50b2e516e \"August 23, 2010 at 11:01PM\" .\\n_:N28b1a3f9227b40efaa2e8492555b1964 .\\n_:N6fbae96ee43a4e8aa5b4e1e968719dec \"FirstAttachmentPrivateURL\" .\\n \"New starred email\" .\\n_:N97ac368f8f6e4d7194718af57863883a \"string_value\" .\\n _:Na387f99b32994cfcbe029c0d3dc7a9c7 .\\n_:Nec46842ec98a4ac08437c492563b0bb9 \"ReceivedAt\" .\\n _:N40665263942e4579a6c65e0780c53223 .\\n .\\n_:Nc6919ad1c64f49b696cee4dc2e0d86e8 \"Been having a good day so far...\" .\\n \"New email from\" .\\n_:Na7325782dc524f858ab62fa5d76b889c .\\n_:Nf4fc972a2dad4c4bb88dc7a7a80280a3 \"Email address of sender.\" .\\n_:N0cd0137467684c5cb83a129293fbd37b \"Search for\" .\\n _:N28b1a3f9227b40efaa2e8492555b1964 .\\n_:N62da3b21c7734efb8ce02558c9ae0276 .\\n_:N1c63fdb0196a44c19ea23f031c6e1571 \"somebody@gmail.com\" .\\n _:N0cd0137467684c5cb83a129293fbd37b .\\n_:N8fa2723166854100bb95cadcbe808e2d \"A URL to the first file attachment (if any) that only you can see.\" .\\n .\\n_:N099fe544cc544344a0003952f911e41a \"Date and time email was received.\" .\\n_:N62da3b21c7734efb8ce02558c9ae0276 \"BodyPlain\" .\\n_:N5613cce30ef34b79bb4ccb8449946c04 \"To address\" .\\n_:N0dd4c4ac84064309b41dcf1e7fe3918c .\\n_:N5613cce30ef34b79bb4ccb8449946c04 .\\n_:N62da3b21c7734efb8ce02558c9ae0276 \"Been having a good day so far...\" .\\n_:N40665263942e4579a6c65e0780c53223 \"FromAddress\" .\\n_:N4c2b948430b74b4e842bc071e06e147f \"LadyTheDog.png\" .\\n_:Nec46842ec98a4ac08437c492563b0bb9 .\\n_:N4ebb55ae3980409a845e39a130a86f4a .\\n \"This Trigger fires every time you add any new star to an email.\" .\\n_:Nff8dd67dab5847b7999f0b7b3f925896 \"https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf\" .\\n_:N9448220723f74fbd98e67f1880de1ced \"Email address of sender.\" .\\n_:N6fbae96ee43a4e8aa5b4e1e968719dec \"A URL to the first file attachment (if any) that only you can see.\" .\\n_:N060b3a5887d74a8f9770ea087550f7e3 \"BodyPlain\" .\\n_:N28b1a3f9227b40efaa2e8492555b1964 \"BodyPlain\" .\\n_:N890d18e7509b45c2a78da0751ba0a102 \"Body\" .\\n_:N401f62004d1142fb9f1eb85694c32c32 \"Date and time email was received.\" .\\n_:Nb4720ccafadb434c8259bb4f4c8cf198 \"LadyTheDog.png\" .\\n _:N1ee93fc8e0e74763ae5b37b227e616f6 .\\n_:N4c2b948430b74b4e842bc071e06e147f \"FirstAttachmentFilename\" .\\n_:N4ebb55ae3980409a845e39a130a86f4a \"The filename of the first file attachment (if any).\" .\\n _:Nc6919ad1c64f49b696cee4dc2e0d86e8 .\\n .\\n .\\n_:N62da3b21c7734efb8ce02558c9ae0276 \"Plain text email body.\" .\\n \"New email from search\" .\\n_:N238780b0d04b408187ff5e9dbbb35849 .\\n_:N0cd0137467684c5cb83a129293fbd37b .\\n_:Neb3f393873c247ed8d4b70731dc7bbcf \"BodyPlain\" .\\n_:N4ebb55ae3980409a845e39a130a86f4a \"LadyTheDog.png\" .\\n _:N401f62004d1142fb9f1eb85694c32c32 .\\n_:N099fe544cc544344a0003952f911e41a .\\n _:N66a860efc4d54b11b9b6d811d8e7b95c .\\n_:N66a860efc4d54b11b9b6d811d8e7b95c \"https://locker.ifttt.com/f/29b08556-ac73-11e2-a707-22000a9730cf\" .\\n_:Nc6919ad1c64f49b696cee4dc2e0d86e8 \"Plain text email body.\" .\\n \"This Trigger fires for every email attachment that arrives in your inbox.NOTE: Multiple attachments each fire separately.\" .\\n_:Neb3f393873c247ed8d4b70731dc7bbcf \"Plain text email body.\" .\\n_:Nc6919ad1c64f49b696cee4dc2e0d86e8 \"BodyPlain\" .\\n_:Nb35e69dc8711426bbeb72e4b412af4d0 \"Email subject line.\" .\\n_:Nf4fc972a2dad4c4bb88dc7a7a80280a3 .\\n _:N4ebb55ae3980409a845e39a130a86f4a .\\n_:N9448220723f74fbd98e67f1880de1ced \"FromAddress\" .\\n_:Na387f99b32994cfcbe029c0d3dc7a9c7 \"August 23, 2010 at 11:01PM\" .\\n_:N4c2b948430b74b4e842bc071e06e147f .\\n_:N0d990526ca5349af9bc84d189e57ebe2 \"BodyPlain\" .\\n_:Nec46842ec98a4ac08437c492563b0bb9