![]() |
#211 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 850
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
Sure. I meant, of course, one window with two columns.
|
![]() |
![]() |
![]() |
#212 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,848
Karma: 6120478
Join Date: Nov 2009
Device: many
|
I will give it a shot.
|
![]() |
![]() |
![]() |
#213 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,648
Karma: 205022288
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Just remember to leave the extension out of the new feature. Don't you think? We already have a way of changing the extension on the xhtml files en masse. How do plan to handle potential duplicate names with RE renamer? Should the entire process fail without edits if any are found? Or would you run a check before the preview to ensure viability of all names in advance? |
|
![]() |
![]() |
![]() |
#214 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,098
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
How many times will it use FAIL? Why make a 2 step process for a small percentage of cases? Fail those and run with the norm. BTW I am just curious. I don't ever remember seeing a crazy long suffix file name. The prefix part... ![]() ![]() ![]() Is this more common for other than, English language fiction (which is all I can read ![]() |
|
![]() |
![]() |
![]() |
#215 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 850
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
Hmmm ...
Maybe you really don't need to add such a function to Sigil. If it concerns only users per mil, it will be more valuable to add such a possibility to plugins, without multiplying the function to change the name. |
![]() |
![]() |
![]() |
#216 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,848
Karma: 6120478
Join Date: Nov 2009
Device: many
|
I will give it a try. It will first pop up a Dialog that will ask for Regular Expression and Replacement.
With that it will build a list of before and after filenames for the user to accept or reject. If accepted, it will check that the future bookpaths are unique before allowing the rename to proceed. That is the plan anyway. If no one likes it, I can easily dumb it down to make a PrefixTrimmer instead. |
![]() |
![]() |
![]() |
#217 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,648
Karma: 205022288
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() Way better in my opinion, to know before-hand whether there's potential problems and not let the user proceed with the mass rename if there is. |
|
![]() |
![]() |
![]() |
#218 |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,834
Karma: 8006102
Join Date: Mar 2015
Device: Kindle, iOS
|
I didn't mean to open a can of worms. I was really asking a question about existing features, not making a request for a new one!
|
![]() |
![]() |
![]() |
#219 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Side-by-side Before/Afters would be nice. As an example, I use Bulk Rename Utility: and it shows any files that are being changed as green. And any options that are going to be applied with an orange box. * * * I think having a Default/Advanced Mode for Sigil's Bulk Rename would work. Default would be similar to how it is now, except you get a few extra "basic options":
Quote:
Side Note: Kind of reminds me of Thunar's bulk rename. That regex support was so great to have built directly into the file manager! https://www.ghacks.net/2009/07/22/bu...-bulk-renamer/ Last edited by Tex2002ans; 11-18-2019 at 01:56 PM. |
||
![]() |
![]() |
![]() |
#220 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,848
Karma: 6120478
Join Date: Nov 2009
Device: many
|
I have taken a shot at this. I have pushed a very simple, very basic working version to master.
See the BookBrowser context menu for RE Renamer. You highlight the resources you want to rename first. It requests your regex string and your replacement text. Then it shows you what the results would be. If you accept, it does the actual renaming. Some things:
So it is not pretty but it should be usable. If people think it should stay we can try a better way to handle the escaping for the backslash character. Feedback welcome! Last edited by KevinH; 11-18-2019 at 03:16 PM. |
![]() |
![]() |
![]() |
#221 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 850
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
The first tests are very promising.
Strength in simplicity! Only one thing - after pressing "Cancel" in the prior-revised window could return to the window with the formula entered. Escape works for me with one backslash. A suggestion for additional avoidance of duplicates (if someone changes all files): If the name in the "Revised Filename" column is repeated - color it in red. Last edited by BeckyEbook; 11-18-2019 at 02:51 PM. |
![]() |
![]() |
![]() |
#222 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,848
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Quote:
QRegularExpression docs seem to indicate we need to escape things. For example the only way to get a plain backslash is to use \\\\ As for returning to the RERenamer with the old string that is possible. KevinH |
|
![]() |
![]() |
![]() |
#223 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 850
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
|
No problem.
ch01.xhtml ch02.xhtml ch03.xhtml Find: ch(\d+) Replace: chapter\1-blah chapter01-blah.xhtml chapter02-blah.xhtml chapter03-blah.xhtml |
![]() |
![]() |
![]() |
#224 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,848
Karma: 6120478
Join Date: Nov 2009
Device: many
|
So I guess that makes sense as the text is never a literal string being processed by the compiler and is instead the output of a QLineEdit.
So I will edit my earlier post to the fix it. Done. I will work in setting the looping around and resetting the first Dialog with initial values. Last edited by KevinH; 11-18-2019 at 03:17 PM. |
![]() |
![]() |
![]() |
#225 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,098
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() ![]() ![]() I was thinking a fail was a rollback to before the task was invoked. ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
5.8.11 Pre=release | knc1 | Kindle Developer's Corner | 21 | 04-17-2018 08:42 PM |
Overdrive - Search for Pre-Release | nynaevelan | General Discussions | 11 | 11-24-2013 02:27 PM |
Where are the pre-release purchase buttons? | Sydney's Mom | General Discussions | 8 | 09-06-2012 10:57 PM |
KF Android 4.0 Pre-Release Version | robertc88 | Kindle Fire | 22 | 01-22-2012 07:24 PM |
PDF Viewer 0.3.0 pre-release | pruss | Android Devices | 62 | 11-22-2011 11:18 AM |