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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 08-03-2010, 06:59 PM   #16
Justy
Fanatic
Justy has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud of
 
Justy's Avatar
 
Posts: 516
Karma: 27417
Join Date: Dec 2007
Location: Greater Vancouver Area, BC, Canada
Device: BeBook Mini, Cybook Gen3, Nexus 7, Sony prs-t1
Quote:
Originally Posted by kovidgoyal View Post
Have you checked the option to read metadata only from filenames.
Yes, I have that option and 'merge similar file names' both checked.

Quote:
Originally Posted by Starson17 View Post
Try this:
Code:
([^_]+ )(?P<author>[A-Za-z]+) ((?P<series>[^_\d]+)(?P<series_index>\d+)? )?(?P<title>[^_]+)
Thank you so much, such a small change but it made all the difference.

You guys are great!
Justy is offline   Reply With Quote
Old 08-03-2010, 07:28 PM   #17
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Justy View Post
Thank you so much, such a small change but it made all the difference.

You guys are great!
It works, but it shouldn't. There's something odd going on with the regex. When I get time, I'll take a look at it. In the meantime, I thought I'd post something that works for you to use.
Starson17 is offline   Reply With Quote
Old 04-17-2011, 10:48 PM   #18
Justy
Fanatic
Justy has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud of
 
Justy's Avatar
 
Posts: 516
Karma: 27417
Join Date: Dec 2007
Location: Greater Vancouver Area, BC, Canada
Device: BeBook Mini, Cybook Gen3, Nexus 7, Sony prs-t1
I feel kind of silly asking for help on this same issue again. I found more files to import and these 2 pieces of code which both worked at various times in the past are not giving the expected results now. I suspect that Calibre has changed a bit with all the wonderful updates Kovid & team have been adding for us.

Quote:
Originally Posted by user_none View Post
This will work provided there are no numbers in the series name:
Code:
[^_]+_(?P<author>[^_]+)_((?P<series>[^_\d]+)(?P<series_index>\d+)?_)?(?P<title>[^_]+)
Quote:
Originally Posted by Starson17 View Post
Try this:
Code:
([^_]+ )(?P<author>[A-Za-z]+) ((?P<series>[^_\d]+)(?P<series_index>\d+)? )?(?P<title>[^_]+)
My test file names were:
  1. Genre_AuthorLastName_Title.prc
  2. Genre_AuthorLastName_Series01_Title.prc
which gave the following results respectively:
  1. Title = Genre AuthorLastName Title
  2. Title = Genre AuthorLastName Series01 Title
Justy is offline   Reply With Quote
Old 04-18-2011, 08:56 AM   #19
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Justy View Post
I feel kind of silly asking for help on this same issue again. I found more files to import and these 2 pieces of code which both worked at various times in the past are not giving the expected results now. I suspect that Calibre has changed a bit with all the wonderful updates Kovid & team have been adding for us.
I just tested the code I gave you previously, and it still works for me.
Code:
([^_]+ )(?P<author>[A-Za-z]+) ((?P<series>[^_\d]+)(?P<series_index>\d+)? )?(?P<title>[^_]+)
My test file names were:
  1. Genre_AuthorLastName_Title.prc
  2. Genre_AuthorLastName_Series01_Title.prc
which gave the following results respectively:
  1. Title = Title
  2. Author = AuthorLastName

    and
  3. Title = Title
  4. Author = AuthorLastName
  5. Series= Series
  6. SeriesIndex = 1
Starson17 is offline   Reply With Quote
Old 04-18-2011, 01:57 PM   #20
Justy
Fanatic
Justy has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud ofJusty has much to be proud of
 
Justy's Avatar
 
Posts: 516
Karma: 27417
Join Date: Dec 2007
Location: Greater Vancouver Area, BC, Canada
Device: BeBook Mini, Cybook Gen3, Nexus 7, Sony prs-t1
That code works perfectly this morning, I don`t know what was happening last night. Thank you for checking into this for me!
Justy is offline   Reply With Quote
Old 08-14-2011, 02:00 PM   #21
Ababakar
Member
Ababakar began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Aug 2011
Device: none
i´m losing my hair on the same issue.
i got it working - but exactly the way i want.

My files are named:
isbn_authors_title - 2nd title.pdf

so for example:
123456789_Peter Pan and Bugs Bunny_The Science of things - And other stories.pdf

so far i made it work for this scheme

123456789 - Peter Pan and Bugs Bunny - The Science of things- And other stories.pdf

The code used for this is:
(?P<isbn>.+) - (?P<author>[^_]+) - (?P<title>[^_]+)

But i didn´t get the "_" to work. Also in some cases i got a year and an edition after the title (isbn_authors_title - 2nd title_year_edition.pdf) - but as these won´t be imported anyway (if i understood correctly).
Ababakar is offline   Reply With Quote
Old 08-14-2011, 02:57 PM   #22
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
What regexes did you try to get the underscores to work?
Manichean is offline   Reply With Quote
Old 08-15-2011, 06:13 AM   #23
Ababakar
Member
Ababakar began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Aug 2011
Device: none
figured it out myself with the link of ilovejedd in this thread here: http://www.mobileread.com/forums/showthread.php?t=40993

thanks anyway
Ababakar 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
File names with "(" and ")" can cause screen freezes greenapple Ectaco jetBook 5 02-04-2010 08:25 PM
Get "Tag" metadata from file name dosyoyas Calibre 2 01-13-2010 01:09 PM
Fiction Writers as "Brand Names" kilohertz53 Lounge 53 11-02-2007 05:00 PM
Help! the "Make Sony Reader File" under "Options" is different Dr. Drib Sony Reader 6 04-23-2007 02:56 AM
New ".mobi" domain names are coming in May 2006 Bob Russell Lounge 3 04-25-2006 05:38 PM


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


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