README: cache no longer mandatory

master
pictuga 2014-05-24 19:14:12 +02:00
parent b66ac2bc5e
commit 1728e3902c
1 changed files with 4 additions and 6 deletions

View File

@ -96,19 +96,17 @@ For example: `python2.7 PATH/TO/MORSS/morss.py http://feeds.bbci.co.uk/news/rss.
Quickly get a full-text feed: Quickly get a full-text feed:
```python ```python
>>> import morss >>> import morss
>>> url = 'http://feeds.bbci.co.uk/news/rss.xml' >>> xml_string = morss.process('http://feeds.bbci.co.uk/news/rss.xml')
>>> cache = '/tmp/morss-cache' # cache folder, needs write permission
>>> xml_string = morss.process(url, cache)
>>> xml_string[:50] >>> xml_string[:50]
"<?xml version='1.0' encoding='UTF-8'?>\n<?xml-style" "<?xml version='1.0' encoding='UTF-8'?>\n<?xml-style"
``` ```
Passing arguments: Using cache and passing arguments:
```python ```python
>>> import morss >>> import morss
>>> url = 'http://feeds.bbci.co.uk/news/rss.xml' >>> url = 'http://feeds.bbci.co.uk/news/rss.xml'
>>> cache = '/tmp/morss-cache' >>> cache = '/tmp/morss-cache' # cache folder, needs write permission
>>> options = ['csv', 'md'] >>> options = ['csv', 'md'] # simple list()
>>> xml_string = morss.process(url, cache, options) >>> xml_string = morss.process(url, cache, options)
>>> xml_string[:50] >>> xml_string[:50]
'{"title": "BBC News - Home", "desc": "The latest s' '{"title": "BBC News - Home", "desc": "The latest s'