• Sale items. Buy now - stock going fast. Specials
  • You must now select Courier Delivery if you wish to receive items before Christmas.
 

RicheeBRONZE Member
HOP librarian
1,841 posts
Location: Prague, Czech. Republic


Posted:
Offline, shell scrypt recoder for old HOP threads.

--------------------------------------------------

Code:
#!/bin/sh
#HOP Old Thread Recoder
#

#URL
sed -i s/\sed -i s/\sed -i s/\<\\/a\>/[\\/url]/ $1
sed -i s/\<\\/a\>/[\\/url]/ $1
sed -i s/\"\ target=\"_blank\"\ rel=\"nofollow\"\>/]/ $1
sed -i s/\"\ target=\"_blank\"\ rel=\"nofollow\"\>/]/ $1

#QUOTE
sed -i s/\<\\/font\>\\\ \;Written\ by:\<\\/span\ class=\"endsmall\"\>/[quote]/ $1
sed -i s/\<\\/font\>\\\ \;Written\ by:\<\\/span\ class=\"endsmall\"\>/[quote]/ $1
sed -i s/\<\\/blockquote\>\/[\\/quote]/ $1
sed -i s/\<\\/blockquote\>\/[\\/quote]/ $1

#IMG
sed -i s/\/[\\/img]/ $1
sed -i s/\"\>/[\\/img]/ $1

#REWRITE
sed -i s/\?Cat=0\&\;Board=UBB3\&\;Number=/\\/Cat\\/0\\/Number\\// $1
sed -i s/\?Cat=0\&\;Board=UBB3\&\;Number=/\\/Cat\\/0\\/Number\\// $1

exit 0


--------------------------------

The code is too fast so it need to be done twice,
because sed like to forget something..

until tis get fixed,

:R

hug

POI THEO(R)IST


pineapple peteSILVER Member
water based
5,125 posts
Location: melbourne, Australia


Posted:
uhm, is there are more plain-language description available?

thanks again richee

hug

"you know there are no trophys for doing silly things in real life yeah pete?" said ant "you wont get a 'listened to ride of the valkyries all the way to vietnam' trophy"

*proud owner of the very cute fire_spinning_angel, birgit and neon shaolin*


astonSILVER Member
Unofficial Chairperson of Squirrel Defense League
4,061 posts
Location: South Africa


Posted:
If I am understanding it correctly:

If you stumble across an old link, you can use the Perl code above to convert it into the new format.

For Windows users you probably need something like CygWin. Logging in via something like PuTTY to a *nix box may allow you to do the same.

Most Linux distros allow you to open a terminal which will allow you to do this quite easily.

I do not know anything about Macs.

Exactly how to use it, I am not sure either though, sorry.

'We're all mad here. I'm mad, you're mad." [said the Cat.]
"How do you know I'm mad?" said Alice.
"You must be," said the Cat, "Or you wouldn't have come here."
- Lewis Carroll, Alice's Adventures In Wonderland


pineapple peteSILVER Member
water based
5,125 posts
Location: melbourne, Australia


Posted:
ah yes, i see..

i also understand why i didnt understand.. and now know why im continuing to not understand..

maybe i should learn perl smile

hug

"you know there are no trophys for doing silly things in real life yeah pete?" said ant "you wont get a 'listened to ride of the valkyries all the way to vietnam' trophy"

*proud owner of the very cute fire_spinning_angel, birgit and neon shaolin*


ElectricBlueGOLD Member
Now with extra strawberries
810 posts
Location: Canberra, Australia


Posted:
Ooo i like it!!
THough i haven't run across many old links.

I {Heart} hand me downs and spinning in the snow.<br /><br />


RicheeBRONZE Member
HOP librarian
1,841 posts
Location: Prague, Czech. Republic


Posted:
When editing a thread with an old index (before site upgrade).

The old UBB code change into HTML hard code
instead of new UBB code.

This scrypt has as an input a file that include source of that
code and perform an 'inline substitution' into new UBB code
and repair one URL form change too.

--------------------------

This will be fixed on server side, erhmm..

nothing,

:R

hug
EDITED_BY: Richee (1228325407)

POI THEO(R)IST



Similar Topics

Using the keywords [old recoder] we found the following existing topics.

  1. Forums > HOP Old Thread Recoder [5 replies]

      Show more..

HOP Newsletter

Subscribe now for updates on sales, new arrivals, and exclusive offers!