From 25fdca4bf008153140cb695558c4447a24fa2f39 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 24 May 2014 19:02:22 +0200 Subject: [PATCH] Add do-it-all function For quick lib use --- morss/morss.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/morss/morss.py b/morss/morss.py index e84bac2..282bcc8 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -643,6 +643,17 @@ def After(rss, options): else: return rss.tostring(xml_declaration=True, encoding='UTF-8') +def process(url, cache, options=None): + if options == None: + options = [] + + options = Options(options) + url, cache = Init(url, cache, options) + rss = Fetch(url, cache, options) + rss = Gather(rss, url, cache, options) + + return After(rss, options) + def cgi_app(environ, start_response): # get options if 'REQUEST_URI' in environ: