Best way to change styles en masse?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Best way to change styles en masse?

Post by ccardimon »

I have several folder with topics containing H1 headings.

I need to change these to H2, but I don't want to change each heading individually.

Is there a way to do all H1 headings at once, kind of like search-and-replace?
Craig

Lost in Disturbia
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Best way to change styles en masse?

Post by Nita Beck »

The fastest way I've done this is using something other than Flare with which you can craft regular expressions. My favorite tool is FAR HTML. I can make changes throughout an entire project, or folder by folder.

Before doing any kind of sweeping code change like this, make a FULL BACKUP of your Flare project. It is VERY easy to seriously muck up code.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Best way to change styles en masse?

Post by ccardimon »

Thanks, Nita!
Craig

Lost in Disturbia
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Best way to change styles en masse?

Post by dorcutt »

I may be wrong, but I think FAR is a paid tool. I've done the same thing with Notepad++'s "Find in Files" feature for free. However, you have to have a bit more regular expression "kung fu" because it doesn't have the same helpful user interface as FAR to make things easier.

I would agree that it's very easy to mess things up badly. In addition to backing up first, I would make sure to do a "find all" first and scan through the results before actually replacing everything. Additionally, performing a "find next" an "replace" before you hit the Big Bad Replace All button is a good idea to make sure you get the results you expect.
-Dan, Propellerhead-in-training
ccardimon
Propellus Maximus
Posts: 1571
Joined: Fri Jan 11, 2008 1:30 pm
Location: Horsham, Pennsylvania

Re: Best way to change styles en masse?

Post by ccardimon »

Thanks, dorcutt!
Craig

Lost in Disturbia
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Best way to change styles en masse?

Post by Nita Beck »

Yes, FAR HTML runs about $50-$60 US. A particularly handy feature is that one can save the find-and-replace routines in a file. That means, for any of my Flare projects in which I might want to replace H1s with H2, all I have to do is run that routine again, but I don't have to invent it from the ground up. Right now, I've probably got close to 30 different find-and-replace routines stored in a file. Additionally, I can share that file with any colleagues who also have FAR HTML. It's a very handy tool for post-migration cleanup.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Best way to change styles en masse?

Post by dorcutt »

Yes, 50-60$ USD plus the cost of dealing with your company's IT requisitions, reimbursement and/or software installation process!

So far I've been coping with Notepad++. Instead of using FAR's save feature, which seems awesome, I'm just storing each regex that I use on my department's wiki page along with a description of what it does and why I used it. Not as slick as FAR, but it gets the job done for free and without any bureaucracy.

Maybe someday...
-Dan, Propellerhead-in-training
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Best way to change styles en masse?

Post by Nita Beck »

I have the "luxury" of a boss who lets me buy whatever I need. And my IT director is great, too! (For those who don't realize I'm joking... I'm joking! *I'm* my boss and my IT director!)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Post Reply