Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-14-2022, 03:55 PM   #1
SylvanKnight
Member
SylvanKnight began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Sep 2022
Device: kindle
[Help Request] Installing 'Hello World' plugin for testing purposes

Hello all. I'm new to the Calibre Plugin world, and am looking for help and advice. I wrote a python script that I'd like to turn into a plugin that runs on_postimport. I downloaded and installed the helloworld_plugin.zip from the 'Write Your Own Plugin' page, and it shows up in the interface, but doesn't fire on file conversion. Even running in debug, I see the plugin add in, but not execute on conversions. I'm sure I'm doing something simple very wrong, but not sure what. Any help or advice would be appreciated.
SylvanKnight is offline   Reply With Quote
Old 10-14-2022, 04:38 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Moderator Notice

Moved to the Development forum

BR
BetterRed is online now   Reply With Quote
Advert
Old 10-14-2022, 10:00 PM   #3
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: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the hello world is a user interface plugin, you want to create a filetype plugin instead. Look at any one of the existing filetype plugins for an example.
kovidgoyal is offline   Reply With Quote
Old 10-16-2022, 11:24 AM   #4
SylvanKnight
Member
SylvanKnight began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Sep 2022
Device: kindle
Quote:
Originally Posted by kovidgoyal View Post
the hello world is a user interface plugin, you want to create a filetype plugin instead. Look at any one of the existing filetype plugins for an example.
Isn't hello world a filetype plugin?

class HelloWorld(FileTypePlugin)
SylvanKnight is offline   Reply With Quote
Old 10-16-2022, 11:38 AM   #5
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: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Depends on what you are referring to. If you mean the sample code under "Anatomy of a calibre plugin" then yes its a filetype plugin. The actual sample plugin is in interface_demo.zip and is a user interface plugin.

As for why it wont run rememebr that filetype plugins run only on specific filetypes. the sample code IIRC is for epub and mobi. so it will run only if conversion results in one of those formats.
kovidgoyal is offline   Reply With Quote
Advert
Old 10-16-2022, 01:18 PM   #6
SylvanKnight
Member
SylvanKnight began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Sep 2022
Device: kindle
I was referring to the "Anatomy of a calibre plugin" version. I tried conversions into the file types, and from one of them into the other and it never triggered. I messed with the minimum version and file types more and finally got it to trigger. Not sure which it was, but I have it working now.

Thanks for your help, I appreciate it.

Also, thanks for the work you do for the program and the community. I've used Calibre for a long time and am very grateful for everything you've done. Have a good day
SylvanKnight is offline   Reply With Quote
Old 10-16-2022, 09:49 PM   #7
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: 43,863
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You're welcome, glad you got it working.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing on Mac Guest Post Request courtneydion Calibre 0 03-31-2017 01:11 PM
error installing plugin wonk Plugins 3 06-21-2016 04:44 PM
New MOBI output plugin, testing needed kovidgoyal Conversion 30 11-19-2011 04:52 PM
nOOb help - Installing a calibre plugin SilentSeven Plugins 3 09-12-2010 12:15 PM


All times are GMT -4. The time now is 02:15 AM.


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