What's Wrong With This HTML Code?

Give us a seminar, lecture or lesson on what your 'thing' is. Now with our exclusive ASK-A-NERD!!!
Post Reply
User avatar
Gawdzilla Sama
Stabsobermaschinist
Posts: 151265
Joined: Thu Feb 26, 2009 12:24 am
About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
Contact:

Re: What's Wrong With This HTML Code?

Post by Gawdzilla Sama » Sun Jan 20, 2013 6:14 pm

klr wrote:
Gawdzilla Sama wrote:
klr wrote:Also, while having spaces in file names is not forbidden, it sure makes for unreadable HTML, with all those "%20" sequences in tags.
Yeah, but I've learned to filter that out.
I just prefer file names with no spaces, end of. They can still bugger up all manner of programs and commands unless you make special provision for them.
I've got 160 gig of files like that to live with. :sigh:
Image
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”

User avatar
klr
(%gibber(who=klr, what=Leprageek);)
Posts: 32964
Joined: Wed Mar 04, 2009 1:25 pm
About me: The money was just resting in my account.
Location: Airstrip Two
Contact:

Re: What's Wrong With This HTML Code?

Post by klr » Sun Jan 20, 2013 6:15 pm

Gawdzilla Sama wrote:
klr wrote:
Gawdzilla Sama wrote:
klr wrote:Also, while having spaces in file names is not forbidden, it sure makes for unreadable HTML, with all those "%20" sequences in tags.
Yeah, but I've learned to filter that out.
I just prefer file names with no spaces, end of. They can still bugger up all manner of programs and commands unless you make special provision for them.
I've got 160 gig of files like that to live with. :sigh:
There are ways and means of fixing all of that in one fell swoop ...
God has no place within these walls, just like facts have no place within organized religion. - Superintendent Chalmers

It's not up to us to choose which laws we want to obey. If it were, I'd kill everyone who looked at me cock-eyed! - Rex Banner

The Bluebird of Happiness long absent from his life, Ned is visited by the Chicken of Depression. - Gary Larson

:mob: :comp: :mob:

User avatar
Gawdzilla Sama
Stabsobermaschinist
Posts: 151265
Joined: Thu Feb 26, 2009 12:24 am
About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
Contact:

Re: What's Wrong With This HTML Code?

Post by Gawdzilla Sama » Sun Jan 20, 2013 6:16 pm

Dafuq?
Image
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”

User avatar
klr
(%gibber(who=klr, what=Leprageek);)
Posts: 32964
Joined: Wed Mar 04, 2009 1:25 pm
About me: The money was just resting in my account.
Location: Airstrip Two
Contact:

Re: What's Wrong With This HTML Code?

Post by klr » Sun Jan 20, 2013 6:20 pm

Gawdzilla Sama wrote:Dafuq?
You want to alter file and/or folder names every in a folder tree according to certain rules? As in "replace every space with a _ symbol".
God has no place within these walls, just like facts have no place within organized religion. - Superintendent Chalmers

It's not up to us to choose which laws we want to obey. If it were, I'd kill everyone who looked at me cock-eyed! - Rex Banner

The Bluebird of Happiness long absent from his life, Ned is visited by the Chicken of Depression. - Gary Larson

:mob: :comp: :mob:

User avatar
Gawdzilla Sama
Stabsobermaschinist
Posts: 151265
Joined: Thu Feb 26, 2009 12:24 am
About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
Contact:

Re: What's Wrong With This HTML Code?

Post by Gawdzilla Sama » Sun Jan 20, 2013 6:26 pm

klr wrote:
Gawdzilla Sama wrote:Dafuq?
You want to alter file and/or folder names every in a folder tree according to certain rules? As in "replace every space with a _ symbol".
That fixes links as well?
Image
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”

User avatar
klr
(%gibber(who=klr, what=Leprageek);)
Posts: 32964
Joined: Wed Mar 04, 2009 1:25 pm
About me: The money was just resting in my account.
Location: Airstrip Two
Contact:

