Find and Replace, Relative Paths to Images folder...ug!
Posted: Tue Dec 02, 2008 8:46 am
Can I use absolute paths for images in the Flare project and still keep my project mobile? Is there some absolute path for the Project that doesn't include the file system? Are there Find and Replace tools that will let me work on the XML code for a bunch of topics all at once?
Here's my situation:
1. I am importing topics by pasting in HTML. This is more time consuming than dumping the files into the project, but I've got a lot of work to do on each topics anyway.
2. The HTML I paste automatically points to external images. That actually works great as a temporary solution. The project compiles, the images appear. Yay. But topic-by-topic, I want to bring images into the Flare project so I don't have to get fancy when dealing with single sourcing.
3. After I move my images to the Resources/Images folder, I want to go into the code of my topics and change all the <img src="http://server/location"> to <img src="../Flare/Location">. For hundreds of images in hundreds of topics. This is my FIRST problem: Flare's global find and replace seems to only look at the text inside topics, there is no way to point it at the code. I have to manually OPEN all the topics in the Internal Text editor and then tell the Find + Replace to search all open files. That works okay, though it is time consuming. Any tips would be welcome.
4. Then we hit the relative path problem. My topics are organized into folders, sub-folders, etc. Therefore my find-replace won't work, because sometimes I'd need to change the path to "../Resources/Images" and sometimes I'd need to change it to "../../Resources/Images." And so forth.
On the small scale, I can hack this up and just do multiple find-replaces. But when this expands to thousands of topics in hundreds of sub-folders... yikes.
Maybe Flare has some kind of absolute path for the project? Like "<img src="Content/Resources/Images/name.png">? And then it would be clever enough to resolve that when building the project? Anybody know?
Any other tips? I need the flexibility of relative paths so that I can drag and drop my compiled project anywhere, but I can't see how to do find/replace on all my images without an absolute path.
What I'm trying to avoid, obviously, is going topic by topic and reinserting every image. I write image-heavy software documentation.
Someone please cry foul if I'm going about this all wrong...
-Douglas
Here's my situation:
1. I am importing topics by pasting in HTML. This is more time consuming than dumping the files into the project, but I've got a lot of work to do on each topics anyway.
2. The HTML I paste automatically points to external images. That actually works great as a temporary solution. The project compiles, the images appear. Yay. But topic-by-topic, I want to bring images into the Flare project so I don't have to get fancy when dealing with single sourcing.
3. After I move my images to the Resources/Images folder, I want to go into the code of my topics and change all the <img src="http://server/location"> to <img src="../Flare/Location">. For hundreds of images in hundreds of topics. This is my FIRST problem: Flare's global find and replace seems to only look at the text inside topics, there is no way to point it at the code. I have to manually OPEN all the topics in the Internal Text editor and then tell the Find + Replace to search all open files. That works okay, though it is time consuming. Any tips would be welcome.
4. Then we hit the relative path problem. My topics are organized into folders, sub-folders, etc. Therefore my find-replace won't work, because sometimes I'd need to change the path to "../Resources/Images" and sometimes I'd need to change it to "../../Resources/Images." And so forth.
On the small scale, I can hack this up and just do multiple find-replaces. But when this expands to thousands of topics in hundreds of sub-folders... yikes.
Maybe Flare has some kind of absolute path for the project? Like "<img src="Content/Resources/Images/name.png">? And then it would be clever enough to resolve that when building the project? Anybody know?
Any other tips? I need the flexibility of relative paths so that I can drag and drop my compiled project anywhere, but I can't see how to do find/replace on all my images without an absolute path.
What I'm trying to avoid, obviously, is going topic by topic and reinserting every image. I write image-heavy software documentation.
Someone please cry foul if I'm going about this all wrong...
-Douglas