Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-17-2016, 08:16 PM   #886
BetterRed
null operator
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: 17,691
Karma: 20473671
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@ddjohn - you probably don't need a plugin.

You you can add any file type to calibre, but for non ebook file types -- i.e. not in Preferences->Behaviour->Use internal view for -- there is limited functionality - no conversion, no editor, no metadata download etc.

You can only have one file of any type in a 'book' - so only one .VP3, only one .PES, etc.

If the file type has an OS file association, then calibre will use it as a 'viewer'. Within calibre you can associate other programs with a file type, in this recent post 284, you can see I have added Balabolka, Sigil and WinRAR to EPUBS via calibre's Open With option, and in that example you can see I have a .ONE file (from MS OneNote) for the book.

You may have to add the cover images manually, which is easy enough, just drop an image file into the Book Details sidebar on the right (bottom if configured thus)

If all the files for a given pattern are in separate folders you can use one of the Add Books from directories options.

I have calibre.exe in my Windows Send To folder, to add a book(s) I select the file (e.g. an FLV) in File Manager, navigate to Send To->calibre in Windows context menu and hit enter -- I always edit the file name to be 'Author - Title' to match my Add Books template.

If you're mouse centric you can drag and drop the file(s) into the book list. To add a file to an existing book I drag and drop the file into the Book Details sidebar - file names are irrelevant in this instance.

BR
BetterRed is offline   Reply With Quote
Old 07-17-2016, 11:45 PM   #887
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 23,231
Karma: 41975128
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@ddjohn: BetterRed has covered a lot of what is needed. Plugins are only needed if you want to be able to pull metadata from the files. If the metadata needed, "author" and "title", are in the filename when you add them, then calibre can get this. But, if you need to read the file contents, a metadata reader plugin is needed for each type. These aren't that hard to write, but it needs knowledge of the file formats to find the metadata. Plus some knowledge of Python to write the code.

To me, the biggest problem will be finding someone who is interested in doing this. Your best bet is to find someone who wants the function and does some coding. Or someone who has a spouse with the skills. If you can find someone, then we can help with pointers and sample code.
davidfor is offline   Reply With Quote
Old 07-19-2016, 06:04 AM   #888
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,150
Karma: 1404167
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Quote:
Originally Posted by ddjohn View Post
I find a need to catalog design files that are not traditional document file formats. These files are for machine embroidery designs. Common file format extensions are .VP3, .VIP, .HUS, .PEC, .PES, .PCS, .xxx, .SEW, .JEF, .EXP, .10*, .DST, .SHV, .DHV
The problem with this formats is, that not all formats have metadata you can simply extract. In addition there are different versions of theses formats with different capabilities. Today you need to have additional external programs to extract theses data like Wilcom TrueSizer, Bernina Artlink, Embird Iconizer SandsComputing SewIconz etc.
Divingduck is offline   Reply With Quote
Old 07-20-2016, 07:55 AM   #889
compurandom
Guru
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 698
Karma: 294342
Join Date: Jun 2015
Device: kobo aura h2o, kobo forma
What would I need to do (to write a plugin) to extract metadata not currently supported into custom columns for book formats that are already supported by calibre?
compurandom is offline   Reply With Quote
Old 07-20-2016, 11:23 AM   #890
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 23,231
Karma: 41975128
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by compurandom View Post
What would I need to do (to write a plugin) to extract metadata not currently supported into custom columns for book formats that are already supported by calibre?
The metadata source plugins can only update certain columns. That means you have to write all the metadata update and page fetching code yourself. There are some sample that you can look at. The Goodreads frating plugin fetches the rating from Goodreads. The Goodreads Sync also fetches some information, but that uses the API for some of the function.
davidfor is offline   Reply With Quote
Old 07-21-2016, 08:32 AM   #891
compurandom
Guru
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 698
Karma: 294342
Join Date: Jun 2015
Device: kobo aura h2o, kobo forma
Quote:
Originally Posted by davidfor View Post
The metadata source plugins can only update certain columns. That means you have to write all the metadata update and page fetching code yourself. There are some sample that you can look at. The Goodreads frating plugin fetches the rating from Goodreads. The Goodreads Sync also fetches some information, but that uses the API for some of the function.
Actually, I'm looking to add metadata that is in pdf documents that isn't currently supported. Specifically, I want to know if the document has a TOC or not, so that I can look at my library and know which documents I might need to add a TOC.

I already know how to extract this information, at least by hand and from command line.
compurandom is offline   Reply With Quote
Old 07-21-2016, 11:06 AM   #892
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 40,169
Karma: 18000000
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can create a PDF metadata reader plugin that simply adds a tag "has_toc" to the list of tags returned by the builtin pdf metadata reading code.
kovidgoyal is offline   Reply With Quote
Old 07-21-2016, 12:11 PM   #893
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 26,905
Karma: 41870062
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
Lightbulb Device Font Library Management

Calibre support embedding fonts, but this seems redundant (and a space hog) for many devices that have the provision to use Device (system) fonts

(only provide support for CSS, Font declarations)

When sending to device:
1) Query CSS for @Font callouts
2) Add the FONT (if needed) to Device Font folder <move from the book?>
3) adjust the CSS font SRC as needed
4) remove the embedded font
send skinnier book
theducks is offline   Reply With Quote
Old 07-21-2016, 09:29 PM   #894
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 23,231
Karma: 41975128
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by theducks View Post
Calibre support embedding fonts, but this seems redundant (and a space hog) for many devices that have the provision to use Device (system) fonts

(only provide support for CSS, Font declarations)

When sending to device:
1) Query CSS for @Font callouts
2) Add the FONT (if needed) to Device Font folder <move from the book?>
3) adjust the CSS font SRC as needed
4) remove the embedded font
send skinnier book
I could see something like this working in a few different ways. One is within the library in the way Polish Books or convert work. Or as part of the Modify ePub plugin. That already has font removal, but I don't know if it fixes references.

An alternative is during send-to-device. The books are already being modified to update the metadata and covers. Stripping the fonts could be done there. It would need support in the device drivers to report the fonts on the device and if anything special is needed to fix references. The advantage of this is that it doesn't change the in-library copy, so that if you use multiple devices you get a copy that is appropriate for each.

Another way would be a plugin that wraps send-to-device. That could prepare the book and then call send-to-device to send the modified version rather than the in-library copy.

Lastly, a driver could be written that subclasses the existing drivers. The KoboTouchExtended driver already does this and it would be "easy" to add this function to that driver. The disadvantage of this is that an extra driver needs to be written for each device that needs the support.

I know the first and last would be doable. I'm not sure about the other two. The second is the way I'd prefer to do it, but is probably the most work.

Oh, one thing I probably wouldn't do is to automatically send the fonts to the device. I would probably write it to check the font is on the device, and if it is strip it from the book. If the font isn't there, I'd leave it alone. A danger of sending the font is if subsetting has been done. You might end up with a font on the device that doesn't support all the characters in all the books.
davidfor is offline   Reply With Quote
Old 07-21-2016, 10:56 PM   #895
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 26,905
Karma: 41870062
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by davidfor View Post
I could see something like this working in a few different ways. One is within the library in the way Polish Books or convert work. Or as part of the Modify ePub plugin. That already has font removal, but I don't know if it fixes references.

An alternative is during send-to-device. The books are already being modified to update the metadata and covers. Stripping the fonts could be done there. It would need support in the device drivers to report the fonts on the device and if anything special is needed to fix references. The advantage of this is that it doesn't change the in-library copy, so that if you use multiple devices you get a copy that is appropriate for each.

Another way would be a plugin that wraps send-to-device. That could prepare the book and then call send-to-device to send the modified version rather than the in-library copy.

Lastly, a driver could be written that subclasses the existing drivers. The KoboTouchExtended driver already does this and it would be "easy" to add this function to that driver. The disadvantage of this is that an extra driver needs to be written for each device that needs the support.

I know the first and last would be doable. I'm not sure about the other two. The second is the way I'd prefer to do it, but is probably the most work.

Oh, one thing I probably wouldn't do is to automatically send the fonts to the device. I would probably write it to check the font is on the device, and if it is strip it from the book. If the font isn't there, I'd leave it alone. A danger of sending the font is if subsetting has been done. You might end up with a font on the device that doesn't support all the characters in all the books.
Not as simple, when you get down to it.

