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 03-08-2022, 06:33 AM   #1
VolkerBunge
Junior Member
VolkerBunge began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2022
Device: none
Massen-Import

Hallo zusammen,

Wie kann ich hunderte PDF Dateien so importieren, dass der Dateiname als Bezeichnung eingestellt wird?

Bsp. Eisenbahn Journal - Monatsheft - 1982 01 Coverlok BR 65 1073.pdf

Kann man pro Import den Autor und Verlag fest einstellen (bzw. sonst noch wichtige Werte)?

Oder kann man die metadata.opf irgendwie selbst erstellen und die Dateien/Ordner dann einfach ins Calibre-Verzeichnis kopieren?

Habe meine PDF-Dateien auch in einer Access-DB aufgelistet und könnte somit die opf-Datei ggf. erstellen lassen.

Wäre über jeden Tipp dankbar, da das manuelle Nachbearbeiten bei der Masse keinen Spass macht.

Vielen Dank

Volker

Last edited by VolkerBunge; 03-08-2022 at 06:36 AM.
VolkerBunge is offline   Reply With Quote
Old 03-19-2022, 05:47 PM   #2
VolkerBunge
Junior Member
VolkerBunge began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2022
Device: none
Question

Hallo zusammen,

ich hole den Beitrag noch einmal nach oben und habe noch ein paar Fragen zu meinem Thema.

1. In der OPF-Datei gibt es ja eine ID-Zeile. Braucht die Calibre oder kann man diese auch nachträglich noch erstellen? Ich möchte ja ggf. die OPF-Dateien selbst über meine Access-Datenbank erstellen und müsste sonst wissen, wie man diese ID selbst erstellen kann.

2. Kann man nachträglich über alle Dateien die Coverdatei der ersten Seite erstellen? Der Befehl/die Möglichkeit sollte somit nur einmal gestartet werden und alle PDF-Dateien werden dann durchlaufen und die Cover.jpg wird automatisch von der ersten Seite erstellt.



3. Dann noch eine Frage: Was steht in der DB-Datei eigentlich alles drin und kann man diese ggf. in Access einbinden?

Wenn es hierfür eine Lösung geben würde, dann wäre das Super

English byGoogle
Hello, everyone,

I'm bringing the post up again and have a few more questions on my topic.

1. There is an ID line in the OPF file. Does caliber need it or can it be created later? If necessary, I would like to create the OPF files myself via my Access database and would otherwise need to know how to create this ID myself.

2. Is it possible to subsequently create the cover file for the first page using all files? The command/option should therefore only be started once and all PDF files will then be run through and the Cover.jpg will be automatically created from the first page.

3. Then another question: What is actually in the DB file and can it be integrated into Access if necessary?

If there was a solution to this, that would be great

Last edited by theducks; 03-19-2022 at 08:05 PM. Reason: translated
VolkerBunge is offline   Reply With Quote
Advert
Old 03-25-2022, 09:08 AM   #3
feuille
Connoisseur
feuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enough
 
Posts: 62
Karma: 666
Join Date: May 2020
Location: Germany
Device: android smartphone + tablet
Teillösung

Ich könnte auf die Schnelle zumindest eine Teillösung anbieten:

Man kann in den Calibre-Einstellungen steuern, ob der Dateiname oder ob die Metadaten des Formats als Metadatenquelle verwendet werden sollen:

Einstellungen -> Importieren/Exportieren -> Hinzufügen von Büchern -> Registerkarte "Einlesen von Metadaten" -> Kontrollkästchen "Metadaten aus Dateiinhalt statt Dateinamen lesen" nicht anhaken.

Für eine präzise Steuerung der Extraktion der Metadaten aus dem Dateinamen (Titel, Autoren, Serie, Verlag, ...) kann dann ein Regulärer Ausdruck angegeben werden.

Der würde für "Eisenbahn Journal - Monatsheft - 1982 01 Coverlok BR 65 1073.pdf" z. B. lauten:

(?P<series>(Eisenbahn Journal) \- (Monatsheft)) \- (?P<published>([0-9]{4})) ([0-9]{2}) (?P<title>.+)

Das ergibt dann für "Eisenbahn Journal - Monatsheft - 1982 01 Coverlok BR 65 1073.pdf":

title = "Coverlok BR 65 1073"
authors = "unbekannt"
series = "Eisenbahn Journal - Monatsheft"
published = "1982-03-15"

Vielleicht kann man noch etwas aus dem Regex rauskitzeln (Serien-Index aus "Jahr.Monat" oder Erscheinungsdatum aus "01.Monat.Jahr"), habe ich jetzt nicht weiter verfolgt. Der wird in calibre/src/calibre/gui2/widgets.py einfach in ein re.compile geschmissen und das Ergebnis (mit den benannten Referenzen, die genau den Feldnamen entpsrechen) in die Struktur "mi", die Quelle der Metadaten, gepackt.

