View Single Post
Old 04-25-2014, 01:52 AM   #2585
skb
Evangelist
skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.
 
skb's Avatar
 
Posts: 401
Karma: 1597305
Join Date: Mar 2010
Device: Ipod G4, MacOS 10.12, Calibre, Pocketbook Touch HD 3
Quote:
Originally Posted by JimmXinu View Post
The project source code is kept here, but a calibre plugin is just a zip of all the python code anyway.

To add a new adapter, you need to add a new file:

fanficdownloader/adapters/adapter_<sitename>.py

...and edit: fanficdownloader/adapters/__init__.py to import your new file.
Okay, got the code, edited the two files. Zipped up the code again and get the error message when adding the plugin (via Prefs/Advanced/Plugins):

Code:
calibre, version 1.33.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:The plugin in u'/Users/sue/Downloads/FanFictionDownLoaderPlugin_fictioning.zip' is invalid. It does not contain a top-level __init__.py file

calibre 1.33  isfrozen: True is64bit: True
Darwin-10.8.0-i386-64bit Darwin ('64bit', '')
('Darwin', '10.8.0', 'Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386')
Python 2.7.5
OSX: ('10.6.8', ('', '', ''), 'i386')
Traceback (most recent call last):
  File "site-packages/calibre/gui2/preferences/plugins.py", line 308, in add_plugin
  File "site-packages/calibre/customize/ui.py", line 375, in add_plugin
  File "site-packages/calibre/customize/ui.py", line 53, in load_plugin
  File "site-packages/calibre/customize/zipplugin.py", line 188, in load
  File "site-packages/calibre/customize/zipplugin.py", line 282, in _locate_code
InvalidPlugin: The plugin in u'/Users/sue/Downloads/FanFictionDownLoaderPlugin_fictioning.zip' is invalid. It does not contain a top-level __init__.py file
I've tried two ways...one download the source, edit the files, zip up and try to install and I downloaded your latest "beta" (on Post 1) and did the same. I get the same error both ways.

Calibre 1.33
Ver of plugin modified Version 1.8.18

I've added my modded files zip.
Attached Files
File Type: zip FanFictionDownLoaderPlugin_fictioning.zip (861.3 KB, 157 views)
skb is offline