Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-21-2016, 07:50 PM   #1
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
[Plugin] AddiBooksXML

AddiBooksXML: use this plugin to add the iBooks proprietary "com.apple.ibooks.display-options.xml" file to the META-INF folder of an epub.

** NOTE: this plugin periodically checks for updated versions by connecting to github (where the source is maintained). See the end of this post for more details (including how to disable the check) **

Minimum Sigil requirement: v0.9.0 or higher
Python Requirements: Python 3.4+ (Bundled or external)
OS Requirements: Windows/Linux/OS X
*** Linux users will have to make sure that the Tk graphical python module is present if it's not already. On Debian-based flavors this can be done with "sudo apt-get install python3-tk" for python 3 ***

*Note: Do not rename any Sigil plugin zip files before attempting to install them *

Select a pre-existing (and iBooks valid) XML file using the file dialog and it will be added as "com.apple.ibooks.display-options.xml". You won't be able to edit the file in Sigil, so make sure it's correct/complete before adding. You can always delete it in Sigil and add it again if something goes wrong.

Files like these show up in Sigil's "Misc" folder, but rest assured that it's actually going into the META-INF folder.

Configurable preferences (available after first run in the plugin's corresponding json prefs file) are:
  • check_for_updates : a boolean value (defaults to true) that controls whether the plugin checks for updates. Change to false if you don't wish to be notified when a new version of this plugin is available.

AddiBooksXML's code is hosted/maintained on Github.

This plugin's update checker will only try to check for updates after at least 12 hours has elapsed since its last check. The plugin will only notify you about updates once for each new version released. No nagging, I promise. But if you don't like it, by all means disable the update checker by setting the "check_for_updates" option to false in the plugin's preference file as mentioned above.



Changes
v0.1.0
- Initial release
Attached Files
File Type: zip AddiBooksXML_v0.1.0.zip (4.5 KB, 625 views)

Last edited by DiapDealer; 11-10-2016 at 02:48 PM.
DiapDealer is offline   Reply With Quote
Advert
Old 11-16-2017, 02:10 PM   #2
AlanHK
Addict
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 344
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Thanks.

Have been making epubs for iBooks for a year and just found out it wasn't using my embedded fonts...

I was a little surprised that I had to supply the XML myself. Since it's just 169 bytes and never changes (theoretically, you could use it to disallow specified fonts, but why would anyone do that?) I thought it would be included and generated on the fly.

If you ever revisit this, I suggest that option, can allow user supplied as well if you think useful.

Also, a few lines to explain just what the file does and why it's needed might be useful.
I found this: http://guidohenkel.com/2015/04/custom-fonts-in-ibooks/

Last edited by AlanHK; 11-16-2017 at 02:24 PM.
AlanHK is offline   Reply With Quote
Old 11-16-2017, 02:42 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by AlanHK View Post
I was a little surprised that I had to supply the XML myself. Since it's just 169 bytes and never changes (theoretically, you could use it to disallow specified fonts, but why would anyone do that?) I thought it would be included and generated on the fly.
Being something that I've never actually had to use myself, I thought it best to allow users to supply their own display-options.xml file. Mainly because a cursory search at the time revealed several different options and uses for the file. I didn't want to pigeonhole anyone unnecessarily. It wouldn't be hard for me to generate a default xml file if the user chooses to do so, though. I'll look into it.
DiapDealer is offline   Reply With Quote
Old 11-17-2017, 10:35 PM   #4
AlanHK
Addict
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 344
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Here's a commented com.apple.ibooks.display-options.xml.

Code:
<display_options>
	<platform name="*">	<!-- allowed values for platform "iphone", "ipad", or "*" for all -->
		<option name="specified-fonts">true</option> <!-- must be set to "true" for embedded fonts -->
	</platform>
</display_options>
Can't imagine any real world case where you'd use anything but the defaults.
Perhaps there are other XMLs you'd include for other reasons.
AlanHK is offline   Reply With Quote
Old 11-17-2017, 10:51 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You're overlooking the iBooks fixed-layout, interactive, and orientation-lock options for the com.apple.ibooks.display-options.xml file. It's not only used for fonts.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<display_options>
  <platform name="*"> 
    <option name="specified-fonts">true</option>
    <option name="interactive">true</option>
    <option name="fixed-layout">true</option>
    <option name="open-to-spread">true</option>
  </platform>
  <platform name="iphone">
    <option name="orientation-lock">landscape-only</option>
  </platform>
</display_options>

Last edited by DiapDealer; 11-17-2017 at 10:59 PM.
DiapDealer is offline   Reply With Quote
Advert
Old 11-18-2017, 12:25 AM   #6
AlanHK
Addict
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 344
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by DiapDealer View Post
You're overlooking the iBooks fixed-layout, interactive, and orientation-lock options
Yes, I was totally ignorant of those, never having done those kinds of books.

Still... I think "specified-fonts" is the most likely use.
AlanHK is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 151 09-27-2017 06:05 PM
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 23 08-16-2016 07:53 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 03:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 01:11 PM


All times are GMT -4. The time now is 08:20 PM.


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