diff options
author | sebnapi <devnull@localhost> | 2009-05-10 20:41:41 +0200 |
---|---|---|
committer | sebnapi <devnull@localhost> | 2009-05-10 20:41:41 +0200 |
commit | a78e7b73331f34875b51ec145553d7434f286cec (patch) | |
tree | 8b36f68d55948ae213e17176613060a7bfa966d2 /Plugins/Plugin.py | |
parent | Approach for Plugindesign (diff) | |
download | pyload-a78e7b73331f34875b51ec145553d7434f286cec.tar.xz |
new plugin-sys
Diffstat (limited to 'Plugins/Plugin.py')
-rw-r--r-- | Plugins/Plugin.py | 58 |
1 files changed, 58 insertions, 0 deletions
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 |