Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2020, 11:53 AM   #16
Kryz-El
Junior Member
Kryz-El began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
Plugin to parse filename to write metadata

I have a lot of epubs with wonderful filenames but absolutely no metadata.

If I could parse those filenames and write the metadata that would be great for me.

I'm thinking of a token system. An example would be,

Grant, Maxwell - The Shadow 109 - The Golden Masks

I would tokenize that as,

%creator_file_as_01% - %series% %series% %series_index% - %title%

Maybe without the underscores. I don't know. That's why I'm here begging because I'm no programmer. Just create tokens for the common elements. Let the user format the string. And it would not be a batch operation, only the current open file.

Please! I can't find this functionality in any other software.

My current process is just that, a process that takes forever.

EpubMetadataEditor does the opposite of this, allowing you to rename the file based on metadata tokens.

Thanks for reading.
Kryz-El is offline   Reply With Quote
Old 08-23-2020, 03:11 PM   #17
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,246
Karma: 129333566
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Kryz-El View Post
I have a lot of epubs with wonderful filenames but absolutely no metadata.

If I could parse those filenames and write the metadata that would be great for me.

I'm thinking of a token system. An example would be,

Grant, Maxwell - The Shadow 109 - The Golden Masks

I would tokenize that as,

%creator_file_as_01% - %series% %series% %series_index% - %title%

Maybe without the underscores. I don't know. That's why I'm here begging because I'm no programmer. Just create tokens for the common elements. Let the user format the string. And it would not be a batch operation, only the current open file.

Please! I can't find this functionality in any other software.

My current process is just that, a process that takes forever.

EpubMetadataEditor does the opposite of this, allowing you to rename the file based on metadata tokens.

Thanks for reading.
Where did these ePub with no metadata come from?
JSWolf is offline   Reply With Quote
Advert
Old 08-23-2020, 10:29 PM   #18
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,105
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Kryz-El View Post
I have a lot of epubs with wonderful filenames but absolutely no metadata.

If I could parse those filenames and write the metadata that would be great for me.

I'm thinking of a token system. An example would be,

Grant, Maxwell - The Shadow 109 - The Golden Masks

I would tokenize that as,

%creator_file_as_01% - %series% %series% %series_index% - %title%

Maybe without the underscores. I don't know. That's why I'm here begging because I'm no programmer. Just create tokens for the common elements. Let the user format the string. And it would not be a batch operation, only the current open file.

Please! I can't find this functionality in any other software.

My current process is just that, a process that takes forever.

EpubMetadataEditor does the opposite of this, allowing you to rename the file based on metadata tokens.

Thanks for reading.
Welcome to MR!

I would actually take a look at Calibre; it has some amazing ebook management features! It has the functionality to grab metadata from the filename. You can then "download" the rest of the metadata from your favorite website with the click of a button. I use Calibre to manage my library, and Sigil to Edit the actual HTML code. Calibre Editor also has some functionality not present in Sigil - so I'd look at using them both.

Cheers!
Turtle91 is offline   Reply With Quote
Old 08-23-2020, 10:34 PM   #19
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,743
Karma: 145624992
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Kryz-El View Post
I have a lot of epubs with wonderful filenames but absolutely no metadata.

If I could parse those filenames and write the metadata that would be great for me.

I'm thinking of a token system. An example would be,

Grant, Maxwell - The Shadow 109 - The Golden Masks

I would tokenize that as,

%creator_file_as_01% - %series% %series% %series_index% - %title%

Maybe without the underscores. I don't know. That's why I'm here begging because I'm no programmer. Just create tokens for the common elements. Let the user format the string. And it would not be a batch operation, only the current open file.

Please! I can't find this functionality in any other software.

My current process is just that, a process that takes forever.

EpubMetadataEditor does the opposite of this, allowing you to rename the file based on metadata tokens.