Re: What's Wrong With This HTML Code?

Post by klr » Sun Jan 20, 2013 6:42 pm

Gawdzilla Sama wrote:
klr wrote:
Gawdzilla Sama wrote:Dafuq?
You want to alter file and/or folder names every in a folder tree according to certain rules? As in "replace every space with a _ symbol".
That fixes links as well?
Good, you spotted that. :hehe:

No, you'd have to do that separately. But there are ways and means of doing that as well. In fact, the two might overlap to an extent, if you were to do both tasks by scripts.

Or maybe not: Bulk Rename Utility - http://www.bulkrenameutility.co.uk - will probably do for the file/folder name changes, although it has a baffling intimidating interface with a million options. I'm sure there must be easier (free) products available. There are utilities for bulk automated updating of text file contents as well. I just haven't had to use any of those in a while, so I'm a bit out of touch in terms of what's available.
God has no place within these walls, just like facts have no place within organized religion. - Superintendent Chalmers

It's not up to us to choose which laws we want to obey. If it were, I'd kill everyone who looked at me cock-eyed! - Rex Banner

The Bluebird of Happiness long absent from his life, Ned is visited by the Chicken of Depression. - Gary Larson

:mob: :comp: :mob:

User avatar
Gawdzilla Sama
Stabsobermaschinist
Posts: 151265
Joined: Thu Feb 26, 2009 12:24 am
About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
Contact:

Re: What's Wrong With This HTML Code?

Post by Gawdzilla Sama » Sun Jan 20, 2013 6:44 pm

If it ain't broke, don't fix it. I'll need to have pressing reasons to change a few million links.
Image
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”

User avatar
klr
(%gibber(who=klr, what=Leprageek);)
Posts: 32964
Joined: Wed Mar 04, 2009 1:25 pm
About me: The money was just resting in my account.
Location: Airstrip Two
Contact:

Re: What's Wrong With This HTML Code?

Post by klr » Sun Jan 20, 2013 6:56 pm

Métamorphose seems a better option for bulk file renaming - much more user friendly:

http://file-folder-ren.sourceforge.net/ - on the download page, choose the beta version

I'm going to be experimenting with this myself, and likewise with any utility for bulk-updating links that I find.
Gawdzilla Sama wrote:If it ain't broke, don't fix it. I'll need to have pressing reasons to change a few million links.
Fair enough, but spaces and other quirks continue to cause me enough problems that I'm always finding reasons to rename files.
God has no place within these walls, just like facts have no place within organized religion. - Superintendent Chalmers

It's not up to us to choose which laws we want to obey. If it were, I'd kill everyone who looked at me cock-eyed! - Rex Banner

The Bluebird of Happiness long absent from his life, Ned is visited by the Chicken of Depression. - Gary Larson

:mob: :comp: :mob:

User avatar
Jason
Destroyer of words
Posts: 17782
Joined: Sat Apr 16, 2011 12:46 pm
Contact:

Re: What's Wrong With This HTML Code?

Post by Jason » Sun Jan 20, 2013 7:02 pm

Gawdzilla Sama wrote:If it ain't broke, don't fix it. I'll need to have pressing reasons to change a few million links.
From the Linux CLI you could do all that with piping and a few commands, but I'm still too stoned from last night to put it together right now. :yawn:

User avatar
Gawdzilla Sama
Stabsobermaschinist
Posts: 151265
Joined: Thu Feb 26, 2009 12:24 am
About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
Contact:

Re: What's Wrong With This HTML Code?

Post by Gawdzilla Sama » Sun Jan 20, 2013 7:03 pm

klr wrote:Métamorphose seems a better option for bulk file renaming - much more user friendly:

http://file-folder-ren.sourceforge.net/ - on the download page, choose the beta version

I'm going to be experimenting with this myself, and likewise with any utility for bulk-updating links that I find.
Gawdzilla Sama wrote:If it ain't broke, don't fix it. I'll need to have pressing reasons to change a few million links.
Fair enough, but spaces and other quirks continue to cause me enough problems that I'm always finding reasons to rename files.
You've been into Hyperwar, would you try it?

