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 06-05-2014, 09:09 PM   #121
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,317
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
I'm not sure what you mean--when splitting an epub, you are creating new books. Naturally, the metadata gets updated.

But you can control which metadata is copied, and prevent the cover from being copied, in the EpubSplit configuration.
JimmXinu is offline   Reply With Quote
Old 06-06-2014, 08:05 AM   #122
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by JimmXinu View Post
I'm not sure what you mean--when splitting an epub, you are creating new books. Naturally, the metadata gets updated.

But you can control which metadata is copied, and prevent the cover from being copied, in the EpubSplit configuration.
I did uncheck all the fields in the plugin and it seemed to work except, when the plugin creates the OPF, it does not add proper line endings so the OPF entries are just one long line.

Also, what I'd like is the top of the original OPF copied down to the </metadata> copied over as the top of the metadata. This gives the original info which I can then change as I want. Calibre will have done nothing to monkey about with the code.

Last edited by JSWolf; 06-06-2014 at 08:14 AM.
JSWolf is offline   Reply With Quote
Advert
Old 06-06-2014, 11:33 AM   #123
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,317
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by JSWolf View Post
I did uncheck all the fields in the plugin and it seemed to work except, when the plugin creates the OPF, it does not add proper line endings so the OPF entries are just one long line.

Also, what I'd like is the top of the original OPF copied down to the </metadata> copied over as the top of the metadata. This gives the original info which I can then change as I want. Calibre will have done nothing to monkey about with the code.
Is there anything actually broken or inaccurate in the OPF generated?

Because it sounds like you are just being extremely particular about the appearance and format of a meta data file that isn't intended for users to be viewing directly anyway...
JimmXinu is offline   Reply With Quote
Old 06-06-2014, 05:02 PM   #124
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by JimmXinu View Post
Is there anything actually broken or inaccurate in the OPF generated?

Because it sounds like you are just being extremely particular about the appearance and format of a meta data file that isn't intended for users to be viewing directly anyway...
Take a look at this OPF file. It's a mess because there are no proper line endings.

Code:
<?xml version="1.0" encoding="utf-8"?><package unique-identifier="epubsplit-id" version="2.0" xmlns="http://www.idpf.org/2007/opf"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf"><dc:identifier id="epubsplit-id">epubsplit-uid-1402088581</dc:identifier><dc:title>Spenser 05 - The Judas Goat Split</dc:title><dc:creator opf:role="aut">Robert B. Parker</dc:creator><dc:contributor opf:role="bkp">epubsplit</dc:contributor><dc:rights>Copyrights as per source stories</dc:rights><dc:language>eng</dc:language><dc:description>&lt;div&gt;&lt;p class=&quot;description&quot;&gt;Split from:&lt;/p&gt;&lt;p class=&quot;description&quot;&gt;&lt;/p&gt;&lt;p class=&quot;description&quot;&gt;Spenser has gone to London—and not to see the Queen. He's gone to track down a bunch of bombers who've blown away his client's wife and kids. His job is to catch them. Or kill them. His client isn't choosy.&lt;br&gt;&lt;br&gt;But there are nine killers to one Spenser—long odds. Hawk helps balance the equation. The rest depends on a wild plan. Spenser will get one of the terrorists to play Judas Goat—to lead him to others. Trouble is, he hasn't counted on her being very blond, very beautiful and very dangerous.&lt;/p&gt;&lt;/div&gt;</dc:description><meta name="cover" content="coverimageid"/></metadata><manifest><item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml"/><item href="cover.jpg" id="coverimageid" media-type="image/jpeg"/><item href="cover.xhtml" id="cover" media-type="application/xhtml+xml"/><item href="OEBPS/Park_9780307569660_epub_cvi_r1.htm" id="a0" media-type="application/xhtml+xml"/><item href="OEBPS/Park_9780307569660_epub_adc_r1.htm" id="a1" media-type="application/xhtml+xml"/><item href="OEBPS/Park_9780307569660_epub_tp_r1.htm" id="a2" media-type="application/xhtml+xml"/><item href="OEBPS/Park_9780307569660_epub_c01_r1.htm" id="a3" media-type="application/xhtml+xml"/><item href="OEBPS/Park_9780307569660_epub_c02_r1.htm" id="a4" media-type="application/xhtml+xml"/><item href="OEBPS/Park_9780307569660_epub_css_r1.css" id="a5" media-type="text/css"/><item href="OEBPS/images/Park_9780307569660_epub_tp_r1.jpg" id="a6" media-type="image/jpeg"/><item href="OEBPS/images/Park_9780307569660_epub_cvi_r1.jpg" id="a7" media-type="image/jpeg"/></manifest><spine toc="ncx"><itemref idref="cover" linear="yes"/><itemref idref="a0" linear="yes"/><itemref idref="a1" linear="yes"/><itemref idref="a2" linear="yes"/><itemref idref="a3" linear="yes"/><itemref idref="a4" linear="yes"/></spine><guide><reference href="cover.xhtml" title="Cover" type="cover"/></guide></package>
As you saw in the code box, the OPF has no line endings and thus, I have to do the work of manually adding them in.

Last edited by JSWolf; 06-06-2014 at 05:06 PM.
JSWolf is offline   Reply With Quote
Old 06-06-2014, 05:04 PM   #125
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
The Beautify file(s) option in the calibre Editor will tidy up the opf (and/or any other file) for missing line ends.
jackie_w is offline   Reply With Quote
Advert
Old 06-06-2014, 05:07 PM   #126
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by jackie_w View Post
The Beautify file(s) option in the calibre Editor will tidy up the opf (and/or any other file) for missing line ends.
Sorry, doesn't work. Then I end up with XML files that I have to edit because of the new formatting. Yes, sometimes that helps, but not always and not in most cases.

