Skip to content

Instantly share code, notes, and snippets.

@ka010
Created April 18, 2010 15:26
Show Gist options
  • Save ka010/370282 to your computer and use it in GitHub Desktop.
Save ka010/370282 to your computer and use it in GitHub Desktop.
import os, re
from AmiTree import Container
from PlugIn import PlugIn
class GetXML(PlugIn):
def __init__(self, token, configFile):
PlugIn.__init__(self)
self.architecture = "all"
#plugin itself
self.content = Container("plugin", token, "xml download")
self.content.rendering = Container.PLAIN
#Plugin visibility, can be accessed, but is not listed
self.visible = True
#set add container
self.content.addContainer("cmd", "get", "GET XML", self.get)
def get(self, var):
xmlfile = open("/home/jens/Desktop/openami/PlugInsSupport/web/test.txt","r")
xmltext = xmlfile.read()
xmlfile.close()
return xmltext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment