Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-04-2008, 03:36 PM   #1
Dan23
Enthusiast
Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.Dan23 ought to be getting tired of karma fortunes by now.
 
Posts: 36
Karma: 485822
Join Date: Sep 2007
Device: K4, KDXG
libprs500 metadata from filenames

Two questions:
1. Is there any way to force libprs500 to generate metadata from the filename first (or exclusively) even if the file has metadata within it?
2. This is more of a feature request as I doubt there currently is a way to do this:
Some books in my collection I have saved in the form of <author> - <series> - <series_index> - <title> and those without series are <author> - <title>. Perhaps you could add to the metadata from filename section something that allows for two filename schemes (tries to match the first and then the second)
Dan23 is offline   Reply With Quote
Old 04-04-2008, 04:44 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,910
Karma: 5035037
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1. No
2. Yeah that's a feature request. Open a ticket.
kovidgoyal is offline   Reply With Quote
 
Enthusiast
Old 06-29-2008, 06:04 PM   #3
Alby
Junior Member
Alby began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2008
Device: Sony PRS 505
I actually had the same issue as you. I did the following:

Use a program called PDFInfo to remove the metadata (you may need to use a scripting tool like AutoIT to automate it) then I use the following regular expression:

(?P<authors>[^-]+)\s*-+\s*((?P<series>[^-\d]+)\s*(?P<series_index>\d)*\s*-+\s*)*(?P<title>.+)

Edit: (?P<authors>[^-]+)\s*-+\s*((?P<series>[^-]+)\s*-+\s*)*(?P<title>.+) works without the error of the series_index not being there all the time

It has support for the Authors name, followed by the - separator then an optional Series name & optional Series_Index, followed by an optional separator (tied to the Series option) and finally the Title.

I am trying to work out why sometimes it fails when there is no series_index, but I suspect that once you define a ?P<id> it MUST be used and not be make optional using a *. I may force it picking up a space (\s), unfortunately not all filenames contain a space next to the separator (-) and I much prefer using an optional space between any of the fields (\s*)

If this doesn't end up working, I may end up using Pyton/Perl/VBScript to split the file name up and use PDFInfo to populate the Metadata fields instead, unfortunately there is no MetaData field for Series or Series_Index (at least using PDFInfo) so I may need to find another tool that allows me to add fields and hope Calibre can map these fields to Series & Series_Index.

P.S. I realise you may not be using PDF's, but thats all that applicable for me, but the regular expression may still end up working with a bit of tweaking.

Last edited by Alby; 06-29-2008 at 10:02 PM. Reason: Typos & Extra Information
Alby is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filenames to metadata, preserving filenames. nitrogun Calibre 5 09-13-2010 10:50 PM
PDF Filenames vs Metadata Title clintbradford Calibre 0 07-12-2010 11:50 PM
batch metadata editing possible from filenames? caponesan Reading and Management 3 09-03-2009 12:50 PM
Metadata in Libprs500 keith Calibre 10 02-19-2008 07:14 PM
Covers/Metadata from LIBPRS500 or after a file's been LRF'd Gideon Calibre 11 01-27-2008 02:24 AM


All times are GMT -4. The time now is 05:38 AM.


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