I said I'm sorry. I've made mistakes, but fear was never one of them.

Lilah ,'Conviction (1)'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


John H - Mar 05, 2003 5:22:24 pm PST #3382 of 10000

Or, of course, he said coming back from the coffee machine, a regex for "any phrase over 50 chars not containing whitespace gets a linebreak at char 51" would be easy.


DXMachina - Mar 05, 2003 5:25:27 pm PST #3383 of 10000
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

I was hoping you'd say something like that.

Right now I'm just doing it in a browser window. I set my preferences to download, say, a thousand posts at a time, then if my horizontal scroll bar appears, I search through that batch of posts in smaller chunks until I find the offending hyphenations. What I need to know is not only what long hyphenations there are, but also what post they're in so I can edit them.


DXMachina - Mar 05, 2003 5:27:31 pm PST #3384 of 10000
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

Or, of course, he said coming back from the coffee machine, a regex for "any phrase over 50 chars not containing whitespace gets a linebreak at char 51" would be easy.

Yeah, it's not always hyphenations, sometimes youjustgetwordsstrungtogetheryouknow?

I have Perl, not sure what other programs I have that would be suitable.

edit: And editing by hand is fine, because there aren't that many instances (15-20), and that way you can place the break where it makes sense.


John H - Mar 05, 2003 5:33:26 pm PST #3385 of 10000

I have Perl, not sure what other programs I have that would be suitable.

Obviously Perl would do it, but Homesite and Dreamweaver have regex support. Then there are things like Ultra-edit and whatever.

With Perl you can do it with a quick oneliner, using the -i flag.

Let me play just a little...


DXMachina - Mar 05, 2003 5:39:34 pm PST #3386 of 10000
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

I have Homesite 4.5.


John H - Mar 05, 2003 6:01:41 pm PST #3387 of 10000

I'll trying and find my copy of homesite and see what the syntax is.

But, here's something you could try. From the commandline, doing this:

perl -p -i.bak -e 's/(\\S{50})/$1n/' longstrings.txt

will put a linebreak after the fiftieth character of any line of longstrings.txt which contains fifty non-whitespace characters without a break.

Of course it won't wrap it neatly at the nearest hyphen, and it doesn't fix lines with more than 100 chars in a row, (run it twice!) but it's better than nothing.

Oh and it makes a backup file of course, called longstrings.txt.bak -- Perl, is there anything it can't do?


John H - Mar 05, 2003 6:41:28 pm PST #3388 of 10000

The code for "a pattern of fifty non-spaces in a row" in Homesite is the very beautiful:

([^[:space:]]{50})

so if you choose "extended Replace", check the Regular Expressions box then replace the above code with

\\1

followed by a return, that will hard-wrap, in a rather brutal way, all 50-character strings, putting a line break after char 50.


DXMachina - Mar 05, 2003 6:45:13 pm PST #3389 of 10000
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

I'll give it a try.


Java cat - Mar 05, 2003 7:42:08 pm PST #3390 of 10000
Not javachik

Hi, there's a wonderful new article by Gothic Miss Manners (posted in Press today) about etiquette on boards, and newbies and old-bies, and I thought it might make a good addition or link to the Buffista main FAQ. FYI.


brenda m - Mar 05, 2003 7:52:21 pm PST #3391 of 10000
If you're going through hell/keep on going/don't slow down/keep your fear from showing/you might be gone/'fore the devil even knows you're there

DX and John, how much do I love that you guys are out here thinking of us and trying to fix problems that would never occur to me in advance. Lots, that's how much.