Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-27-2023, 01:22 PM   #1
mike.katina
Enthusiast
mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.
 
Posts: 35
Karma: 2135976
Join Date: Sep 2011
Location: Eastern Canada
Device: Samsung Galaxy Tab S2
Thumbs down Automated Regex file sorting using file name

Hello everyone, yes I don't post much as most questions are readily answered using simple searches. But I have been working on this for over a week with minimal success. I barely understand Regex as I'm old and such (yeah sad excuse).
What I need to do is to find a string that will properly enter the data in the proper columns from file name.

my Fav. file naming theme layout is:

my name [series 001] title.pdf
my name [series 002] title.pdf
my name [series 003] title.pdf
my name [series 001] title.pdf

I was looking at something like this but am unable to make it work under "saving books to disk":
Code:
{authors} {series} {series_index>[0-9.]++} {title}
same as sending books to device:
Code:
{authors} {series} {series_index>[0-9.]++} {title}
There is also the holy grail that I found as well for Setting a Custom Regular Expression for Adding Books to Calibre:
within there is this monster regex string...
Code:
^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?(\[?(?P<series>[^0-9\-]+) (- )?(?P<series_index>[0-9.]+)\]?\s*-\s*)?(?P<title>.+)
I don't understand it but it does seem to work most of the time. Would it be possible to edit it so it also works for my situation

also would be really nice when I save to disk (S), calibre already saves to the last location which is the desired effect but would be even smoother for me if calibre would embed metadata for the selected files at the same time, save only the main format without the cover page and .opf file, all into a single folder with the files named as per above preference:
{authors} [{[series]} {series_index>[0-9.]++} {title}.pdf

oh yes, on another note, for the numerical pad, I like to have 3 digits...
example:

Dr Doolittle [Pegasus 001] feeding time.pdf
Dr Doolittle [Pegasus 002] feeding time.pdf
Dr Doolittle [Pegasus 003] feeding time.pdf
Dr Doolittle [Dallas 001] feeding time.pdf
Dr Doolittle [Dallas 001] feeding time.pdf
Dr Doolittle [Princess Leah 001] feeding time.pdf
mike.katina is offline   Reply With Quote
Old 10-28-2023, 03:02 AM   #2
Capricorn
Belgian Pommes Frites
Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.
 
Posts: 122
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
When I send books from Calibre to my device (Pocketbook Touch HD), I use:
{author_sort}/{title}--{series_index} {series}

This has now worked well for several years.
Capricorn is offline   Reply With Quote
Advert
Old 11-01-2023, 09:31 AM   #3
mike.katina
Enthusiast
mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.mike.katina ought to be getting tired of karma fortunes by now.
 
Posts: 35
Karma: 2135976
Join Date: Sep 2011
Location: Eastern Canada
Device: Samsung Galaxy Tab S2
That is great layout, thanks.

oh and maybe I should of being more elaborate, my horse files are pdf's in my galaxy s22 ultra and my books are in my kindle paperwhite signature, love the display.

Last edited by mike.katina; 11-01-2023 at 09:34 AM.
mike.katina is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ugh....file sorting Amanda5177 Library Management 2 12-13-2018 10:47 AM
Sorting library by file date? Phssthpok Library Management 16 05-09-2015 01:36 PM
Glo Glo: Sorting by File Size - Help please! Sxygrrl Kobo Reader 4 07-09-2014 07:00 PM
File sorting, by date cod123 Onyx Boox 1 09-06-2013 04:09 AM
Help with Regex setup for file imports gardentools Library Management 2 08-12-2011 10:15 AM


All times are GMT -4. The time now is 10:23 AM.


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