Weitere Informationen über Reguläre Ausdrücke in Calibre: https://manual.calibre-ebook.com/de/regexp.html

Die konstanten Daten wie Verlag, Sprache etc. könnte man dann über Metadaten-Bearbeiten erledigen: Betreffende Bücher markieren -> Rechtsklick -> Metadaten bearbeiten -> Metadaten gleichzeitig bearbeiten -> Register Gundmetadaten.

Man könnte auch mit Suchen & Ersetzen (dem 3. Register in diesem Dialog) noch etwas nacharbeiten, z. B. "Eisenbahn Journal - Monatsheft" in "Eisenbahn Journal.Monatsheft" ändern, dann hat man eine Serie mit Unterserie, die Calibre verwalten kann.

Information über die DB-Struktur findet man im Quellcode: https://github.com/kovidgoyal/calibre und im Developer-Forum..

Von einer Manipulation der .opf-Dateien nach dem Motto "von hinten durch die Brust ins Auge" würde ich abraten.

Viel Erfolg!

Google Translated
Translation types
Text translation
Source text
2,212 / 5,000
Translation results
I could offer at least a partial solution:

You can control in the caliber settings whether the filename or the metadata of the format should be used as the metadata source:

Settings -> Import/Export -> Add books -> Tab "Read metadata" -> uncheck "Read metadata from file content instead of file name" check box.

A regular expression can then be specified for precise control of the extraction of metadata from the file name (title, authors, series, publisher, ...).

The would for "Railway Journal - Monthly - 1982 01 Coverlok BR 65 1073.pdf" e.g. B. are:

(?P<series>(Eisenbahn Journal) \- (Monthly)) \- (?P<published>([0-9]{4})) ([0-9]{2}) (?P<title >.+)

This results in "Eisenbahn Journal - Jahresheft - 1982 01 Coverlok BR 65 1073.pdf":

title = "Cover locomotive BR 65 1073"
authors = "unknown"
series = "Railway Journal - Monthly"
published = "1982-03-15"

Maybe you can tease out something else from the regex (series index from "year.month" or release date from "01.month.year"), I haven't pursued it any further now. This is simply thrown into a re.compile in calibre/src/calibre/gui2/widgets.py and the result (with the named references that exactly match the field names) is packed into the "mi" structure, the source of the metadata.

More information about regular expressions in caliber: https://manual.calibre-ebook.com/en/regexp.html

The constant data such as publisher, language, etc. could then be edited via Metadata: Mark the relevant books -> Right-click -> Edit metadata -> Edit metadata simultaneously -> Register basic metadata.

You could also rework something with Find & Replace (the 3rd tab in this dialog), e.g. For example, change "Railway Journal - Monthly" to "Railway Journal.Monthly" and you'll have a series with sub-series that caliber can manage.

Information about the DB structure can be found in the source code: https://github.com/kovidgoyal/calibre and in the developer forum..

I would advise against manipulating the .opf files along the lines of "from behind through the chest into the eye".

I wish you success!

Last edited by theducks; 03-25-2022 at 10:27 AM. Reason: Translated from German
feuille is offline   Reply With Quote
Old 03-25-2022, 01:53 PM   #4
feuille
Connoisseur
feuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enough
 
Posts: 62
Karma: 666
Join Date: May 2020
Location: Germany
Device: android smartphone + tablet
Massen-Import

Und, natürlich könnte man ein Plugin schreiben, das nach dem Import weitere Metadaten aus der Access Datenbank zieht.

Das Plugin "Import List" (https://www.mobileread.com/forums/sh...d.php?t=187831) würde ich mir auch anschauen.

---

And, of course, you could write a plugin that pulls additional metadata from the Access database after the import.

I would also look at the "Import List" plugin (https://www.mobileread.com/forums/sh...d.php?t=187831).

Last edited by feuille; 03-26-2022 at 05:38 AM.
feuille is offline   Reply With Quote
Reply

Tags
massen-import


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Author And Title From Filename & Import Other Tags And Cover From File DazJWood Library Management 25 10-06-2021 10:18 AM
Export/Import all Calibre data - import error IanKBrown Calibre 5 02-15-2017 08:32 PM
Import on Filename changes mid import due to book error Vortex Calibre 3 12-05-2014 11:49 AM
Other Non-Fiction Le Bon, Gustave: Psychologie der Massen. V1.1 [German] 5.11.2013 brucewelch ePub Books 1 11-05-2013 12:01 PM
Import failed Error:404 when attempting to import from Calibre to Stanza dvond Apple Devices 0 05-13-2011 03:00 PM


All times are GMT -4. The time now is 05:06 AM.


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