Mass removal of .htm filenames within Flare?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Technicallyabstract
Jr. Propeller Head
Posts: 8
Joined: Wed Jan 13, 2010 3:45 pm

Mass removal of .htm filenames within Flare?

Post by Technicallyabstract »

I would like to find a way to wipe out all existing filenames for .htm files in a Flare project, and then replace them with the Heading 1 level topic names.

During the Roadshow, I believe that Mike Hamilton suggested you might be able to use Search and Replace - with the appropriate selection of checkboxes - to wipe out the filenames, and that the next time you build the project Flare would replace the blank filenames with the topic titles. I believe this would be contingent on the titles being the only content in the file using the H1 style. However, I have as yet been unable to figure out how to get Search and Replace to remove the filenames.

My requirement came about after creating a project by importing a chm into Flare V7. Over the past several years, I was required to use a proprietary Microsoft tool to create the content for the chm - but since our company has re-negotiated its relationship with Microsoft, I can now use Flare instead. The problem is that every one of the 400+ help topics in the chm has an enigmatic MS filename such as "8b6c61b6-7bd2-4426-ae1f-5a1309ee1a2c.htm". Saying that these are difficult to work with is an understatement; soon, just selecting the Content explorer will result in a rather primal conditioned response on my part.
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: Mass removal of .htm filenames within Flare?

Post by lacastle »

if that is possible, it would be very helpful. maybe email madcap support or Mike Hamilton directly? (i was at the roadshow last week in philadelphia and he did say that we could email him directly if we didn't need an immediate answer.)
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Mass removal of .htm filenames within Flare?

Post by LTinker68 »

What Mike was talking about at the Roadshow is clearing out the <title> tags in topics so they're empty, which means the topic defaults to using the first heading in the topic for things like searching, or dragging the topic to the TOC to add it, or indexing, and so on. You're talking about changing the filenames, and you can't do that in Flare. Well, you can change filenames, but you can't do what you're trying to do. I'm not even sure you can do that using other FAR tools since you'd need to use regular expressions, and I don't know if you can use a reg expression to find info in a topic and use it to replace the topic's filename. You could probably write an external script that would do that. Either way, I wouldn't recommend it -- you'd probably break links all over the place, because you'd have to change hyperlinks within other topics to make sure they point to the topic's new file name.

In addition, you probably have spaces in your heading tags, and it's not generally recommended to have spaces in filenames, so you'd want to get rid of them. Although I think there is an option somewhere to replace spaces with underscores.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Mass removal of .htm filenames within Flare?

Post by Andrew »

I hate to suggest a manual solution, but the simplest means I'm aware of is to spend an hour a day for a few days and do it manually. It's soul-destroying work, but 400-500 isn't too bad. Maybe a week or two at an hour a day. And bonus: Flare will then maintain all of your links.

If you have some scripting chops, you could probably script up something that would handle this for you (including the links), but it might ultimately take you as long to script up a solution as to simply do it manually.
Flare v6.1 | Capture 4.0.0
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Mass removal of .htm filenames within Flare?

Post by NorthEast »

You definitely cannot do this in Flare, and as LTinker said, it sounds like Mike was talking about something quite different.

I don't think it would be possible in FAR either; although you can rename a batch of files, you can't set the name based on content (the h1 tag) within the file itself.
And even if you could rename all your files, how do you then update all the broken links to those files across the whole project?

Is it particularly important to rename the files?
I guess filenames are visible to the end-user in WebHelp outputs (e.g. if they check the status bar when hovering on a link), but it's not something I think most people would care about.
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: Mass removal of .htm filenames within Flare?

Post by Andrew »

Dave Lee wrote:Is it particularly important to rename the files?
I guess filenames are visible to the end-user in WebHelp outputs (e.g. if they check the status bar when hovering on a link), but it's not something I think most people would care about.
I'd imagine that having file names that match the title of the topic would make it a LOT easier to find the file you are looking for in Flare.
Flare v6.1 | Capture 4.0.0
Technicallyabstract
Jr. Propeller Head
Posts: 8
Joined: Wed Jan 13, 2010 3:45 pm

Re: Mass removal of .htm filenames within Flare?

Post by Technicallyabstract »

Thanks for all the responses!

I'm afraid you're right - I likely misunderstood Mike, then mis-quoted him. Thanks for sorting that out.

Looks like the manual solution is best - especially in order to avoid link problems. A few character-building hours of filename changing is prefereable to trying to work with 400+ topics all withfilenames like 14a23d81-020d-4982-be90-324608a481d6.htm, especially since about half don't appear in the TOC.

Thanks again!
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Mass removal of .htm filenames within Flare?

Post by NorthEast »

Andrew wrote:
Dave Lee wrote:Is it particularly important to rename the files?
I guess filenames are visible to the end-user in WebHelp outputs (e.g. if they check the status bar when hovering on a link), but it's not something I think most people would care about.
I'd imagine that having file names that match the title of the topic would make it a LOT easier to find the file you are looking for in Flare.
Yeah, I just meant in the context of the effort it would take to rename all the files - it's a lot of work, so must have a benefit!
If they've got garbage filenames like 14a23d81-020d-4982-be90-324608a481d6.htm though, then I guess there's enough reason.

And you definitely want to rename inside Flare, as it'll update all your links.
Post Reply