Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2019, 06:52 AM   #1
DarkGhosty
Junior Member
DarkGhosty began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2019
Device: asus zenfone 4
Help with regex expression for adding Doujins

I used calibre to manage my doujinshi and have set up custom columns for this as well such as Comiket and circle. I want to use regex to import metadata from the title which is standardized into the correct fields when importing the books.

I want to take a name like this
(C87) [Abradeli Kami (Bobobo)] Gyan☆Colle (Gundam Build Fighters Try)
which translates to
(comiket #) [Group (Author)] Title (Parody)

I have custom columns set up for parody, group, and comiket so I would like a regex that outputs the title, author, comiket (number only ignoring the C), group, and parody.

This is the regeix I have so far, I dont know how to pull the title out yet, nor do I know how to link the groups in the right order. Sorry I suck a regex. Also I'm not sure you can import metadata from the title into a custom column... is there a way to do this? Thanks!

(?P<title>() (?P<author>\[[^]]+?\(([^(]+)\)\]) (?P<comiket>[0-9]+) (?P<group>\[([^\[\]()]+)) (?P<parody>(?:\([^)]*\)[^(]*){2}\(([^)]*)\))
DarkGhosty is offline   Reply With Quote
Old 09-13-2019, 07:17 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 22,031
Karma: 30277294
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DarkGhosty View Post
I used calibre to manage my doujinshi and have set up custom columns for this as well such as Comiket and circle. I want to use regex to import metadata from the title which is standardized into the correct fields when importing the books.

I want to take a name like this
(C87) [Abradeli Kami (Bobobo)] Gyan☆Colle (Gundam Build Fighters Try)
which translates to
(comiket #) [Group (Author)] Title (Parody)

I have custom columns set up for parody, group, and comiket so I would like a regex that outputs the title, author, comiket (number only ignoring the C), group, and parody.

This is the regeix I have so far, I dont know how to pull the title out yet, nor do I know how to link the groups in the right order. Sorry I suck a regex. Also I'm not sure you can import metadata from the title into a custom column... is there a way to do this?Thanks!

(?P<title>() (?P<author>\[[^]]+?\(([^(]+)\)\]) (?P<comiket>[0-9]+) (?P<group>\[([^\[\]()]+)) (?P<parody>(?:\([^)]*\)[^(]*){2}\(([^)]*)\))
The GetFileName FileType plugin might be of interest ==>> Index of plugins

At add time it will put the file name and/or path into a designated custom column. From there you can use the Bulk metadata edit->Search and replace tool to extract items from the file name strings and and put them into designated custom columns.

BR
BetterRed is online now   Reply With Quote
Advert
Old 09-13-2019, 07:26 AM   #3
DarkGhosty
Junior Member
DarkGhosty began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2019
Device: asus zenfone 4
Quote:
Originally Posted by BetterRed View Post
The GetFileName FileType plugin might be of interest ==>> Index of plugins

At add time it will put the file name and/or path into a designated custom column. From there you can use the Bulk metadata edit->Search and replace tool to extract items from the file name strings and and put them into designated custom columns.

BR
Ok I will check it out, meanwhile I think I have a closer regex expression that I want, but seems like its still not working in calibre...
https://regex101.com/r/CZdaYm/7
DarkGhosty is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with a regex expression MrMcGyver Library Management 3 03-11-2015 05:00 PM
Help with regex expression for words in all caps bfollowell Sigil 9 01-20-2012 06:11 PM
Help with a Regex Expression? adept22 Library Management 2 03-16-2011 07:50 AM
help with regex expression daesdaemar Workshop 4 02-19-2010 08:38 AM
Need help with regex expression daesdaemar Workshop 18 02-07-2009 04:48 PM


All times are GMT -4. The time now is 07:18 PM.


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