All we need is line endings put in the proper places in the new OPF. Unchecking all of the fields in the plugin options solved the first problem and now it's led to a new problem that once solved it's good to go.
JSWolf is offline   Reply With Quote
Old 06-06-2014, 06:24 PM   #127
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,317
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Attached is a test version that uses .toprettyxml(indent=' '...) instead of just .toxml() for the content.opf and toc.ncx files.

I honestly don't see the existing output as problem--it's a machine written file for machines to read. But I'm willing to change to pretty print output as long as it doesn't break machine readability.

I don't remember the details, but I do have some past evidence that pretty printed XML was a problem at one time.

Last edited by JimmXinu; 07-22-2014 at 11:41 PM. Reason: Remove obsolete beta versions
JimmXinu is offline   Reply With Quote
Old 06-07-2014, 03:49 AM   #128
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by JimmXinu View Post
Attached is a test version that uses .toprettyxml(indent=' '...) instead of just .toxml() for the content.opf and toc.ncx files.

I honestly don't see the existing output as problem--it's a machine written file for machines to read. But I'm willing to change to pretty print output as long as it doesn't break machine readability.

I don't remember the details, but I do have some past evidence that pretty printed XML was a problem at one time.
Thanks. I'll give this a try sometime this weekend when I have the time and let you know how it goes. I never thought to check the NCX file. Thanks for that.
JSWolf is offline   Reply With Quote
Old 06-21-2014, 11:26 AM   #129
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,317
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Translations

With Kovid's gracious help, I've switched over to using Transifex for translations for my plugins.

You can now help out by providing translations without having to install anything. All you need is to create an account on a web site and jump in to translating. The link to EpubSplit's translations specifically is here.

Thanks!
JimmXinu is offline   Reply With Quote
Old 07-02-2014, 08:39 PM   #130
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,317
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Version 1.3.4 - 02 Jul 2014
Update Spanish and add Ukrainian translations, courtesy of the volunteers at Transifex.
Pretty format XML of generated metadata files.
JimmXinu is offline   Reply With Quote
Old 07-08-2014, 11:45 AM   #131
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,317
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Attached is a test version that should work for both the existing 1.X calibre and the upcoming 2.X version calibre. 2.x will use PyQt5 which requires changes to virtually all plugins.

This version needs to be tested with the existing calibre.

Brave souls to test with with the beta 2.X version would also be appreciated. Links to the 2.X beta and discussion of the transition (for plugins) can be see at: Attn plugin developers: calibre moving to Qt 5.

Last edited by JimmXinu; 07-22-2014 at 11:41 PM. Reason: Remove obsolete beta versions
JimmXinu is offline   Reply With Quote
Old 07-13-2014, 11:43 AM   #132
samy2
Ebook-Fan
samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.samy2 ought to be getting tired of karma fortunes by now.
 
Posts: 398
Karma: 698564
Join Date: Feb 2011
Device: PRS T1
I tested it briefly under Linux. Seem to work well. Thank you!
samy2 is offline   Reply With Quote
Old 07-13-2014, 07:44 PM   #133
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: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@JimmXinu - tested with V1.201 portable and V1.44 64 bit - works fine for me

BR
BetterRed is offline   Reply With Quote
Old 07-13-2014, 11:14 PM   #134
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,317
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by BetterRed View Post
@JimmXinu - tested with V1.201 portable and V1.44 64 bit - works fine for me

BR
Thanks!
JimmXinu is offline   Reply With Quote
Old 07-17-2014, 10:23 AM   #135
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by JimmXinu View Post
Attached is a test version that should work for both the existing 1.X calibre and the upcoming 2.X version calibre. 2.x will use PyQt5 which requires changes to virtually all plugins.

This version needs to be tested with the existing calibre.

Brave souls to test with with the beta 2.X version would also be appreciated. Links to the 2.X beta and discussion of the transition (for plugins) can be see at: Attn plugin developers: calibre moving to Qt 5.
When tying to save setting in Customize Plugin had the following error using calibre 1.201.1
Code:
calibre 1.201.2  isfrozen: True is64bit: True
Linux-3.13.0-24-generic-x86_64-with-debian-jessie-sid Linux ('64bit', 'ELF')
('Linux', '3.13.0-24-generic', '#46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014')
Python 2.7.8
Linux: ('debian', 'jessie/sid', '')
Successfully initialized third party plugins: DeDRM && Baen && EpubSplit && Modify ePub
Traceback (most recent call last):
  File "site-packages/calibre/gui2/preferences/plugins.py", line 292, in customize_plugin
  File "site-packages/calibre/gui2/preferences/plugins.py", line 368, in modify_plugin
  File "site-packages/calibre/customize/__init__.py", line 171, in do_user_config
  File "calibre_plugins.epubsplit.__init__", line 81, in save_settings
  File "calibre_plugins.epubsplit.config", line 171, in save_settings
AttributeError: 'NoneType' object has no attribute 'toString'
Running Linux Mint 17 Cinnamon 64-bit

bernie
gbm is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] EpubMerge JimmXinu Plugins 522 04-01-2024 10:25 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 AM
[GUI Plugin] FanFictionDownLoader JimmXinu Plugins 3985 05-08-2015 11:18 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 10:13 PM.


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