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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2011, 10:15 AM   #16
jackie_w
Wizard
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: 2,911
Karma: 4329601
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
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
where %1 represents the file currently selected in Windows Explorer.

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...')
As you see I have put a 'pause' at the end of both pieces.

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.
Attached Thumbnails
Click image for larger version

Name:	openwith.jpg
Views:	164
Size:	103.7 KB
ID:	67263  
jackie_w is online now   Reply With Quote
Old 02-24-2011, 10:32 AM   #17
jackie_w
Wizard
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: 2,911
Karma: 4329601
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
... 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.
jackie_w is online now   Reply With Quote
 
Advertisement
Old 03-03-2011, 08:45 AM   #18
weedfreak
Addict
weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.
 
weedfreak's Avatar
 
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?
weedfreak is offline   Reply With Quote
Old 03-03-2011, 09:53 AM   #19
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Read the introduction to plugins sticky post. Specifically the last step in the installation instructions of Preferences-> Customise the toolbar
kiwidude is offline   Reply With Quote
Old 03-03-2011, 10:16 AM   #20
weedfreak
Addict
weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.
 
weedfreak's Avatar
 
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.
weedfreak is offline   Reply With Quote
Old 03-03-2011, 10:19 AM   #21
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Did you actually read it?
Quote:
Originally Posted by kiwidude View Post
7. By default a GUI action plugin will not appear in any menus or toolbars. To add it to any of these you must go to Preferences->Customise the toolbar. In the dropdown at the top choose where you want the new "action", such as "The context menu for the books in the Calibre library". Select the new plugin within the "Available actions", click the add button and move up/down as required.
kiwidude is offline   Reply With Quote
Old 03-03-2011, 10:22 AM   #22
weedfreak
Addict
weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.weedfreak can program the VCR without an owner's manual.
 
weedfreak's Avatar
 
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 ....
weedfreak is offline   Reply With Quote
Old 03-03-2011, 10:28 AM   #23
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Quote:
Originally Posted by weedfreak View Post
OK I got it, you wouldn't think reading was an optional extra, but instructions ....
You can lead a horse to water, but...

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.
kiwidude is offline   Reply With Quote
Old 03-03-2011, 11:32 AM   #24
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,436
Karma: 5383257
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.
kovidgoyal is online now   Reply With Quote
Old 03-03-2011, 12:14 PM   #25
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Quote:
Originally Posted by kovidgoyal View Post
@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.
That sounds a good idea. I can put something together for it if you just let me know what you had in mind.
kiwidude is offline   Reply With Quote
Old 03-03-2011, 12:25 PM   #26
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,436
Karma: 5383257
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.
kovidgoyal is online now   Reply With Quote
Old 03-29-2011, 12:48 PM   #27
ptom
Member
ptom began at the beginning.
 
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!
ptom is offline   Reply With Quote
Old 03-29-2011, 01:08 PM   #28
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@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?
kiwidude is offline   Reply With Quote
Old 03-29-2011, 05:19 PM   #29
ptom
Member
ptom began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2011
Device: nook color
Sure, it's no big deal anyway. I was just wondering...
ptom is offline   Reply With Quote
Old 03-30-2011, 03:05 AM   #30
atjnjk
Zealot
atjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enough
 
Posts: 105
Karma: 554
Join Date: Oct 2008
Device: none
Quote:
Originally Posted by ptom View Post
is it possible to assign a relative path? I was wondering if it's in principle possible to change the path to sth. like "../pdf_portable/xyz.exe"
Here's a workaround for Windows OS (I'm doing this without problems): Go to YourCalibreConfigDir\Plugins\ > Open 'open_with.json' with a text editor > Change
Code:
"appPath": "C:\\Program Files\\xyz\\xyz.exe"
To
Code:
"appPath": "..\\pdf_portable\\xyz.exe"
It's a little hassle but it worth the time if you're a portable geek (like me. Portable programs are best when you're working on multi Windows OS PCs. They also make it easier to upgrade hardwares and Windows versions.)
atjnjk 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
[GUI Plugin] Search the Internet kiwidude Plugins 205 08-11-2014 03:22 PM
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


All times are GMT -4. The time now is 07:29 AM.


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