Great point about Subsetting ( I don't do it...but!)
Maybe get from the same place Calibre would use (system folders)
I don't know how far Remove Embedded goes either. I only remove all references to Charis (manually). I like display fonts for limited use

Maybe a sideways use of The Quality check PI (selected books) to find a list of fonts called for,
then collect those from the system and
send them to the device (\fonts\ in my RMSDK case) if needed, then cleanup those books
theducks is offline   Reply With Quote
Old 07-22-2016, 02:44 AM   #896
ddjohn
Enthusiast
ddjohn began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Oct 2010
Device: Palm TX; Pandigital-7W
BetterRed, thanks for this information. I'm still on an older version of Calibre, would I need to update to a more recent version to be able to add non-document files? The last time I tried, many years ago, 'add books' did not see the files I was hoping to add.
ddjohn is offline   Reply With Quote
Old 07-22-2016, 02:53 AM   #897
ddjohn
Enthusiast
ddjohn began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Oct 2010
Device: Palm TX; Pandigital-7W
Quote:
Originally Posted by Divingduck View Post
The problem with this formats is, that not all formats have metadata you can simply extract. In addition there are different versions of theses formats with different capabilities. Today you need to have additional external programs to extract theses data like Wilcom TrueSizer, Bernina Artlink, Embird Iconizer SandsComputing SewIconz etc.
DivingDuck, I'm impressed that you are familiar with these files and potential softwares. I currently have HV Premier+ (just their complimentary package) and SandS Computing SWP. The HV Premier+ provides similar funtionality to the Iconizer, giving meta data regarding dimensions, stitch counts, thread brand and color, even how much thread is required per color. It would be incredible to pull any of that meta data into Calibre. I'll focus on what Better Read has covered, before leaping ahead to the metadata possabilities.

Thank you to all of you for your help.
ddjohn is offline   Reply With Quote
Old 07-22-2016, 04:22 AM   #898
BetterRed
null operator
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: 17,691
Karma: 20473671
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by ddjohn View Post
I'll focus on what Better Read has covered, before leaping ahead to the metadata possibilities.
Good thinking, that will enable you to explore the custom columns you want/need to have before taking the next step of automating the metadata loading via a Metadata Source plugin.

I also suggest you have a look at the Import List PI which can be used to update metadata for existing books and/or add new books. A metadata input PI would probably be better, but if the data is available as a CSV then the Import List PI may get you off the ground.

BR
BetterRed is offline   Reply With Quote
Old 07-22-2016, 11:40 AM   #899
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,420
Karma: 85000000
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Add Books opens a standard Windows file dialog, with a default filter to only show known ebook types... but you can switch the filter to All Files.

You can also use the Add Empty Book option to create the metadata entry and then add the files by dragging-and-dropping them onto the Book Details panel.
eschwartz is offline   Reply With Quote
Old 07-22-2016, 08:18 PM   #900
BetterRed
null operator
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: 17,691
Karma: 20473671
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
Add Books opens a standard Windows file dialog, with a default filter to only show known ebook types... but you can switch the filter to All Files.

You can also use the Add Empty Book option to create the metadata entry and then add the files by dragging-and-dropping them onto the Book Details panel.


Quote:
Originally Posted by ddjohn View Post
BetterRed, thanks for this information. I'm still on an older version of Calibre, would I need to update to a more recent version to be able to add non-document files? The last time I tried, many years ago, 'add books' did not see the files I was hoping to add.
The ability to drag and drop any file type into Book details is a fairly recent enhancement, previously it was limited to ebook types.

The main reason I use Windows Send To was to obviate the need to spin the filter in Add Books. Having calibre in Send To suits me very well; given that my primary mode of using the PC is from my file manager via the context menu.

BR
BetterRed is offline   Reply With Quote
Reply

Tags
epub fix, epub-fix, google books, metadata calibre title, pdf, pdf and calibre, plugin development


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-505 Any ideas what this might be? Neupy Sony Reader 4 07-03-2012 08:19 AM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 01:11 PM
Ideas? mike_bike_kite Which one should I buy? 10 06-13-2010 04:37 PM
Ideas F1Wild Amazon Kindle 4 07-10-2009 07:01 AM


All times are GMT -4. The time now is 09:03 PM.


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