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 07-01-2024, 04:51 PM   #1
CheapSweetLife
Junior Member
CheapSweetLife began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2023
Device: none
Question I'm trying to get some information from pdf file names

Here is what I started with: First_for_Women_-_April_8_2024.pdf I removed all the _ from the current file names and switched them with spaces and I added some numbers for the dates. So now I have First for Women - April 08 2024.pdf. I have changed all of the files for First for Women magazines there are over 100.

So what I'm trying to do is get all of the main magazines into there own folders such as follows. First for Women which is a folder name for the main magazines. And then there will be folders titled after years. Like 2017, 2018, 2019, 2020, 2021, 2022, 2023, and 2024. And I will have the organized by year.

I plan to do the same with other magazines based on magazines by folder as well.

So here is what I want to do I want to take the date from the file name and use them for tags as well as metadata for dates as well. I have month based on spelling such as April then there is a space with a date with double digits even for something like 3 its 03 and then I also have year as a 4 digit number. How do I take the date and keep it from file name and can I use the full dates. Or should it be changed to something like April,2024 or 04,2024. How should I do this.
CheapSweetLife is offline   Reply With Quote
Old 07-01-2024, 09:08 PM   #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: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Please read the following and the links therein ==>> Want to change folder structure or file names in the Calibre library?

In essence the structure of the library subfolders is based on Author [first] and Title and the actual names of the folders and files are algorithmically determined.

BR
BetterRed is offline   Reply With Quote
Old 07-14-2024, 01:24 PM   #3
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by BetterRed View Post
Please read the following and the links therein ==>> Want to change folder structure or file names in the Calibre library?

In essence the structure of the library subfolders is based on Author [first] and Title and the actual names of the folders and files are algorithmically determined.

BR
I believe OP is asking how to parse the information and create folders in metadata, not change the storage location.
kjdavies is offline   Reply With Quote
Old 07-14-2024, 01:36 PM   #4
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by CheapSweetLife View Post
Here is what I started with: First_for_Women_-_April_8_2024.pdf I removed all the _ from the current file names and switched them with spaces and I added some numbers for the dates. So now I have First for Women - April 08 2024.pdf. I have changed all of the files for First for Women magazines there are over 100.

So what I'm trying to do is get all of the main magazines into there own folders such as follows. First for Women which is a folder name for the main magazines. And then there will be folders titled after years. Like 2017, 2018, 2019, 2020, 2021, 2022, 2023, and 2024. And I will have the organized by year.

I plan to do the same with other magazines based on magazines by folder as well.

So here is what I want to do I want to take the date from the file name and use them for tags as well as metadata for dates as well. I have month based on spelling such as April then there is a space with a date with double digits even for something like 3 its 03 and then I also have year as a 4 digit number. How do I take the date and keep it from file name and can I use the full dates. Or should it be changed to something like April,2024 or 04,2024. How should I do this.
Hi CSL,

As BetterRed pointed out, calibre's file locations are managed by calibre. You can't change them.

What you can do, though, and what I think you're trying to do, is parse the dates out of the file names (on load would be best/easiest, but you can get at them after the fact also) and put them in another field. The book's 'date' field is not a bad choice.

(BTW, you don't need to remove underscores from file names, calibre does that already on loading.)

In Preferences -> Adding Books, the regular expression

Code:
(?P<title>.+) - (?P<published>[^_]+)
will extract

Code:
Title: First for Women
Published: 2024-04-08
(yes, it parsed 'April 8 2024' and turned it into 2024-04-08).

Then when you load files these two columns will be automatically extracted and stored. You might later want to go back and edit the titles to do things such as
  • Append YYYY-MM to the title, so they're not all the same.
  • Assign the title as the Series (I'd consider using YYYY.MM as the series_index... might need formatting to force the decimal value to be two digits, I haven't checked)
  • Add a custom column (possibly calculated) to use YYYY.MM to group them into folders... or just use YYYY because if it's a monthly magazine you'll have only twelve entries per year anyway.

If you want to export the files and have them write out to custom paths, that also is something you can do... but I won't got into that right now.
kjdavies is offline   Reply With Quote
Reply

Tags
dates, metadata


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF Files; Metadata & File Names; Adding Physical Book Info Thunder_Struck Calibre 4 02-14-2019 12:16 AM
File names in File explorer vvilmos Onyx Boox 5 10-05-2012 08:40 AM
Adobe acrobat PDF file names psionx Sony Reader 6 10-10-2009 09:02 PM
PDF File Names andyafro Workshop 1 10-31-2008 11:58 PM
File System Information Adam B. iRex 0 10-29-2008 09:46 AM


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


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