POV-Ray : Newsgroups : povray.general : OT: Advanced search and replace? Server Time
8 Aug 2024 18:20:22 EDT (-0400)
  OT: Advanced search and replace? (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Rune
Subject: OT: Advanced search and replace?
Date: 3 Jan 2001 15:10:58
Message: <3a538752@news.povray.org>
This post is a bit off-topic, but I hope it's ok.

I want to redesign my website and it most of the work can basically be done
by replacing chunks of HTML with other chunks of HTML.

Some text editors support multiple-file search and replace. This function
could almost, but not quite, do what I need. One of the problems is that the
chunks of code I need to search and replace are dozens of lines long, which
is usually not supported by text-editors.

I heard some time ago a discussion on this news-server about scripts which
could do those things that I need. IIRC for Windows vb-script was mentioned.
But I don't know anything about vb-script. How (and where) can I learn to
use vb-script or similar for the things I need? I need some very basic
tutorials or something...

BTW, the website I am to redesign is mostly about POV-Ray; I hope that
slightly justifies the OT post... :)

Thanks in advance,

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Chris Colefax
Subject: Re: Advanced search and replace?
Date: 3 Jan 2001 17:44:01
Message: <3a53ab31@news.povray.org>
Rune <run### [at] inamecom> wrote:
> This post is a bit off-topic, but I hope it's ok.
>
> I want to redesign my website and it most of the work can basically be
done
> by replacing chunks of HTML with other chunks of HTML.
>
> Some text editors support multiple-file search and replace. This function
> could almost, but not quite, do what I need. One of the problems is that
the
> chunks of code I need to search and replace are dozens of lines long,
which
> is usually not supported by text-editors.
>
> I heard some time ago a discussion on this news-server about scripts which
> could do those things that I need. IIRC for Windows vb-script was
mentioned.
> But I don't know anything about vb-script. How (and where) can I learn to
> use vb-script or similar for the things I need? I need some very basic
> tutorials or something...
>
> BTW, the website I am to redesign is mostly about POV-Ray; I hope that
> slightly justifies the OT post... :)

You can download VB script documentation from Microsoft, and if you have
installed Microsoft Office 2000 you should get the Microsoft Script Editor
installed in something like:

   C:\Program Files\Microsoft Visual Studio\Common\Ide\Ide98

which includes references for VBScript, JScript, DHTML, ASP, etc.  More
importantly, you can indeed use a small VBScript from the command line to
perform search-and-replaces on multiple files.  If you like, I can email you
the script I use myself for this...


Post a reply to this message

From: Margus Ramst
Subject: Re: OT: Advanced search and replace?
Date: 3 Jan 2001 21:45:55
Message: <3A53E40A.84DE4C76@peak.edu.ee>
Rune wrote:
> 
> I want to redesign my website and it most of the work can basically be done
> by replacing chunks of HTML with other chunks of HTML.
> 

Try NoteTab (http://www.notetab.com)
The "Light" version is freeware, I used it quite a lot when creating my pages.
It can do fairly powerful regular expression searches, and I had no problems
replacing large chunks of code with it (generally around 5-6 lines).
Unfortunately searching in multiple files works for a limited trial period only
(IIRC 30 days), after that you'd have to get the $9.95 "Standard" version.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Home page http://www.hot.ee/margusrt


Post a reply to this message

From: Gilles Tran
Subject: Re: OT: Advanced search and replace?
Date: 4 Jan 2001 05:40:03
Message: <3A5453A1.A7ECF5AE@inapg.inra.fr>
Rune wrote:

> Some text editors support multiple-file search and replace. This function
> could almost, but not quite, do what I need. One of the problems is that the
> chunks of code I need to search and replace are dozens of lines long, which
> is usually not supported by text-editors.

Perhaps Arachnophilia supports this (no personal experience).
http://www.arachnoid.com/arachnophilia/index.html

G.
--

**********************
http://www.oyonale.com
**********************
Graphic experiments
Pov-ray gallery


Post a reply to this message

From: Tom Melly
Subject: Re: Advanced search and replace?
Date: 4 Jan 2001 06:19:04
Message: <3a545c28@news.povray.org>
"Rune" <run### [at] inamecom> wrote in message
news:3a538752@news.povray.org...

<SNIP>

Dunno about vb-script - why not give PERL a try? Okay, a bit of a learning
curve (although I'm sure you would find help very forthcoming), but at the
end you've learnt a nice, multi-purpose, portable lang.


Post a reply to this message

From: Rune
Subject: Re: Advanced search and replace?
Date: 4 Jan 2001 10:31:07
Message: <3a54973b@news.povray.org>
"Tom Melly" wrote:
> Dunno about vb-script - why not give PERL a try? Okay, a bit
> of a learning curve (although I'm sure you would find help
> very forthcoming), but at the end you've learnt a nice,
> multi-purpose, portable lang.

I think I once decided with myself that if I were ever to learn a real
programming language I'd start with Pascal or Delphi or what it's called...

Why do you think PERL would be the best choice?

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Rune
Subject: Re: Advanced search and replace?
Date: 4 Jan 2001 10:31:09
Message: <3a54973d@news.povray.org>
"Chris Colefax" wrote:
>
> You can download VB script documentation from Microsoft

Do you have a direct link? :)

> if you have installed Microsoft Office 2000

I don't.

> More importantly, you can indeed use a small VBScript from the
> command line to perform search-and-replaces on multiple files.
> If you like, I can email you the script I use myself for this...

Thanks, please do! :)

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Rune
Subject: Re: OT: Advanced search and replace?
Date: 4 Jan 2001 10:31:10
Message: <3a54973e@news.povray.org>
"Margus Ramst" wrote:
> Try NoteTab (http://www.notetab.com)

Thanks, I'll check it out.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Rune
Subject: Re: OT: Advanced search and replace?
Date: 4 Jan 2001 10:31:11
Message: <3a54973f@news.povray.org>
"Gilles Tran" wrote:
> Perhaps Arachnophilia supports this (no personal experience).
> http://www.arachnoid.com/arachnophilia/index.html

Thanks, I'll have a look.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Ron Parker
Subject: Re: Advanced search and replace?
Date: 4 Jan 2001 10:55:37
Message: <slrn95977q.c04.ron.parker@fwi.com>
On Thu, 4 Jan 2001 15:20:10 +0100, Rune wrote:
>"Tom Melly" wrote:
>> Dunno about vb-script - why not give PERL a try? Okay, a bit
>> of a learning curve (although I'm sure you would find help
>> very forthcoming), but at the end you've learnt a nice,
>> multi-purpose, portable lang.
>
>I think I once decided with myself that if I were ever to learn a real
>programming language I'd start with Pascal or Delphi or what it's called...
>
>Why do you think PERL would be the best choice?

Despite the fact that it's an acronym, it's actually spelt either Perl or 
perl.

It's a good choice because it is designed precisely for extracting and 
formatting text and has many powerful features aimed at just that purpose.
In fact, the name itself stands for "practical extraction and reporting 
language" (not "pathologically eclectic rubbish lister" as some would
claim.)

For the same reasons, Delphi would be a poor choice.  Pascal is a notoriously
weak language for doing real work, and it has abysmal support for string
manipulation.  Even C is better, and C's string support sucks too.

Somewhere around here I even have the global search-and-replace script
that you need, believe it or not.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.