eBook and AudioBook support

All your suggestions, requests and ideas for future development
Post Reply
winecountrymedia
Posts: 22
Joined: 06 Sep 2023, 04:22

eBook and AudioBook support

Post by winecountrymedia »

eBook and AudioBook support?

I would be nice to have an all renamer in one spot. Add support for

epub, mobi, m4b, ZIP, RAR, RAR5, CBR, CBZ, CB7

right now the only option is calibre and its nowhere near as good as filebot in my opinion.
User avatar
rednoah
The Source
Posts: 23674
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: eBook and AudioBook support

Post by rednoah »

You can use Plain File Mode to rename any file including eBook files.



:?: You would start by asking yourself where can get the eBook metadata from in machine-readable form? Author? Title? Release Year?

:?: Maybe it's embedded in the file? MediaInfo?

:?: Maybe there's a companion XML file? Rename files based on sibling XML files?

:?: Maybe you can just copy & paste bits and pieces of the current file path? Organize files based on information present in the file path?

:?: Maybe you only have some ID that you can use to lookup more information online? Custom Format Server?
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23674
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: eBook and AudioBook support

Post by rednoah »

Some degree of eBook and AudioBook support may be possible via custom formats. If you know a website that that supports search and lookup based on information that you have based on file name or file content (i.e. MediaInfo properties) then you can most certainly write a custom format that sends a HTTP requests and then parses the HTML response for information.


We do however need test data. If you don't know anything about the files at hand then we cannot write code to deal with them. In particular, we absolutely need sample file paths as text and MediaInfo properties for prototyping and testing.


Links:
:idea: Please read the FAQ and How to Request Help.
SysWiz
Posts: 12
Joined: 06 Jun 2019, 03:30

Re: eBook and AudioBook support

Post by SysWiz »

Finding new things to use Filebot for. :)

Does this script handle multipart Audiobooks? It looks like it wants to name them all the same file name. A few examples of naming conventions I have run in to:

Code: Select all

The Awkward Thoughts of W Kamau Bell-Part01.mp3
The Awkward Thoughts of W Kamau Bell-Part02.mp3
The Awkward Thoughts of W Kamau Bell-Part03.mp3
The Awkward Thoughts of W Kamau Bell-Part04.mp3
Steve Berry - The Emperors Tomb 01.mp3
Steve Berry - The Emperors Tomb 02.mp3
001 - Prodigal_Son.mp3
002 - Prodigal_Son.mp3
003 - Prodigal_Son.mp3
004 - Prodigal_Son.mp3
User avatar
rednoah
The Source
Posts: 23674
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: eBook and AudioBook support

Post by rednoah »

You may need to slightly adjust the Rename audiobooks via Audible sample code to better handle your naming conventions, i.e. extract the search query from the file name that you have.

e.g.

Groovy: Select all

def query = fn.space(' ').removeAll(/ - \d+$|-Part\d+$|\d+$|^\d+ - /)


You would then need additional code to copy & paste the number from the current file name into the new file name:

Format: Select all

{ fn.match(/ - \d+$|-Part\d+$| \d+$|^\d+ - /).match(/\d+/) }


:!: As you can see, then code needs to be fine-tuned for the patterns that you have in your file names. This may be difficult if your files don't follow any kind of pattern reliably.
:idea: Please read the FAQ and How to Request Help.
SysWiz
Posts: 12
Joined: 06 Jun 2019, 03:30

Re: eBook and AudioBook support

Post by SysWiz »

Where is the best place to learn how to write these strings? Some of it looks similar to regex..
User avatar
rednoah
The Source
Posts: 23674
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: eBook and AudioBook support

Post by rednoah »

:idea: / - \d+$|-Part\d+$| \d+$|^\d+ - / is indeed a Regular Expression pattern. regexr is a good place for learning and prototyping regex patterns.

:idea: FileBot Groovy Expression Reference Documentation will get you started with custom format expressions, i.e. Groovy code.
:idea: Please read the FAQ and How to Request Help.
Post Reply