![]() |
#301 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 843
Karma: 3335974
Join Date: Jan 2017
Location: Poland
Device: Various
|
Quote:
bk.get_epub_is_modified() bk.get_epub_filepath() |
|
![]() |
![]() |
![]() |
#302 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,597
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
EDIT: Actually after looking, I see that ValidationContainer inherits from OutputContainer, which amounts to the same thing: both new methods being available to validation plugins. From validationcontainer.py: Code:
from outputcontainer import OutputContainer class ValidationContainer(OutputContainer): Last edited by DiapDealer; 01-25-2018 at 05:12 PM. |
|
![]() |
![]() |
![]() |
#303 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 843
Karma: 3335974
Join Date: Jan 2017
Location: Poland
Device: Various
|
You're right. It was outputcontainer.py file, I forgot to update it before build. Everything works now.
|
![]() |
![]() |
![]() |
#304 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Hi everyone...I'm in a dilemma. I'm currently finishing off testing a new plugin called MendeleyRefsImport and its going reasonably well. This plugin takes a file exported from Mendeley as EndNotes v8 xml and formats all the selected ref/notes in Chicago Stye(user choice) and then appends them to to your selected chapter or blank reference file in the epub.
It suddenly struck me today that this plugin might also work for an xml file exported from Endnotes v8. I can't test whether this plugin will work on the EndNotes app because I don't have this app on my computer. So my problems are: How do I test this plugin on an xml export file from EndNote v8? How do I name a plugin if it works for both Mendeley and EndNote export files? If this plugin also worked for EndNote exported xml files, my own preference would be to create two separate plugins -- one called MendeleyRefsImport and the other one called EndNoteRefsImport -- in order to explicitly show that there are two plugins for each of these apps in the Sigil Plugin Index. But the code in these two plugins would be exactly the same. I'm also not sure whether this would be allowed. All suggestions would be greatly appreciated. If anyone would like to try out my new plugin using an xml export file from either Mendeley or EndNote v8 you can download it -- see below. There's also a README file in the zip file that describes in detail how to use this plugin with Mendeley. Update: I've decided to download EndNote v8 for a 30 day trial. That should give me ample time to test this plugin with xml export files from EndNote. I'm also hoping that export as xml will be available in the trial version. Last edited by slowsmile; 01-25-2018 at 10:29 PM. |
![]() |
![]() |
![]() |
#305 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
|
Quote:
there is no issue in Sigil. The font files have been deleted outside from Sigil improperly and i only stumbled upon this improper modification as my plugin throwed an error message. I only wanted to know how i can catch those errors. The manifest was already corrected immediatly after i noticed what the root cause was. M |
|
![]() |
![]() |
![]() |
#306 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,597
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#307 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 843
Karma: 3335974
Join Date: Jan 2017
Location: Poland
Device: Various
|
My suggestions:
1. Allow adding 10 plugins for toolbar. 5 is good, but 10 will be better. Ask other users. 2. Change the standard icons for plugins to numbers. In this situation, even a plug-in without an icon will be easier to identify. --- Alternative icon for ePub3-tizer. Original icon is a bit unreadable. |
![]() |
![]() |
![]() |
#308 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,800
Karma: 6000000
Join Date: Nov 2009
Device: many
|
10 seems a bit much to me. If we go that high we will have to create arrays of action pointers otherwise the code will get too repetitive and unwieldy. The purpose for the 5 icons was just for most frequently used plugins. The plugin dynamically generated menus can be assigned key accelerators for all plugins, which can make launching the plugins as easy or even easier than using the quicklaunch icons on the toolbar.
Thanks for your updated ePub3-itizer plugin icon. On my machine you can read my original clearly. Not sure why it is unclear on yours. Perhaps you are setting the toolbar icon sizes much smaller than I am. See the Sigil preference setting for that. Also not sure I personally like just numbers for default icons as it is not clear they are plugin related at all. I prefer sticking with the electrical plugs and pips which seems safer to me. Last edited by KevinH; 02-02-2018 at 12:10 PM. |
![]() |
![]() |
![]() |
#309 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 843
Karma: 3335974
Join Date: Jan 2017
Location: Poland
Device: Various
|
Sure. Thanks for the clarification.
I have over 50 plugins and hundreds of key combinations in my head from various programs, so the colored icons are more convenient for me. |
![]() |
![]() |
![]() |
#310 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,597
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I agree that 5 on the toolbar is enough. Not every plugin you have installed needs to be at your very fingertips.
Number icon on the toolbar won't tell new users anything. I prefer to stick with the existing plugin icons. I'm not down with messing with established icons in general. There's never a consensus on what icons would be "best," anyway. |
![]() |
![]() |
![]() |
#311 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
@BeckyEbook: I like the icons that you've created for the EpubCheck, Epub2LegacyMetaData and KindleGen plugins and would like to use them for future versions.
Can you please attach them? |
![]() |
![]() |
![]() |
#312 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 843
Karma: 3335974
Join Date: Jan 2017
Location: Poland
Device: Various
|
Of course.
|
![]() |
![]() |
![]() |
#313 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
Hi All...I was just wondering if any of the Sigil plugin container classes had a function or method that would allow me to insert text at the cursor in Sigil's Book View within a particular html file in Sigil.
The reason I'm asking is that I was thinking that it might be quite useful to have a plugin that could insert short citations into the text in Text View in Sigil with a view, in the same plugin, to eventually create links automatically from each of these citation entries either to the endnote chapter sections containing the relevant reference or to a reference item in the bibliography section. Just wondering if this is possible. Last edited by slowsmile; 02-02-2018 at 11:17 PM. |
![]() |
![]() |
![]() |
#314 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,800
Karma: 6000000
Join Date: Nov 2009
Device: many
|
I am not sure what you are asking exactly, but plugins and the plugin interfaces actually only work at the file level of an expanded epub inside Sigil (and uses copy on modify semantics too) and do not interact in any way with other elements of Sigil directly. It was designed that way to protect Sigil. As the plugin makes changes to xhtml, image, etc using the interface the opf is rebuilt automatically and the copied and modified results are stored away in a temporary directory. Upon completion of the plugin, an xml file which lists the changed, deleted, and added files is passed back from the forked plugin process and is used by Sigil itself to update the files that were changed, add the new files, and delete the removed files. The plugin interface does offer the list of files that are highlighted in the Bookbrowser when the plugin in launched if you only want to process a limited set of files.
A plugin also has access to bs4, gumbo, hunspell spellcheckers, and a number of required python libraries like cssutils, lxml, PIL and things and can use its own gui either pyqt or tk to interact with the user, but it is always working on the epub's file (copies of them) in a forked process that Sigil itself is waiting to finish and reading stdout from for the xml that tells Sigil what to do. If you need to pass a specfic location in the code to the plugin, you must explain how the user should mark that text in some way using tags or text keys, before launching the plugin and then have the plugin limit itself to the currently highlighted file in Bookbrowser and search for your marker in that file and process it as you want. |
![]() |
![]() |
![]() |
#315 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@KevinH...I think you covered everything that I asked. Thanks for explaining it so thoroughly. I think we can say that my question is just not possible.
Regarding marking lines of text that you mentioned, I have already written a private plugin that only adds spans(with no styling) around only centered text and images in an epub. I just wanted to surround centered items with no-style spans to accommodate ebooks that I upload to iBook -- which still needs no-style spans for anything that's centered. The only way I could do this was to use a marker(like you suggested). I used a tilde symbol('~' ) to manually mark all centered items in my epub and that worked just fine. I haven't release that plugin because I thought it was redundant -- usually, for iBooks uploads, people mostly surround everything in their epubs with no-style spans which seems to work just as well. Thanks again for the explanation. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Loading Plugin in development | Sladd | Development | 6 | 06-17-2014 06:57 PM |
Question for plugin development gurus | DiapDealer | Plugins | 2 | 02-04-2012 11:33 PM |
DR800 Plugin development for DR800/DR1000 | yuri_b | iRex Developer's Corner | 0 | 09-18-2010 09:46 AM |
Device plugin development | reader42 | Plugins | 10 | 03-29-2010 12:39 PM |
Calibre plugin development - Newbie problems | minstrel | Plugins | 5 | 04-12-2009 12:44 PM |