02-24-2011, 10:15 AM | #16 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I've tried various combinations of customisation but I haven't found the right one yet.
When you have time please could you look at this simple example and advise what I should be doing differently. As I am very new to Python, perhaps there are better ways to read input arguments. If there is a way of doing this without the .bat file so much the better. The Windows .bat file contains Code:
"C:\Program Files\pythonv27\python.exe" "C:\pytest.py" %1 PAUSE The Python prog (C:\pytest.py) contains: Code:
import sys file_name = sys.argv[1] print '\nYou selected:', file_name raw_input('\n\nPython pause...') I have tried customising the plugin in 2 ways as seen in the last 2 items in the screencap. Neither of them appear to do anything. Any advice welcome. |
02-24-2011, 10:32 AM | #17 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
... followup... I take that back I think using python.exe as the executable and pytest.py as the argument DOES work. Unfortunately my example was just supposed to display to screen which never appeared. When I changed the action to write a physical file it did write the file.
Sorry to waste your time. I will carry on experimenting. |
Advert | |
|
03-03-2011, 08:45 AM | #18 |
Addict
Posts: 302
Karma: 185297
Join Date: Sep 2009
Location: Ankh Morpork
Device: calibre
|
How do I get this to show in the context menu?
I have the latest "open with" on Calibre 7.47 on Xubuntu 10.10, I can squirell down the preferences tree and find it installed and set it to point in the right places (well I haven't found how to change Firefox to Chrome but that is not important.) I can use the shortcut, CTRL E, to open Sigil but it does not show up in the context menu. Any pointers? |
03-03-2011, 09:53 AM | #19 |
Calibre Plugins Developer
Posts: 4,688
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Read the introduction to plugins sticky post. Specifically the last step in the installation instructions of Preferences-> Customise the toolbar
|
03-03-2011, 10:16 AM | #20 |
Addict
Posts: 302
Karma: 185297
Join Date: Sep 2009
Location: Ankh Morpork
Device: calibre
|
Ah, just reading now.
Last edited by weedfreak; 03-03-2011 at 10:18 AM. |
Advert | |
|
03-03-2011, 10:19 AM | #21 | |
Calibre Plugins Developer
Posts: 4,688
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Did you actually read it?
Quote:
|
|
03-03-2011, 10:22 AM | #22 |
Addict
Posts: 302
Karma: 185297
Join Date: Sep 2009
Location: Ankh Morpork
Device: calibre
|
OK I got it, you wouldn't think reading was an optional extra, but instructions ....
|
03-03-2011, 10:28 AM | #23 | |
Calibre Plugins Developer
Posts: 4,688
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
You certainly aren't the first to not spot the dropdown, and equally certain you won't be the last. I don't know what to do about it though, other than repeatedly post instructions and installation screenshots in every plugin post, which would be a pain. |
|
03-03-2011, 11:32 AM | #24 |
creator of calibre
Posts: 44,561
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@kiwidude: It should be possible to popup a dialog asking the user where they want the plugin to show up after an interface plugin is added.
Unfortunately, I am an little too busy to implement this anytime soon. |
03-03-2011, 12:14 PM | #25 |
Calibre Plugins Developer
Posts: 4,688
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
That sounds a good idea. I can put something together for it if you just let me know what you had in mind.
|
03-03-2011, 12:25 PM | #26 |
creator of calibre
Posts: 44,561
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I would say popup a dialog with a list of the locations that the plugin allows itself to be added to ad ask the user to choose from amongst them.
See preferences.toolbar for code on doing that. |
03-29-2011, 12:48 PM | #27 |
Member
Posts: 10
Karma: 10
Join Date: Mar 2011
Device: nook color
|
Just out of curiosity, is it possible to assign a relative path? Say I want to get it running on a thumb drive, portable version, and open my .pdf's with a certain portable programm on my stick.
As long as I'm using it on my very own pc everything works pretty well, since I'm able to fix the drive letter (or at least it's always more or less the same^^). But as soon as I want to use it on a foreign machine, everything kinda renders useless, since I'm not (yet) able to fix the drive letter my thumb drive gets assigned, therefore the plugin won't find the particular program (sure, I can change it everytime I use it, what I'm doing so far) So I was wondering if it's in principle possible to change the path to sth. like "../pdf_portable/xyz.exe" Oh, and besides that, just gorgeous tool! Wouldn't want to miss it! |
03-29-2011, 01:08 PM | #28 |
Calibre Plugins Developer
Posts: 4,688
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@ptom - in a word, no. A relative path would remain too "fragile" to be really useful.
Can you not instead just create multiple menu items, one with the path for each machine? |
03-29-2011, 05:19 PM | #29 |
Member
Posts: 10
Karma: 10
Join Date: Mar 2011
Device: nook color
|
Sure, it's no big deal anyway. I was just wondering...
|
03-30-2011, 03:05 AM | #30 | |
Zealot
Posts: 107
Karma: 554
Join Date: Oct 2008
Device: none
|
Quote:
Code:
"appPath": "C:\\Program Files\\xyz\\xyz.exe" Code:
"appPath": "..\\pdf_portable\\xyz.exe" |
|
Tags |
conversion, kepubify |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Search the Internet | kiwidude | Plugins | 434 | 09-30-2024 04:04 AM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM |
Gui confusements. | brewt | Calibre | 8 | 12-30-2008 01:16 PM |
Reference Open eBook Forum: Open eBook Publication Structure. IMP. V1.0.1 14 September 2007 | DaleDe | IMP Books | 0 | 09-14-2007 06:06 PM |
iLiad GUI for the iLiad | tribble | iRex Developer's Corner | 1 | 06-01-2007 03:29 PM |