Hi! Is there a way or a script that can be written to easily change the source location of an image file in multiple topics?
Thanks!
Jeff
Script to change location of image file
-
jblackwood
- Propeller Head
- Posts: 93
- Joined: Tue Jul 25, 2006 8:51 am
- Location: NC
Re: Script to change location of image file
Seems like it would be easier to click -n- drag the picture in Flare's Content Explorer and let Flare do the work for you...would that not work?
Flare v6.1 | Capture 4.0.0
-
jblackwood
- Propeller Head
- Posts: 93
- Joined: Tue Jul 25, 2006 8:51 am
- Location: NC
Re: Script to change location of image file
I wish it would, but with a complication in there I don't think that would work. Here's my complication. I now need to have a more structured Images area based on modules within our application. So for one image, for instance Add.png, I need it to reside in multiple places. UI changes are being made in a phased approach and the image will change for some places and not others so I need to have it separate at this point. Hope that makes sense!
Thanks!
Jeff
Thanks!
Jeff
Re: Script to change location of image file
Not really.jblackwood wrote:Hope that makes sense!
Are you saying that you have two versions of the Add.png graphic, one for one module (e.g., Basic) and one for another module (e.g., Advanced)? Or are you saying that you're building different outputs that correlate to your modules and you want the same image file Add.png, to reside in multiple folders in your project?
If it's the former, then you can have multiple image files with the same filename, so long as they're stored in different folders. So the image file saved to Resources/Images/Basic/Add.png can be a different image file than the one stored at Resources/Images/Advanced/Add.png. That keeps them organized structurally. To interchange which image is used in the output, use a snippet with conditions. That is, all the images are inserted into the same snippet file, and conditional tags determine which image in that snippet is included in the output.
If it's the latter, then there's no reason to have the same image file stored in multiple locations. It doesn't matter where an image is stored in the project, Flare will build the output and place the image in the correct spot in the topic. So you can keep all your images in Resources/Images/ and whether or not they're included in the output depends on if the topic in which they're referenced is included in your output.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
jblackwood
- Propeller Head
- Posts: 93
- Joined: Tue Jul 25, 2006 8:51 am
- Location: NC
Re: Script to change location of image file
My main problem is that I seldom make sense to myself. Anyway, I need to setup your first scenario. The folder structure by module is now in place under Resources/Images. The difficult task before me now is getting the images moved or inserted into the correct Images folder and making sure the links in the topci fiels are correct. I cannot simply move the file in the Content Explorer to the new location and have Flare update the links for me, because there are files from the wrong modules linked to some of the image files. I decided to use TextCrawler to do a find and replace for the src location of the image in the files as necessary. It appears to be working fine thus far. There is just a lot of reorganization that has to be done. Thanks for the input!
Jeff
Jeff
-
KevinDAmery
- Propellus Maximus
- Posts: 1985
- Joined: Tue Jan 23, 2007 8:18 am
- Location: Darn, I knew I was around here somewhere...
Re: Script to change location of image file
For your own sanity, I would change the names of the images - for example, instead of calling it Add.png everywhere I would change it to Add_Mod1.png, Add_Mod2.png or something like that. That way if someone copies / moves files to the wrong place by mistake, you don't end up over-writing one version with another.
Until next time....

Kevin Amery
Certified MAD for Flare
Kevin Amery
Certified MAD for Flare
-
jblackwood
- Propeller Head
- Posts: 93
- Joined: Tue Jul 25, 2006 8:51 am
- Location: NC
Re: Script to change location of image file
Thanks!KevinDAmery wrote:For your own sanity, I would change the names of the images - for example, instead of calling it Add.png everywhere I would change it to Add_Mod1.png, Add_Mod2.png or something like that. That way if someone copies / moves files to the wrong place by mistake, you don't end up over-writing one version with another.
Jeff