View Single Post
Old 11-25-2019, 10:03 AM   #10
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Let's say you're starting with images:

Code:
<img alt="" src="../Images/image001.png" />
[...]
<img alt="" src="../Images/image098.png" />
<img alt="" src="../Images/image099.png" />
This is potentially what I would do:

1. Go into Tools > Reports > Image Files.

2. Look through the images, any that are duplicate fleurons: Right-Click > Delete From Book:

Click image for larger version

Name:	Sigil.Report.Delete.Images.png
Views:	201
Size:	93.5 KB
ID:	175130

3. Once you get rid of all the fleurons, then return back to the main Sigil window.

Open the Images folder, Shift-Click to highlight all images, Right-Click > Rename:

Click image for larger version

Name:	Sigil.Rename.Images.png
Views:	187
Size:	23.6 KB
ID:	175131

4. Rename to something completely different. Like "TempImages001".

Now, all your surviving images will be named "TempImages001", "TempImages002":

Code:
<img alt="" src="../Images/TempImages001.png" />
[...]
<img alt="" src="../Images/image098.png" />
<img alt="" src="../Images/TempImages002.png" />
while all the non-existent fleurons will be under the old naming convention.

5. Now you can use Regex to easily change all the old image code into "fleuron.png":

Search: <img alt="" src="[^"]+image\d+\.png" />
Replace: <img alt="" src="../Images/fleuron.png" />

6 (Optional). Now go through and give your surviving images all human-readable names.
Tex2002ans is offline   Reply With Quote