
On Feb 19, 2011, at 5:58 PM, Bowerbird@aol.com wrote:
How about real em-dashes instead of double-hyphens?
h=replaceall(h,"--",chr(209))
How about curly quotes?
h=replaceall(h," "+chr(34)," "+chr(210)) h=replaceall(h,chr(10)+chr(34),chr(10)+chr(210))
h=replaceall(h,chr(34)+" ",chr(211)+" ") h=replaceall(h,chr(34)+chr(10),chr(210)+chr(10))
Is there really a need to do all that? Not complaining, only wondering myself. Screen readers don't generally take well to upper ascii characters. Sure, they'll (generally) tell what the characters are, but often times, it changes the pronounciation of the word, because it tries to incorporate the symbol into the word it's surrounding. Honestly, double hyphens are fine with me :) (and, for some reason, the rss specifications forbid such characters), though I'm not sure why that is, perhaps for widest compatibility with all rss readers, including those that can display text only.
It doesn't help me much that I've found some text when I still have to read through the whole chapter to actually find the passage I'm looking for.
i would say you seem to have forgotten the fact that you can just use the search function in your browser.
the app finds a page which contains the search-term, and the browser tells you where on the page it exists. it is a bit clumsy, but not as bad as you made it sound.
Yeah, but it's not difficult to spit out a modified page containing the link to the searched for text if it comes to that, (which, you did say on the next line, so ...)
p.p.s. here is the current text-to-html conversion routine...
h=session.gc(x) h=replacelineendings(h,chr(10)) h=trim(h) h="<h2>"+h h=replaceall(h,chr(10)+" ",chr(10)+"<br /> ") h=replaceall(h,chr(10)+chr(10),chr(10)+"</p><p>"+chr(10)) h=replace(h,chr(10)+"</p><p>"+chr(10),"</h2>"+chr(10)+"<p><br />") h=replaceall(h,"</p><p><br />","<br />") h=replaceall(h,chr(10)+" ",chr(10)+"________________") h=replaceall(h,chr(10)+" ",chr(10)+"_______________") h=replaceall(h,chr(10)+" ",chr(10)+"______________") h=replaceall(h,chr(10)+" ",chr(10)+"_____________") h=replaceall(h,chr(10)+" ",chr(10)+"____________") h=replaceall(h,chr(10)+" ",chr(10)+"___________") h=replaceall(h,chr(10)+" ",chr(10)+"__________") h=replaceall(h,chr(10)+" ",chr(10)+"_________") h=replaceall(h,chr(10)+" ",chr(10)+"________") h=replaceall(h,chr(10)+" ",chr(10)+"_______") h=replaceall(h,chr(10)+" ",chr(10)+"______") h=replaceall(h,chr(10)+" ",chr(10)+"_____") h=replaceall(h,chr(10)+" ",chr(10)+"____") h=replaceall(h,chr(10)+" ",chr(10)+"___") h=replaceall(h,chr(10)+" ",chr(10)+"__") h=topmatter.text+h+chr(10)+chr(10)+"</p></body></html>" _______________________________________________
Which a simple nl2br would solve nicely if this were php. :) Again, not finding fault, simply pointing out another method. I've never tackled something of this complexity, but perhaps a second app written in php would be a good way to compare and contrast different ways of doing things. Of course, it could wind up being an exercise in futility, but heck, I'm always willing to help, and php is what I know, so ...