wepub

Check-in [959a164154]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Flatten extended code points. TBD if we should lean on UTF8.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:959a164154a6660a3183431ac8cda330ffe4830dac193437c6f2da4059f329ff
User & Date: ajv-899-334-8894@vsta.org 2016-11-24 17:12:03
Context
2017-04-06
04:01
Tap to adjust font size. check-in: 3f780220b4 user: ajv-899-334-8894@vsta.org tags: master, trunk
2016-11-24
17:12
Flatten extended code points. TBD if we should lean on UTF8. check-in: 959a164154 user: ajv-899-334-8894@vsta.org tags: master, trunk
2016-11-21
22:04
Software (un)license and basic README check-in: 23cd3446c1 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to get.py.

6
7
8
9
10
11
12

13
14
15
16
17
18
19
...
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#  /
#	Main UI.  Top part is playlist, bottom is file/dir browser
#  /media/<prefix>/...
#	For each prefix of files, its contents is served by
#	way of its path under here.
import os, time, stat, urllib, json
import epub


# How many of their most recent books to offer
NRECENT = 4

# The GET part of our handling
class GET_mixin(object):

................................................................................
            buf = self.build_header(head)
            buf += '<script src="/js/reader.js"></script>\n'
            if chapnum > 0:
                buf += '<a href="%d">Previous Chapter</a>\n' % \
                 (chapnum-1,)
            buf += '<div id="textview"\n'
            buf += '  style="color: white; background: black; width: 100%;">\n'
            buf += chap.read()
            buf += '</div>\n'
            if chapnum < len(book.chapters)-1:
                buf += '<a href="%d">Next Chapter</a>\n' % \
                 (chapnum+1,)
            doc.close()
            buf += '<script>reading("%s", "%s", "%s");</script>\n' % \
                (self.user, docpath, "textview")







>







 







|







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#  /
#	Main UI.  Top part is playlist, bottom is file/dir browser
#  /media/<prefix>/...
#	For each prefix of files, its contents is served by
#	way of its path under here.
import os, time, stat, urllib, json
import epub
import chore

# How many of their most recent books to offer
NRECENT = 4

# The GET part of our handling
class GET_mixin(object):

................................................................................
            buf = self.build_header(head)
            buf += '<script src="/js/reader.js"></script>\n'
            if chapnum > 0:
                buf += '<a href="%d">Previous Chapter</a>\n' % \
                 (chapnum-1,)
            buf += '<div id="textview"\n'
            buf += '  style="color: white; background: black; width: 100%;">\n'
            buf += chore.utils.uncharenc(chap.read())
            buf += '</div>\n'
            if chapnum < len(book.chapters)-1:
                buf += '<a href="%d">Next Chapter</a>\n' % \
                 (chapnum+1,)
            doc.close()
            buf += '<script>reading("%s", "%s", "%s");</script>\n' % \
                (self.user, docpath, "textview")