From a78e7b73331f34875b51ec145553d7434f286cec Mon Sep 17 00:00:00 2001
From: sebnapi <devnull@localhost>
Date: Sun, 10 May 2009 18:41:41 +0000
Subject: new plugin-sys

---
 Plugins/Plugin.py | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Plugins/Plugin.py

(limited to 'Plugins/Plugin.py')

diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py
new file mode 100644
index 000000000..591d32594
--- /dev/null
+++ b/Plugins/Plugin.py
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+from time import time
+
+
+class Plugin():
+    
+    def __init__(self, parent):
+        self.plugin_name = None
+        self.plugin_pattern = None
+        self.plugin_type = ""
+        pluginProp = {}
+        pluginProp ['name'] = "Beispiel Plugin"
+        pluginProp ['version'] = "0.1"
+        pluginProp ['format'] = "*.py"
+        pluginProp ['description'] = """bla"""
+        pluginProp ['author'] = "Author"
+        pluginProp ['author_email'] = "nn@nn.de"
+        self.pluginProp = pluginProp 
+        self.parent = parent
+        self.html = ""
+        self.time_plus_wait = None #time() + wait in seconds
+    
+    def set_parent_status(self):
+        """ sets all available Statusinfos about a File in self.parent.status
+        """
+        pass
+    
+    def download_html(self):
+        """ gets the url from self.parent.url saves html in self.html and parses
+        """ 
+        html = ""
+        self.html = html
+    
+    def file_exists(self):
+        """ returns True or False 
+        """
+        if self.html != None:
+            self.download_html()
+        
+    def get_file_url(self):
+        """ returns the absolute downloadable filepath
+        """
+        if self.html != None:
+            self.download_html()
+    
+    def get_file_name(self):
+        pass
+    
+    def wait_until(self):
+        if self.html != None:
+            self.download_html()
+        return self.time_plus_wait
+        
+    
+    def __call__(self):
+        return self.plugin_name
-- 
cgit v1.2.3