Thanks for reading.
If you haven't found that functionality in other software,I would suggest you haven't looked very hard. I would suggest using calibre for those files. The Adding books configuration allows you to parse the file name including using regex rather than reading metadata from the file contents. A lot easier than re-inventing the wheel.

Though I have to wonder where those files are coming from. I'm more used to files that have nonsensical looking names such as 0c5a9893-1a6c-4c7f-bedb-6524059edee44.epub but that have proper metadata in content.opf. Even most fanfic downloaders are good at generating metadata.

I would hate to think that you are asking for help with pirated ebooks which are about the only source I've seen for ebooks that have that much information in the filename but lousy metadata.
DNSB is offline   Reply With Quote
Old 08-23-2020, 11:35 PM   #20
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,568
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Guys, this isn't a detective agency. There's no reason not to address this (non-rule-violating) question at face value. Where the ebooks came from isn't at all relevant to the question. Stop fishing.

Turtle91's calibre recommendation is probably the best one. Calibre's ability to extract metadata from a file name (or download it) sounds like just the ticket. No need to reinvent the wheel with a Sigil plugin that would only ever work for one file at a time.

Last edited by DiapDealer; 08-23-2020 at 11:41 PM.
DiapDealer is offline   Reply With Quote
Advert
Old 08-24-2020, 04:36 AM   #21
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by DiapDealer View Post
Guys, this isn't a detective agency. There's no reason not to address this (non-rule-violating) question at face value. Where the ebooks came from isn't at all relevant to the question. Stop fishing.
.
Hear, Hear.

Why do people find the need to find a reason why other people may be at fault?

While not a christian I agree with Matthew 7:1
Thasaidon is offline   Reply With Quote
Old 08-24-2020, 06:11 AM   #22
Kryz-El
Junior Member
Kryz-El began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
It has taken me 7 years to undo what calibre did to my collection. No thanks. I built the books from public domain txt files using TEBookConverter. I should have said anywhere but calibre. Thanks for all of your help.
Kryz-El is offline   Reply With Quote
Old 08-24-2020, 11:38 AM   #23
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,743
Karma: 145624992
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Thasaidon View Post
Hear, Hear.

Why do people find the need to find a reason why other people may be at fault?

While not a christian I agree with Matthew 7:1
Mostly since several of the last group of people asking for help with their collections have turned out to be collecting pirated ebooks. Perhaps I am feeling a bit paranoid but I feel that it is a question that needs asking.

Last edited by DNSB; 08-24-2020 at 12:02 PM.
DNSB is offline   Reply With Quote
Old 08-24-2020, 12:02 PM   #24
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,743
Karma: 145624992
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Kryz-El View Post
It has taken me 7 years to undo what calibre did to my collection. No thanks. I built the books from public domain txt files using TEBookConverter. I should have said anywhere but calibre. Thanks for all of your help.
Import the books into calibre which will leave the originals untouched, massage the metadata, add covers, etc. Use either Polish or ModifyEpub to update the metadata in the epub fles. Do a save to disk with a template that will add the series, author and title info.

As for TEBookConverter, looking at various pages:
Quote:
TEBookConverter is a multithreaded and easy to use ebook converter. It uses reliable Calibre.
Quote:
TEBookConverter is an easy-to-use ebook converter that uses Calibre.
DNSB is offline   Reply With Quote
Old 08-24-2020, 01:45 PM   #25
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,843
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Kryz-El View Post
It has taken me 7 years to undo what calibre did to my collection. No thanks. I built the books from public domain txt files using TEBookConverter. I should have said anywhere but calibre. Thanks for all of your help.
Calibre DOES NOT mess up your books.
... Improper/careless usage does .

