04-15-2018, 01:05 AM | #1 |
Member
Posts: 11
Karma: 10
Join Date: Nov 2012
Device: Kindle Fire
|
Change the file extension of the selected files
I have a renaming problem:
I've got folders/books which consist of many little files without an extension (but in fact they are valid XHTML) and these files are already linked between each other (for example index_file points to sec1_file & sec2_file; sec3_file_chapter2 links to sec1_file etc.) When i import these files into Calibre Ebook Editor, they end up in Miscellaneous folder. So i add XHTML extension to these files outside of Calibre and import them this way and they show up in Text. But for links to be working, i need to then rename them back inside the Text folder to files without an extension sec1_file.xhtml to sec1_file. If i do that one by one, it is very time consuming, but the result is excellent. Suggestions:
|
04-15-2018, 01:11 AM | #2 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm afraid your use case is too niche for me to add support for it to the editor. I suggest you simply rename them outside the editor then import and use a search and replace regex to fix the links automatically.
|
Advert | |
|
04-15-2018, 02:50 AM | #3 | |
Member
Posts: 11
Karma: 10
Join Date: Nov 2012
Device: Kindle Fire
|
Feedback
Hi,
Thanks so much for your reply, i really appreciate your hard work and dedication! Actually it is not that niche at all. Look at these files inside the retail ebook that was released last week: Quote:
It would be great, if this dialog: Was working as i would expect - if i don't put anything in there and hit "OK", it should remove the extension(s), or ask me if i want to remove it. At the moment, both of the buttons work the same way if the dialog is empty. |
|
04-15-2018, 03:04 AM | #4 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I really dont see why anyone would want to remove extensions. Sure there are likely a few broken books out there without extensions, that does not mean removing them from files where they are present is a good idea.
|
04-15-2018, 03:47 AM | #5 |
Member
Posts: 11
Karma: 10
Join Date: Nov 2012
Device: Kindle Fire
|
Could you at least point me to the right file on Github that is related to this change the extension function? I will create a plugin for myself.
|
Advert | |
|
04-15-2018, 03:51 AM | #6 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Simply search for the text in that dialog and you will find the file.
|
Tags |
extension, filename, rename, renaming |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I want to change only the file extension | BTskj | Plugins | 0 | 08-06-2017 11:04 AM |
bulk change file extension, but not name | Fedwin | Sigil | 33 | 03-14-2015 05:51 AM |
File name syntax change, existing files? | martienne | Library Management | 5 | 02-09-2014 08:48 AM |
SSModeSwitcher: An extension to change Screensaver mode | thomass | Kindle Developer's Corner | 13 | 11-04-2012 09:31 PM |
Troubleshooting file extension | gerry7 | Amazon Kindle | 1 | 05-25-2011 06:55 AM |