morss: drop :html, replaced with :reader

README updated accordingly
master
pictuga 2020-04-07 09:23:29 +02:00
parent a09831415f
commit f1d0431e68
2 changed files with 3 additions and 3 deletions

View File

@ -73,6 +73,7 @@ The arguments are:
- Change what morss does
- `json`: output as JSON
- `html`: outpout as HTML
- `proxy`: doesn't fill the articles
- `clip`: stick the full article content under the original feed content (useful for twitter)
- `search=STRING`: does a basic case-sensitive search in the feed
@ -90,7 +91,6 @@ The arguments are:
- http server only
- `callback=NAME`: for JSONP calls
- `cors`: allow Cross-origin resource sharing (allows XHR calls from other servers)
- `html`: changes the http content-type to html, so that python cgi erros (written in html) are readable in a web browser
- `txt`: changes the http content-type to txt (for faster "`view-source:`")
- Custom feeds: you can turn any HTML page into a RSS feed using morss, using xpath rules. The article content will be fetched as usual (with readabilite). Please note that you will have to **replace** any `/` in your rule with a `|` when using morss as a webserver
- `items`: (**mandatory** to activate the custom feeds function) xpath rule to match all the RSS entries

View File

@ -469,7 +469,7 @@ def FeedFormat(rss, options, encoding='utf-8'):
elif options.csv:
return rss.tocsv(encoding=encoding)
elif options.reader:
elif options.html:
if options.indent:
return rss.tohtml(encoding=encoding, pretty_print=True)
@ -547,7 +547,7 @@ def cgi_app(environ, start_response):
if options.cors:
headers['access-control-allow-origin'] = '*'
if options.html or options.reader:
if options.html:
headers['content-type'] = 'text/html'
elif options.txt or options.silent:
headers['content-type'] = 'text/plain'