09-16-2014, 04:08 PM | #1 |
Member
Posts: 12
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite 2
|
[FileType Plugin] YVES Bible Plugin
YouVersion allows you to download Bibles offline. They are just simple html snippets of each chapter of the Bible encoded in a strange fashion. Using this plugin, you can "add book" for the "manifest.yves" for each Bible on your Android's SD Card. It can then be converted to any format that Calibre knows about. If you have a newer version of YouVersion, rename the _version_ file to manifest.yves and it should work with 0.0.8.
For example, in /sdcard/.youversion/.persistence/bible_v3/versions_1/ is _version_ for the King James version of the Bible. Just copy the whole 'version_1' directory over to your computer somewhere, rename _version_ to manifest.yves and "add" the manifest.yves. Or, if your android phone shows up like a drive on your computer, just open the //sdcard/.youversion/.persistence/bible_v3/versions_1/ directory, COPY _version_ to manifest.yves and then import that file straight from there. It will import a htmlz formatted book into your library that you can then convert to epub or mobi. For old versions, in /sdcard/.youversion/bibles/1/ is manifest.yves for the King James version of the Bible. Just copy the whole '1' directory over to your computer somewhere and "add" the manifest.yves from it. Or, if your android phone shows up like a drive on your computer, just open the /sdcard/.youversion/bibles/1/manifest.yves file straight from there. It will import a htmlz formatted book into your library that you can then convert to epub or mobi. It imports everything, so for example if the Bible has introductions or something, it will be added to the book that it is a part of, even if it's not "canonical". It is a very simple concatenation of all the files with a simple chapter header put between each chapter. Don't expect anything beautiful. It's just easier on the eyes than an Android phone. It's also searchable offline. There are so many times that the Bible is just useless to me if I can't find a specific phrase. Either way, it's here on github: https://github.com/ClashTheBunny/calibre-yves-input This is clearly fair use of the files on SD Card because they are not encrypted and there is no reason you would distribute any of these, you already are able to download them for free. Don't ask me for any of the data that this is built from. That would be VERY wrong. Just get you own Bible app and download for offline usage. Changelog: Version 0.0.8: Update to allow it to read new bible_v3 bibles now. Just rename the _version_ file to manifest.yves and you should be off to the races. Version 0.0.7: This version is compatible back to 1.25: the version that comes on Ubuntu 14.04. Since it's LTS, there may be many people who will use that version for the years to come, so it's helpful to have it supported. It goes back on sub-classing HTML2ZIP and instead just instantiates an instance of it and calls it. There is a bug of some sort in that version that doesn't overwrite the .name property on a plugin that has been imported at the top of the file. This should not change other functionality. Version 0.0.6: Make the yves file read in with binary, so that it is compatible with Windows. Windows has different ways of treating binary and text files, which can remove information. Version 0.0.5 (unreleased): Refactored thing out of __init__.py so that I could test them easier from the command line. Version 0.0.4: Cleans up some general things and adds support for Right-to-Left Languages and fixes languages that don't have a two letter code. Todo: Footnote parsing Better chapter and book separation Option to exclude extraneous text, like introductions and such Add more documentation on converting to EPub or Mobi, like book and chapter xpath statements. Last edited by ClashTheBunny; 10-13-2019 at 12:26 AM. Reason: Update version to 0.0.8 |
09-16-2014, 04:41 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Usually, they do what you did.
Plugins are distributed through their MobileRead thread, and the canonical location is via the attachment you put here. the calibre website indexes the plugin threads and caches the attached plugin for the plugin updater. You could also just move the "src/calibre_plugins/yves_input/" folder into the root of the repo If you plan on making multiple plugins, then for organization purposes I would use a separate repo for each. Probably no big deal, though. For quick packaging, you can use calibre-customize.exe. It allows you to update the plugin in calibre, and then you just upload the working plugin from your configuration folder. on the plugin and Welcome to MobileRead! |
Advert | |
|
09-16-2014, 05:02 PM | #3 | |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Maybe you need to extend the BOOK_EXTENSIONS? https://github.com/kovidgoyal/calibr..._init__.py#L29 |
|
09-17-2014, 04:18 AM | #4 | |
Member
Posts: 12
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite 2
|
Quote:
I also don't see many FileTypePlugin plugins out there, maybe this is a fairly non-standard thing to try to add file types to the list. For example, the plugin that I started with, calibre-doc-input, adds support for the .doc extension, but it's already in the BOOK_EXTENSION list. It seems that even if it's not supported in calibre, it's in the BOOK_EXTENSION list to allow calibre to manage the type of document. |
|
09-17-2014, 04:22 AM | #5 | |
Member
Posts: 12
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite 2
|
Quote:
Thanks! It's good to be here! |
|
Advert | |
|
09-17-2014, 04:44 AM | #6 |
Member
Posts: 12
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite 2
|
Github creates the zip with a parent directory and calibre isn't smart enough to look in the directory. I guess I can add a to src/calibre/customize/zipplugin.py" _locate_code to look one directory deep if there is nothing but a directory in the zip.
|
09-17-2014, 07:18 AM | #7 |
creator of calibre
Posts: 44,562
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
BOOK_EXTENSIONS controls what filetypes calibre recognizes as being ebooks. This list is not meant to be affected by file input plugins, which influence only what files calibre can convert.
As for creating the zip file, dont use github export, use calibre-customize. If you must use github export then simply move the files into the root of the repository. And you need to have both __init__.py and the .txt file with the plugin import name in the root of the folder, for calibre to recognize the plugin, that is not going to change. |
09-17-2014, 11:58 AM | #8 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Yep, plugin folder should be the repo, not be in the repo.
|
09-17-2014, 12:06 PM | #9 |
Member
Posts: 12
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite 2
|
Yep, tried that, and github still doesn't work with their way of trying to prevent tarbombs. They will not let you download a zip file without the name of the repo and the name of the branch as the root directory.
It seems that tarbombs are the policy though, so no releases from github are possible. |
09-17-2014, 12:29 PM | #10 |
creator of calibre
Posts: 44,562
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Dont use github's zip export then. In any case you want the plugin zip file to not be compressed for performance while loading the plugin code, calibre-customize takes care of that for you automatically.
|
09-23-2014, 05:32 AM | #11 |
Connoisseur
Posts: 89
Karma: 203522
Join Date: Oct 2009
Device: Kindle 2 US, iPad, Samsung Win 8 Tablet
|
The plugin doesn't seem to work for me. I have installed it and added the manifest.yves file to the library but calibre just adds the single file, it will not convert it to zip or anything else. Anything else I have to do?
|
09-23-2014, 05:38 AM | #12 |
Member
Posts: 12
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite 2
|
Thanks so much for trying this!
What platform are you on? Did you keep the manifest.yves in the same location as all of the directories containing zips? AKA, manifest.yves is in the same directory as GEN directory, which contains 1.yves, 2.yves, etc? If that doesn't work, could you do the "restart calibre in debug mode" and then post the text file output of the session after you try the import again? That will tell me where the script is failing. |
09-23-2014, 07:38 AM | #13 |
Connoisseur
Posts: 89
Karma: 203522
Join Date: Oct 2009
Device: Kindle 2 US, iPad, Samsung Win 8 Tablet
|
Windows 8.1 64 bit
This is what I get from the debug mode: Spoiler:
Last edited by ichbindasauge; 09-23-2014 at 11:24 AM. |
09-23-2014, 07:58 AM | #14 |
Member
Posts: 12
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite 2
|
Okay I think I found the problem, could you try 0.0.6? I made a rookie mistake on not reading the yves files in binary mode, which works on Linux and OSX, but isn't too happy on Windows.
|
09-23-2014, 08:13 AM | #15 | |
Member
Posts: 12
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite 2
|
Also, this was the part of the traceback that I needed. I'll copy it here so that you can delete the rest of the traceback if you worry about privacy issues, but so that I can still see it if I need it later.
Quote:
|
|
Tags |
bible, calibre, input format |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 495 | 10-19-2024 07:06 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 |
Zip Filetype Plugin? | rsingley | Plugins | 7 | 02-11-2011 06:11 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM |