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 11-20-2024, 02:43 PM   #1
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
[GUI Plugin] Pocketbook Collections

Pocketbook Collections

I waited for years for someone to write this plugin, but nobody did, so I finally decided to do it myself. Here is the plugin to sync Pocketbook collections with Calibre!

What it does

This plugin allows you to send your collections, read marks and favorite marks from Pocketbook device to Calibre custom columns and vice versa. You can send and load all at once or do collections and statuses separately (can be useful, for example, if you want to send collections from Calibre and load read statuses from device without overwriting anything).

How it works

For the plugin to work you need to create three custom columns with lookup names "#shelf", "#read" and "#favorite". The "#shelf" column must be of "comma separated text" type, the other two — of "yes/no" type. You can skip some columns you don't need. You can also change columns lookup names in plugin's settings. After that you can connect the device and run send and load commands from the plugin's menu.

IMPORTANT! This plugin only works with the books that have been already indexed by device. This means, if you add some new books to the reader, you need to unplug it, wait a few seconds for the device to find books and add them to the database, then plug it again, and only then you can send collections for these books. Also if you added some books not from Calibre, make sure that the device metadata is updated. I tried to find the way to add the books to device database manually, but it didn't work, because Pocketbook keeps rewriting data.

This plugin was tested on my Pocketbook 627. It should also work on some other Pocketbook devices if they use the same database structure. It would probably not work on the older devices that do not support collections.

If you ever tried my old app I posted about there and it worked with your device, this plugin should work too.

Since version 1.1.1 plugin works on Calibre v.3.48.0 and later. It might actually work on earlier versions, but I didn't checked it yet.

This is my first plugin and I actually know very little of Python, so any advices of improvements would be appreciated.

Link to Github.
Attached Files
File Type: zip pocketbook-collections.zip (171.8 KB, 199 views)

Last edited by Reaty; 11-30-2024 at 08:07 AM.
Reaty is online now   Reply With Quote
Old 11-20-2024, 02:47 PM   #2
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
reserved post
Reaty is online now   Reply With Quote
Advert
Old 11-22-2024, 05:42 PM   #3
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Update - version 1.1.2: Fixed the bug when Calibre would stuck trying to delete non-existing data when loading statuses.

Last edited by Reaty; 11-24-2024 at 09:42 AM.
Reaty is online now   Reply With Quote
Old 11-24-2024, 10:15 AM   #4
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Update - version 1.2.0:
  • Added support for devices with multiple profiles (now all the data will be synced with the current profile instead of the default one).
  • Added ability to sync reading position (if you have the Coolreader app installed on Pocketbook, you can sync Coolreader's position too).

About syncing of reading positions:

Positions are stored as plain text in yet another custom column (can be text or comments type). There is no way to use these positions in Calibre or for syncing with different apps. I made this functional mainly for backup, because sometimes reader erases saved positions, for example when you move your books around, etc. Now they can be preserved in Calibre and easily restored when lost.

You can save positions for the main Pocketbook reader app and for Coolreader app. They are using different formats, so you will need two separate custom columns, if you want to save both. If you only need to save positions for one app, remove the column name you don't need in the plugin's settings.

Syncing never ever deletes any saved position. If you have position in the reader and don't have in in Calibre, it would be added to Calibre, and if you have in in Calibre and don't have it in the reader, it would be added to the reader. If both Calibre and the reader have saved positions, the one with the latest timestamp would be added to both. This way you will always have your latest positions saved.

Keep in mind then in Pocketbook reading position and completion mark are connected, so you will lose you completion mark if you open the book in PB app with position less then 100%. Coolreader's position do not affect completion marks.

This new functional is rather experimental, especially with Coolreader, because it stores it's positions in xml instead of database. So let me know if there is any bugs.
Reaty is online now   Reply With Quote
Old 11-25-2024, 11:44 PM   #5
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Update - version 1.2.1:
  • Fixed the bug with Coolreader position not always syncing correctly.
  • Added some database cleaning on background.
Reaty is online now   Reply With Quote
Advert
Old 11-26-2024, 01:55 PM   #6
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Update - version 1.2.2: Fixed the bug that made metadata loading slow.
Reaty is online now   Reply With Quote
Old 11-26-2024, 03:12 PM   #7
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Update - version 1.2.3: Quick fix of the bug with syncing positions that appeared in previous version.
Reaty is online now   Reply With Quote
Old 11-27-2024, 02:39 PM   #8
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Update - version 1.2.4: Fixed bug with syncing Coolreader positions.
Reaty is online now   Reply With Quote
Old 11-29-2024, 09:35 AM   #9
reuerendo
Member
reuerendo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2023
Device: PocketBook InkPad 4
Unfortunately the plugin doesn't work with my device (Inkpad 4)

Error:
TypeError: cannot unpack non-iterable NoneType object
reuerendo is offline   Reply With Quote
Old 11-29-2024, 03:18 PM   #10
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Do you use the last version? I fixed some bugs with such errors lately. Also what command did you use? Do error occurs during any of commands, or just some?

Last edited by Reaty; 11-29-2024 at 03:20 PM.
Reaty is online now   Reply With Quote
Old 11-29-2024, 03:23 PM   #11
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Also can you try to run Calibre in debug mode and show me the logs?
Reaty is online now   Reply With Quote
Old 11-30-2024, 03:27 AM   #12
reuerendo
Member
reuerendo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2023
Device: PocketBook InkPad 4
Yes, I am using the latest version. Both the plugin and the program. The error appears with any command
Attached Files
File Type: txt tmpq2m82uba.txt (2.4 KB, 6 views)
reuerendo is offline   Reply With Quote
Old 11-30-2024, 04:43 AM   #13
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Okay, I don't see what the error is about... Maybe you can try to install the new version I just uploaded? I added some extra error and debug messages, so maybe we can figure what's going wrong.
Reaty is online now   Reply With Quote
Old 11-30-2024, 04:47 AM   #14
Reaty
Member
Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.Reaty put the bomp in the bomp-a-bomp-a-bomp.
 
Posts: 24
Karma: 67268
Join Date: Nov 2020
Device: PocketBook Touch Lux 4
Also, just to be sure. Does your device have the file "explorer-3.db" in "system/explorer-3" folder?
Reaty is online now   Reply With Quote
Old 11-30-2024, 05:48 AM   #15
reuerendo
Member
reuerendo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2023
Device: PocketBook InkPad 4
Now another error, but still not working. The location of the database is correct
Attached Files
File Type: txt tmpylgsbbxn.txt (1.8 KB, 7 views)
reuerendo 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] PocketBook Tools wold Plugins 36 11-30-2024 07:01 AM
[GUI Plugin] Kindle Collections (Update) NiLuJe Plugins 467 09-05-2024 06:09 PM
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 04:15 PM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 06:25 AM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 01:02 AM


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


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