mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
27 lines
495 B
Text
27 lines
495 B
Text
![]() |
#!/usr/bin/env python
|
||
|
from config import *
|
||
|
|
||
|
import cgi, cgitb, sys
|
||
|
cgitb.enable()
|
||
|
|
||
|
import codecs
|
||
|
ENCODING='UTF-8'
|
||
|
sys.stdout = codecs.getwriter(ENCODING)(sys.stdout)
|
||
|
|
||
|
if SRCDIR not in sys.path:
|
||
|
sys.path.insert(0, SRCDIR)
|
||
|
|
||
|
class request:
|
||
|
content_type = "text/html"
|
||
|
|
||
|
from index import index
|
||
|
|
||
|
fs = cgi.FieldStorage()
|
||
|
req = request()
|
||
|
url = fs.getvalue('url') or ''
|
||
|
out = fs.getvalue('out') or 'xml'
|
||
|
|
||
|
result=index(req,url,out)
|
||
|
|
||
|
print "Content-type: %s\r\n\r\n%s" % (req.content_type, result)
|