If you really care about your metadata BULK updates are not the way.
I cherry pick synopsis. ( I go so far as to copy from the download screen: CANCEL, then paste JUST the comments. The rest was set prior, just the way I wanted it)
Why would anyone who HAD their metadata settled, INCLUDE that book in another BULK download?
theducks is offline   Reply With Quote
Old 08-24-2020, 03:35 PM   #26
Kryz-El
Junior Member
Kryz-El began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
It's true, calibre does not mess up your books. IMO it messed up my collection, that was on a removeable drive and moved it all to the system drive. It uses what seems to me to be a cryptic filing system. It renamed files as well. No other collection software that I have used for videos or music or anything else has done that. But the guy says he'll never change it so it's a mute point.

I specifically stated that I was NOT looking for a BULK solution. TFRWIW.

I know calibre is there and it's my fault if I don't like it. Nobody wants to reinvent the wheel. I get it. That's why we are all still using Netscape on Windows 95. Thanks to all of you. Nothing nicer than being attacked for asking for help. Welcome to the Forums!
Kryz-El is offline   Reply With Quote
Old 08-24-2020, 05:50 PM   #27
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,105
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Kryz-El View Post
It's true, calibre does not mess up your books. IMO it messed up my collection, that was on a removeable drive and moved it all to the system drive. It uses what seems to me to be a cryptic filing system. It renamed files as well. ...
All true - except the part about "no other software..."; iTunes does the exact same thing.

I don't care for the file system that Calibre uses either. But, Calibre needed a consistent method that the program (not a thinking person) could use to know where everything is. It can't change now even IF they wanted to - it would screw up all the years of programming/plugins that went in to it.

However, there is a very easy, built-in to Calibre, option to solve this which I use regularly. It is called "Save to Disk". After you add all your metadata, covers, etc. to Calibre, just click on the "Preferences" button and then select "Saving Books to Disk" (see attachment). You can set Calibre to save your ebook with all the updated metadata, covers, etc. to the location of your choice, with the filename template of your choice. Once you have your preferences saved, just highlight the books you want to save and hit the "Save to Disk" icon to make a separate copy of your library to use as you see fit!

It's really quite nice. I have my filename template set to:
{author_sort} - {series} {series_index:0>2s|| - } {title}

which gives me something like:
Eddings, David - Belgariad 01 - Pawn of Prophecy.epub
Attached Thumbnails
Click image for larger version

Name:	Annotation 2020-08-24 173903.png
Views:	269
Size:	137.4 KB
ID:	181566  

Last edited by Turtle91; 08-24-2020 at 05:54 PM.
Turtle91 is offline   Reply With Quote
Old 08-24-2020, 07:16 PM   #28
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,568
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Calibre doesn't "move" anything on import does it? It never used to. It copies everything to it's own library leaving the originals intact.
DiapDealer is offline   Reply With Quote
Old 08-24-2020, 07:32 PM   #29
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,843
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DiapDealer View Post
Calibre doesn't "move" anything on import does it? It never used to. It copies everything to it's own library leaving the originals intact.
Correct. Unless you drop the original into the Auto Add folder (you mus set this up). Then it DELETES when the ADD completes.
theducks is offline   Reply With Quote
Old 08-24-2020, 07:59 PM   #30
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,246
Karma: 129333566
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Kryz-El View Post
It's true, calibre does not mess up your books. IMO it messed up my collection, that was on a removeable drive and moved it all to the system drive. It uses what seems to me to be a cryptic filing system. It renamed files as well. No other collection software that I have used for videos or music or anything else has done that. But the guy says he'll never change it so it's a mute point.

I specifically stated that I was NOT looking for a BULK solution. TFRWIW.

I know calibre is there and it's my fault if I don't like it. Nobody wants to reinvent the wheel. I get it. That's why we are all still using Netscape on Windows 95. Thanks to all of you. Nothing nicer than being attacked for asking for help. Welcome to the Forums!
Calibre DID NOT MOVE your library. Calibre has never moved any library. In this case, it's USER ERROR.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 01:25 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 02:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 12:11 PM


All times are GMT -4. The time now is 12:19 AM.


MobileRead.com is a privately owned, operated and funded community.