[bookshare-discuss] Re: quick fix

  • From: "Jake Brownell" <jabrown@xxxxxxxxx>
  • To: <bookshare-discuss@xxxxxxxxxxxxx>
  • Date: Mon, 31 Jul 2006 11:06:20 -0500

Evan,

You're not using a word processor. You're viewing synopses on the web, and therefore they need to be formatted as HTML. Unfortunately introducing formatting elements into plain text is not the easiest thing to do. Granted I employ an algorithm that works on my website. I'll describe a bit of it now.

Keep in mind that a paragraph tag, p, separates items visually on the screen, whereas a br tag simply forces text to the next line. For these reasons I assume one return character is a br tag and two returns indicate a p tag.

Throw away any return characters at the beginning or end of the text.

So, essentially, open the paragraph tag, start processing when a double return is found close the current p tag and open another. At the end close the open p tag.
Now, go through and look for single returns and replace them with a br tag.
Finally, if you want the code to be readable, wherever there is a br tag insert a single return and wherever there is a p tag insert a double return. These returns are ignored by a browser but help the human reader.


Later,
Jake
----- Original Message ----- From: "Evan Reese" <mentat1@xxxxxxxxxxxxxx>
To: <bookshare-discuss@xxxxxxxxxxxxx>
Sent: Monday, July 31, 2006 1:40 AM
Subject: [bookshare-discuss] Re: quick fix



It looks sloppy, but why should people be expected to know that they have to put in two returns instead of one? Why doesn't it just take a new line like any word processor does when it sees a return?

----- Original Message ----- From: "Jake Brownell" <jabrown@xxxxxxxxx>
To: <bookshare-discuss@xxxxxxxxxxxxx>
Sent: Sunday, July 30, 2006 5:43 PM
Subject: [bookshare-discuss] Re: quick fix



Rita and Julie,

When you see words run together in a synopsis, it often is not the fault of the volunteer. If a person writes in the synopsis a few words followed by a return, but fails to put a second return, the text is run together by the BookShare processing tools.

I agree it does indeed look sloppy.

Jake
----- Original Message ----- From: "rita weyler" <ritaweyler@xxxxxxxxxxx>
To: <bookshare-discuss@xxxxxxxxxxxxx>
Sent: Monday, July 31, 2006 6:12 PM
Subject: [bookshare-discuss] Re: quick fix



tht is the first one I have encountered. I agree. It is sloppy.
Rita
----- Original Message ----- From: "Julie Morales" <mercy421@xxxxxxxxx>
To: <bookshare-discuss@xxxxxxxxxxxxx>
Sent: Sunday, July 30, 2006 4:24 PM
Subject: [bookshare-discuss] Re: quick fix



Hi, Rita. There are many synopses like that one, actually. It is kind of
sloppy, isn't it? <smile> Take care.
--
Julie Morales
Email & Windows/MSN Messenger: mercy421@xxxxxxxxxxx
Skype: mercy0421 Please contact me if I may not recognize your contact info
before adding me or I may not add you!
Currently in Winchester Regional, Virginia Partly Cloudy, Thunder In The
Vicinity; Lightning Observed 93F°(34C°) Wind:W (270°) at 14mph (12KT)
Hard work has a future payoff. Laziness pays off now.
Created by WeatherSig v1.10 . http://www.weathersig.com


----- Original Message ----- From: "rita weyler" <ritaweyler@xxxxxxxxxxx>
To: <bookshare-discuss@xxxxxxxxxxxxx>
Sent: Monday, July 31, 2006 1:06 PM
Subject: [bookshare-discuss] quick fix



Hello,
I am not sure who I should direct this comment to.
I was looking at the longer synopsis for "The walking Drum" by Louise
L'amour. There are several words that need spaces between them. It's no
big deal but it is disconcerting if you are listening to it.
Sory if I sound picky but I thought someone should know.
Rita and Camille



To unsubscribe from this list, send a blank Email to
bookshare-discuss-request@xxxxxxxxxxxxx
Put the word 'unsubscribe' by itself in the Subject line. To get a list of available commands, put the word 'help' by itself in the subject line.



To unsubscribe from this list, send a blank Email to bookshare-discuss-request@xxxxxxxxxxxxx
Put the word 'unsubscribe' by itself in the Subject line. To get a list of available commands, put the word 'help' by itself in the subject line.




--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 7/28/2006



To unsubscribe from this list, send a blank Email to bookshare-discuss-request@xxxxxxxxxxxxx
Put the word 'unsubscribe' by itself in the Subject line. To get a list of available commands, put the word 'help' by itself in the subject line.




To unsubscribe from this list, send a blank Email to bookshare-discuss-request@xxxxxxxxxxxxx
Put the word 'unsubscribe' by itself in the Subject line. To get a list of available commands, put the word 'help' by itself in the subject line.




--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 7/28/2006



To unsubscribe from this list, send a blank Email to bookshare-discuss-request@xxxxxxxxxxxxx
Put the word 'unsubscribe' by itself in the Subject line. To get a list of available commands, put the word 'help' by itself in the subject line.


Other related posts: