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 05-17-2016, 10:27 AM   #1
readin
Enthusiast
readin is on a distinguished road
 
Posts: 25
Karma: 50
Join Date: Apr 2016
Device: calibre
Requesting help to fix "Book Links" plugin

In this post from this 2012 thread, Agama released a beta version of a plugin called "Book Links" (under GPL v3).

The plugin allows you to attach a URL and a folder (for storing supplementary files) to each book.

I asked Agama for help in getting the plugin working in the current version of calibre, but have not received a reply.

At first the plugin wouldn't even install, but I was finally able to install it by making the following changes:

- changed the plugin name to make it consistent (from ag_booklinks to book_links)

- changed the references to PyQt from version 4 to version 5 (from PyQt4.Qt to PyQt5.Qt)

However, when I try to run it, I get the following error in calibre 2.56 [64bit] for Windows:

Quote:
File "calibre_plugins.book_links.ui", line 34, in show_ui
AttributeError: 'LibraryDatabase' object has no attribute 'construct_path_name'
I would be very grateful for any help in getting the plugin working.

My updated version of the plugin is attached.

Thanks,
readin

calibre 2.56 [64bit] on Windows 10 Pro
Attached Files
File Type: zip Book Links.zip (5.3 KB, 285 views)
readin is offline   Reply With Quote
Old 05-27-2016, 09:29 AM   #2
Joanna
Groupie
Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.Joanna understands the mechanisms of the catecholamine pathways.
 
Posts: 199
Karma: 76476
Join Date: Feb 2012
Location: Poland
Device: none
Wow, that's a really neat plugin idea. It's a pity it has been discontinued (and remained pretty much unnoticed).

I'm using .lnk files for supplementary materials but a consistent approach would be great. Amother nice function would be creating links between books (at the moment, I'm using a custom column for that).
Joanna is offline   Reply With Quote
Advert
Old 05-27-2016, 11:51 AM   #3
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
@readin:

I rewrote half of the ui.py show_ui method to get it to work at all.

Frankly, I am not sure how it is supposed to work, and the various scenarios that it is supposed to handle.

It needs a lot of work. I indicated in the code where and why.

See the attachments.

Good luck with this.


DaltonST
Attached Thumbnails
Click image for larger version

Name:	book_link_dialog.jpg
Views:	355
Size:	24.1 KB
ID:	148956  
Attached Files
File Type: zip book_links.zip (6.2 KB, 298 views)
DaltonST is offline   Reply With Quote
Old 05-27-2016, 05:31 PM   #4
readin
Enthusiast
readin is on a distinguished road
 
Posts: 25
Karma: 50
Join Date: Apr 2016
Device: calibre
@DaltonST:

Wow, thanks! Doing any more with it would be way beyond me. But I do really appreciate that you took a crack at it.

For reference:

The purpose of the plugin is described in the original post here.

After installing your updated version, I was able to bring up the Book Links dialog for one of my books, but for three other books it just gave an error similar to the following:

Traceback (most recent call last):
File "calibre_plugins.book_links.ui", line 79, in show_ui
File "calibre_plugins.book_links.main", line 53, in __init__
File "calibre_plugins.book_links.main", line 62, in load_bklf
IOError: [Errno 2] No such file or directory: u'E:\\Calibre\\Library\\William Shakespeare/The Complete Works of William Shakespear (429)\\The Complete Works of William Shakespear - William Shakespeare.txt'

calibre 2.57.1 [64bit] on Windows 10 Pro
readin is offline   Reply With Quote
Old 05-28-2016, 07:23 AM   #5
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
@Readin:

That plugin is not even close to being complete. It was in Beta in 2011, and was very incomplete back then (I can tell from what is not in the code, but should be).

In the interim, Calibre's backend was completely rewritten and Calibre has become more sophisticated. That is why the plugin did not work for you, and why I had to rewrite a chunk of it just to get the dialog box to appear.

It is no longer in Beta, but is back to the early stages of original development in 2016.

It is a waste of time to try to use it until it is redeveloped, because it will create only errors and have a lot of problems until that time.

You do not need help "fixing" it. You need someone to redevelop it from scratch for Calibre of 2016, plus add the various pieces that should be in it but never were in 2011 when its development was halted. I suspect that the original author could not spend the time that was needed to finish it.



DaltonST
DaltonST is offline   Reply With Quote
Advert
Old 05-28-2016, 04:43 PM   #6
readin
Enthusiast
readin is on a distinguished road
 
Posts: 25
Karma: 50
Join Date: Apr 2016
Device: calibre
@DaltonST:

Okay, got it. Thanks for taking the time to look, and for providing a reality check.

@Joanna:

Thanks for the idea of using Windows shortcuts (.lnk files).

To clarify: For each book, you can add a shortcut to a folder on your computer. Drag & drop the folder into the Book Details pane, which adds the shortcut as a "LNK" format, and then click on the "LNK" to open the folder.

I had originally discounted the idea of using Windows shortcuts because I thought that if I moved any of the linked folders, the shortcuts would all have to be recreated manually. But it turns out that Windows can repair shortcuts automatically, even if the target has been moved to a different drive.

(And if for any reason Windows can't automatically repair the shortcuts, this Google search can probably help.)

calibre 2.57.1 [64bit] on Windows 10 Pro
readin is offline   Reply With Quote
Old 06-01-2016, 07:20 AM   #7
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Sorry folks, this plugin only ever reached beta and has not been touched for many months as it didn't seem to be going anywhere. I'm not so regular in the forum these days as calibre has developed so much that most of my plugins are now redundant.

It did work well under the release of calibre at the time and could probably be updated if there is any use for it.
Agama is offline   Reply With Quote
Old 06-01-2016, 10:23 AM   #8
readin
Enthusiast
readin is on a distinguished road
 
Posts: 25
Karma: 50
Join Date: Apr 2016
Device: calibre
Hi Agama,

Quote:
Originally Posted by Agama View Post
could probably be updated if there is any use for it.
Unless there are more than just a few others interested in this capability, I'm starting to feel that it would be a lot to ask.

But for those of us on Windows, at least, we can use Windows shortcuts instead, as I describe here.

Thanks for checking in.

calibre 2.57.1 [64bit] on Windows 10 Pro
readin is offline   Reply With Quote
Old 06-01-2016, 01:59 PM   #9
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
I might bring it up to date anyway. It's really simple but hasn't kept pace with calibre's updates so I'll need to read the latest plugin documentation.
Agama is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fix "Extra Titles" in Database in " Check Library - Problems Found millan Library Management 33 07-16-2015 07:12 AM
Looking for or requesting a Feature: custom "section" code packer_backer Sigil 4 02-03-2013 09:51 AM
Quick links "Book" for your kindle Harry_Y Amazon Kindle 9 08-24-2011 09:05 PM
New "E-Book Devices" "Bookeen Opus" forum desired ericch Bookeen 3 08-06-2009 06:31 PM


All times are GMT -4. The time now is 06:10 AM.


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