summaryrefslogtreecommitdiff
path: root/doc/pjsip-book/fetch_trac.py
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2014-02-24 11:00:15 +0000
committerBenny Prijono <bennylp@teluu.com>2014-02-24 11:00:15 +0000
commit8f19143beedb27b5699c3e4fd07ffdc646cdf1a5 (patch)
tree8c1d16986418ec52e784e92782cf8c99c0231131 /doc/pjsip-book/fetch_trac.py
parente36b19cb22fb5b57e7c584defb33c3f5c258ea3c (diff)
More re #1715: doxygen integration into the book
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4762 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'doc/pjsip-book/fetch_trac.py')
-rw-r--r--doc/pjsip-book/fetch_trac.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/pjsip-book/fetch_trac.py b/doc/pjsip-book/fetch_trac.py
index 3c754624..94e59110 100644
--- a/doc/pjsip-book/fetch_trac.py
+++ b/doc/pjsip-book/fetch_trac.py
@@ -1,12 +1,16 @@
import urllib2
import sys
+import unicodedata
def fetch_rst(url):
print 'Fetching %s..' % url
req = urllib2.Request(url)
fd = urllib2.urlopen(req, timeout=30)
- body = fd.read()
+ body = fd.read()
+ body = body.replace("\r\n", "\n")
+
+ body = body.decode('utf8', 'ignore').encode('ascii', 'ignore')
pos = body.find("{{{")
if pos >= 0:
@@ -78,8 +82,10 @@ if __name__ == '__main__':
pages = process_index('index')
for page in pages:
+ #if not 'endpoint' in page:
+ # continue
url = url_format % (page)
fetch_rst(url)
print 'Done.'
- \ No newline at end of file
+