View Single Post
Old 07-16-2024, 09:25 AM   #5
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Hm,
See attached pictures. Looks good for me.
I attached two dummy files w/o content that I used as test. In the first two pictures I made a test with the import test dialog. You may recognize that you provide two different examples, one with [author - title (year).ext] and the other with [title - author (year).ext]. In this case you need two separate templates for matching the metadata sequence and then switch to the one needed for importing.

For my example I use [author - title (year).ext] with:
Code:
(?P<author>[^_-]+) - (?P<title>[^_].+) \((?P<published>.+)\)
((?P<title>[^_].+) - ?P<author>[^_-]+) \((?P<published>.+)\)

Variations for [author - title (year).ext]:
Code:
(?P<author>[^_-]+) - (?P<title>[^_].+) \((?P<published>[0-9]{4})\)
or
Code:
(?P<author>[^_-]+) - (?P<title>[^_].+) \((?P<published>\d{4})\)
Picture 3 shows the imported files with the correct author, Title and publish year. Be aware you need to uncheck the box for [Read metadata from file contents rather than file name] for reading the meta data from file name, see picture 4

Template for [title - author (year).ext] should be:
Code:
((?P<title>[^_].+) - ?P<author>[^_-]+) \((?P<published>.+)\)
Attached Thumbnails
Click image for larger version

Name:	calibre_MetadataFromFilename1.PNG
Views:	430
Size:	54.5 KB
ID:	209591   Click image for larger version

Name:	calibre_MetadataFromFilename2.PNG
Views:	409
Size:	61.7 KB
ID:	209592   Click image for larger version

Name:	calibre_MetadataFromFilename3.PNG
Views:	387
Size:	194.8 KB
ID:	209593   Click image for larger version

Name:	calibre_MetadataFromFilename4.PNG
Views:	386
Size:	13.0 KB
ID:	209594  
Attached Files
File Type: pdf El tutorial de python - Guido van rossum (2017).pdf (31.2 KB, 373 views)
File Type: epub Learn Python The Hard Way - Zed A. Shaw (2011).epub (1.8 KB, 408 views)
Divingduck is offline   Reply With Quote