Can't set publish date from filename on import

Bug #1504245 reported by Rick Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

I set up file names and a regular expression to import author, publication year, title, and a comment. Here is a typical file name:

  NSA@1976@Oral History rowlett <email address hidden>

After a couple hours of fiddling around I got this regular expression:

  (?P<author>[^@]+)@(?P<published>[^@]+)@(?P<title>[^@]+)@(?P<comments>[^_]+)

I tested it in the "Configure metadata with file name" area of the "Adding Books" page. All 4 fields were properly filled in. The publication year was transformed into a yyyy-mm-dd format, choosing Oct 15 for the day of year. I didn't mind.

Following the import, however, I found that only the title, author, and comment fields had been filled in. The publication date was set to today as a default value.

I'm using Calibre 2.31, with 3712 books in my library. It's running on Mac OS X Yosemite, 10.10.5

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1504245

Works for me, with that add expression and an empty pdf file with that
name. Make sure you have "Read metadata from file contents rather than
file name" unchecked in Prefrences->Adding Books.

 status invalid

Changed in calibre:
status: New → Invalid
Revision history for this message
Rick Smith (gty-rick-p0i) wrote : Re: [Bug 1504245] calibre bug 1504245

OK. A non-empty PDF always has a “created” date inserted by the PDF build software. If I don’t uncheck the box, then calibre picks up the inserted “created" date instead.

Thanks. I should have thought of that.

> On Oct 12, 2015, at 10:08 PM, Kovid Goyal <email address hidden> wrote:
>
> Works for me, with that add expression and an empty pdf file with that
> name. Make sure you have "Read metadata from file contents rather than
> file name" unchecked in Prefrences->Adding Books.
>
> status invalid
>
> ** Changed in: calibre
> Status: New => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1504245
>
> Title:
> Can't set publish date from filename on import
>
> Status in calibre:
> Invalid
>
> Bug description:
> I set up file names and a regular expression to import author,
> publication year, title, and a comment. Here is a typical file name:
>
> NSA@1976@Oral History rowlett <email address hidden>
>
> After a couple hours of fiddling around I got this regular expression:
>
> (?P<author>[^@]+)@(?P<published>[^@]+)@(?P<title>[^@]+)@(?P<comments>[^_]+)
>
> I tested it in the "Configure metadata with file name" area of the
> "Adding Books" page. All 4 fields were properly filled in. The
> publication year was transformed into a yyyy-mm-dd format, choosing
> Oct 15 for the day of year. I didn't mind.
>
> Following the import, however, I found that only the title, author,
> and comment fields had been filled in. The publication date was set
> to today as a default value.
>
> I'm using Calibre 2.31, with 3712 books in my library. It's running on
> Mac OS X Yosemite, 10.10.5
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/calibre/+bug/1504245/+subscriptions

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.