BTW, I will avoid spaces in filenames in the future, I do listen when it's absolutely unavoidable.
Image
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”

User avatar
klr
(%gibber(who=klr, what=Leprageek);)
Posts: 32964
Joined: Wed Mar 04, 2009 1:25 pm
About me: The money was just resting in my account.
Location: Airstrip Two
Contact:

Re: What's Wrong With This HTML Code?

Post by klr » Sun Jan 20, 2013 7:09 pm

I've not been in there yet - still waiting for a reply to my email.

But I'll run some local tests to see if this is at least feasible, and report back here. A little program called TextCrawler (search and Ye shall find) can handle batch-updating file contents.

A better solution (from my perspective) might be to write a script that first searched all HTML files for spaces in link or embedded file names, and then updated each offending file name and HTML link at the same time. I might also look into that.
God has no place within these walls, just like facts have no place within organized religion. - Superintendent Chalmers

It's not up to us to choose which laws we want to obey. If it were, I'd kill everyone who looked at me cock-eyed! - Rex Banner

The Bluebird of Happiness long absent from his life, Ned is visited by the Chicken of Depression. - Gary Larson

:mob: :comp: :mob:

User avatar
Gawdzilla Sama
Stabsobermaschinist
Posts: 151265
Joined: Thu Feb 26, 2009 12:24 am
About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
Contact:

Re: What's Wrong With This HTML Code?

Post by Gawdzilla Sama » Sun Jan 20, 2013 7:11 pm

klr wrote:I've not been in there yet - still waiting for a reply to my email.

But I'll run some local tests to see if this is at least feasible, and report back here. A little program called TextCrawler (search and Ye shall find) can handle batch-updating file contents.

A better solution (from my perspective) might be to write a script that first searched all HTML files for spaces in link or embedded file names, and then updated each offending file name and HTML link at the same time. I might also look into that.
Let me know when you get your account and I'll let them know to give you the keys.
Image
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”

User avatar
Pappa
Non-Practicing Anarchist
Non-Practicing Anarchist
Posts: 56488
Joined: Wed Feb 18, 2009 10:42 am
About me: I am sacrificing a turnip as I type.
Location: Le sud du Pays de Galles.
Contact:

Re: What's Wrong With This HTML Code?

Post by Pappa » Mon Jan 21, 2013 12:53 pm

Unless you're planning on setting up MOD REWRITE rules to match the rename, you should never rename files that are already published online. Any incoming links to those files from places not under your control will suddenly result in 404s.

User avatar
Gawdzilla Sama
Stabsobermaschinist
Posts: 151265
Joined: Thu Feb 26, 2009 12:24 am
About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
Contact:

Re: What's Wrong With This HTML Code?

Post by Gawdzilla Sama » Mon Jan 21, 2013 12:55 pm

Pappa wrote:Unless you're planning on setting up MOD REWRITE rules to match the rename, you should never rename files that are already published online. Any incoming links to those files from places not under your control will suddenly result in 404s.
That's my thought as well. We have literally millions of links to Hyperwar out there, including those created by military academies all over the planet. Dicking with that would be very bad, I think.

On the other hand, being credited with starting WWIII would be ossum. :{D
Image
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”

User avatar
pErvinalia
On the good stuff
Posts: 60700
Joined: Tue Feb 23, 2010 11:08 pm
About me: Spelling 'were' 'where'
Location: dystopia
Contact:

Re: What's Wrong With This HTML Code?

Post by pErvinalia » Mon Jan 21, 2013 1:06 pm

i'll write you a script, but I want cash for it.
Sent from my penis using wankertalk.
"The Western world is fucking awesome because of mostly white men" - DaveDodo007.
"Socialized medicine is just exactly as morally defensible as gassing and cooking Jews" - Seth. Yes, he really did say that..
"Seth you are a boon to this community" - Cunt.
"I am seriously thinking of going on a spree killing" - Svartalf.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest