Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-09-2010, 01:48 AM   #46
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Quote:
Originally Posted by timlegge View Post
I have attached a new version of the plugin to the first message in this thread (and deleted all the others). It seems to work on both Linux and Windows for my test cases (add-delete, add-eject-connect-delete, save books to disk)...
Tim
Hi Tim,

Well Done! The new driver works very nicely. I was able to add and delete epubs without problems at last.

The only small things I noticed were:-

1. I changed the driver and plugged in the Kobo
2. Waited for the on-Kobo files to appear
3. NO EPUB files appeared on Kobo "page"
4. Ejected Kobo
5. Re-Connected Kobo - hey presto - all files including EPUBS visible

I also noticed that the plugin is now called "001-Kobo Reader Device Interface" etc, so it doesn't list next to the original driver any more, but is at the top of the listing. Not a problem in itself, but just thought I would bring it to your attention.

Thanks for your hard work on this, Tim. I am sure the community will greatly appreciate it!

Cheers
John in Sunny Carnarvon - Western Australia
JBlyth is offline   Reply With Quote
Old 06-09-2010, 03:47 AM   #47
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by timlegge View Post
The path separator issue affected most of the issues. If you see any issues, it would be helpful to know which OS and what the calibre display showed the path to be for the file.
Tim
Tim,

The path separator issue has bitten me more than once.

The 'rules' are:
- lpath must always be the path from the mount point, and must always be forward slashed. It must not have a leading slash.
- path must be the complete path, and must always use os.sep.
- prefix must be the path to the root of the storage, and must use os.sep. It must have a trailing os.sep.

If you carefully follow these rules, then all the various bits of software will know what to do when constructing and manipulating paths.

You might not have noticed a new classfunction added to USBMS.driver, normalize_paths. It takes a constructed path (for example, os.path.join(prefix, lpath)) and returns that path corrected for the local OS and validated to be unicode. The base driver uses that function liberally.
chaley is offline   Reply With Quote
Advert
Old 06-09-2010, 04:31 AM   #48
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Hi Tim,

While you are on a roll, is there any possibility of setting an uploaded new ebook to show in the 'I'm Reading' list of the Kobo.

I understand that if the “FirstTimeReading” database field is set to True, you can control this.

See half way down this page….
http://wiki.durbn.net/koboko/index.php/DBSchemaV2

This is a nice feature of the Borders/Kobo software, I find.

[LATER] Actually, I thought that TAGS would do the trick, but I was mistaken - perhaps a quick "Read" of the Book before sending will work???? - I'll try a few different approaches...

Cheers
John

Last edited by JBlyth; 06-09-2010 at 08:25 PM. Reason: New information....
JBlyth is offline   Reply With Quote
Old 06-09-2010, 10:56 PM   #49
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by JBlyth View Post
Hi Tim,

Well Done! The new driver works very nicely. I was able to add and delete epubs without problems at last.

The only small things I noticed were:-

1. I changed the driver and plugged in the Kobo
2. Waited for the on-Kobo files to appear
3. NO EPUB files appeared on Kobo "page"
4. Ejected Kobo
5. Re-Connected Kobo - hey presto - all files including EPUBS visible
If you did not restart Calibre after the new plugin was added I doubt whether it wold pick up the connected kobo.

Quote:
Originally Posted by JBlyth View Post
I also noticed that the plugin is now called "001-Kobo Reader Device Interface" etc, so it doesn't list next to the original driver any more, but is at the top of the listing. Not a problem in itself, but just thought I would bring it to your attention.
Just a convenience for myself so it would show up at the top of the list.

Tim
timlegge is offline   Reply With Quote
Old 06-09-2010, 11:03 PM   #50
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by chaley View Post
Tim,

The path separator issue has bitten me more than once.

The 'rules' are:
- lpath must always be the path from the mount point, and must always be forward slashed. It must not have a leading slash.
- path must be the complete path, and must always use os.sep.
- prefix must be the path to the root of the storage, and must use os.sep. It must have a trailing os.sep.

If you carefully follow these rules, then all the various bits of software will know what to do when constructing and manipulating paths.
Thanks for the rules I will look to see whether I comply. One of the complications in the case of the Kobo is that the path has to be derived the ContentID in the database. It refers to the device's internal location for the files with '/'s which means on Windows I have to deal with basckslashes in the path and forward slashes in the ContentID at the same time. I will probably create a ContentIDtoPath and PathtoContentID to simplify the code.

Quote:
Originally Posted by chaley View Post
You might not have noticed a new classfunction added to USBMS.driver, normalize_paths. It takes a constructed path (for example, os.path.join(prefix, lpath)) and returns that path corrected for the local OS and validated to be unicode. The base driver uses that function liberally.
I have been using them and they helped a lot.

Thanks

Tim
timlegge is offline   Reply With Quote
Advert
Old 06-09-2010, 11:07 PM   #51
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by JBlyth View Post
Hi Tim,

While you are on a roll, is there any possibility of setting an uploaded new ebook to show in the 'I'm Reading' list of the Kobo.

I understand that if the “FirstTimeReading” database field is set to True, you can control this.

See half way down this page….
http://wiki.durbn.net/koboko/index.php/DBSchemaV2

This is a nice feature of the Borders/Kobo software, I find.

[LATER] Actually, I thought that TAGS would do the trick, but I was mistaken - perhaps a quick "Read" of the Book before sending will work???? - I'll try a few different approaches...

Cheers
John
I initial thought it would be an easy database update after the book is added. Unfortunately the device does not add the database rows until after you remove the device. I have no plans to process the document and insert the rows.

However, it may be possible modify the GUI to allow you to add a book on the device to the reading list. I have not looked at it yet but it might be interesting...

Tim
timlegge is offline   Reply With Quote
Old 06-10-2010, 05:00 AM   #52
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by timlegge View Post
However, it may be possible modify the GUI to allow you to add a book on the device to the reading list. I have not looked at it yet but it might be interesting...
I suggest that you wait until the new device metadata architecture is in place, for two reasons.

1) You will need to change your driver to take the new architecture into account. The caching stuff is completely different, for example.

2) While you are there ... You will have the custom fields available to you. 'Reading list' seems to be a collection of sorts, leading me to suggest that you use the collections box in device customization to pass the name of a (bool) custom column to be used to populate the reading list.

This approach has the advantage of not requiring any modification to Calibre's GUI.
chaley is offline   Reply With Quote
Old 06-10-2010, 08:50 PM   #53
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Sending to Koko "I'm Reading"

I'm not to sure why, but now that I am re-formatting my ebooks with Calibre by converting to EPUB (to ensure there is a CSS file), removing the Style.css file, then re-converting with full justification, all my Kobo uploads are being sent to the "I'm Reading" section of Kobo. This doesn't seem to happen with a "non-fiddled with" file.

This sort of implies that something that Calibre does when creating a fairly blank CSS file sets some sort of flag, but I don't know enough about Calibre to confirm this - heck I've only been using it for about a week ;-)

Cheers
John in Sunny Carnarvon - Western Australia
JBlyth is offline   Reply With Quote
Old 06-10-2010, 10:34 PM   #54
Stinger
Asha'man
Stinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-books
 
Stinger's Avatar
 
Posts: 335
Karma: 844
Join Date: May 2010
Location: Canada
Device: Kobo
Yeah, any newly transferred epubs you load on the Kobo should appear as 'NEW' on the I'm Reading list.

HOWEVER, if you do not open them by the next time you plug in your Kobo, when it processes after unplugging, 'NEW' books get filed away in your library (taken off the list).


@TIM:
Quote:
However, it may be possible modify the GUI to allow you to add a book on the device to the reading list. I have not looked at it yet but it might be interesting...
Personally, I would be more interested in exactly the opposite of this; Taking books on the I'm Reading list and filing them safely in the bookshelf.

Although I don't really know how you would accomplish either using the Calibre GUI. Is Calibre extensible to the point of allowing you to add/modify the context menu so we could do this via right clicks of books on the device list?
Stinger is offline   Reply With Quote
Old 06-19-2010, 08:47 AM   #55
plaid
Connoisseur
plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!
 
Posts: 99
Karma: 5434
Join Date: Sep 2004
Device: Kobo eReader
I followed the instructions to try this new kobo driver, but after I restarted Calibre(0.73) then plugged in my kobo, it gave me this error before showing me my kobo content:

ERROR: ERROR: Unhandled exception: <b>TypeError</b>:expected string or buffer

Traceback (most recent call last):
File "site-packages\calibre\gui2\library\models.py", line 998, in sort
File "site-packages\calibre\gui2\library\models.py", line 955, in _strcmp
File "<string>", line 418, in fget
File "re.py", line 151, in sub
TypeError: expected string or buffer
plaid is offline   Reply With Quote
Old 06-19-2010, 10:14 AM   #56
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by plaid View Post
I followed the instructions to try this new kobo driver, but after I restarted Calibre(0.73) then plugged in my kobo, it gave me this error before showing me my kobo content:

ERROR: ERROR: Unhandled exception: <b>TypeError</b>:expected string or buffer

Traceback (most recent call last):
File "site-packages\calibre\gui2\library\models.py", line 998, in sort
File "site-packages\calibre\gui2\library\models.py", line 955, in _strcmp
File "<string>", line 418, in fget
File "re.py", line 151, in sub
TypeError: expected string or buffer
What version of calibre are you running? What operating system?

Tim
timlegge is offline   Reply With Quote
Old 06-21-2010, 10:02 PM   #57
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Hi

Here is a new version of the plugin (attached to first message in the Thread). Not drastically different but the code is more Calibre like. One added feature is to use the color images where they exist.

There is a known issue with PDFs. I am hoping for some clarification from someone at Kobo as certain PDFs are only referenced in the content table while others are two tables. So if a PDF of yours is missing that is the reason.

It might be an idea to delete the metadate.calibre file from the device before using it but restarting Calibre a second time should clear up any issues due to the metadata changes.

Barring any big issues I hope to get this version pushed to the main Calibre code base in the near future.

Let me know if you have any issues.

The testing on Linux was fairly detailed. I have done a subset of that on Windows and none on Mac.
Tim
timlegge is offline   Reply With Quote
Old 06-21-2010, 10:53 PM   #58
plaid
Connoisseur
plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!plaid , Klaatu Barada Niktu!
 
Posts: 99
Karma: 5434
Join Date: Sep 2004
Device: Kobo eReader
Quote:
Originally Posted by timlegge View Post
What version of calibre are you running? What operating system?

Tim
I was running Calibre .73 on windows xp, but it doesn't matter for me anymore, as with Calibre .74 and the latest plugin you just posted, I am having no problems. Thanks!
plaid is offline   Reply With Quote
Old 06-22-2010, 07:37 AM   #59
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by plaid View Post
I was running Calibre .73 on windows xp, but it doesn't matter for me anymore, as with Calibre .74 and the latest plugin you just posted, I am having no problems. Thanks!
Great, glad to hear it.

Tim
timlegge is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Calibre Kobo Driver allows deleting of Kobo Free books timlegge Kobo Reader 46 08-27-2011 10:16 PM
Updated Kobo driver in Calibre 0.7.5 timlegge Kobo Reader 22 06-29-2010 08:14 AM
Calibre now has Kobo driver ! taming Kobo Reader 18 05-27-2010 07:36 PM
Beta Beta Test of Major New Features Starson17 Calibre 45 05-17-2010 10:55 AM
New Kobo driver bug Stinger Calibre 6 05-17-2010 09:47 AM


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


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