Quote:
Originally Posted by anoukaimee
I'm wondering the same--how to combine the ratings with those in my ratings column?
|
Sorry, I missed the previous posts, but I like the question.
being not an expert in sqlite, i will give it a try for windows.
- First of all you have to download sqlite3 from the official SQLite website
- Download the file (sqlite-tools-win32-x86-3270200.zip) as shown in the figure below and extract these files in a folder of your choice.

- Copy sqlite3.exe to the directory of your calibre library.
In my case it is: e:\ebooks
- In that directory make a copy of the metadata.db
(for safety reason, in case of errors you can rename the copy back to metadata.db)
- Now open a command window: cmd (in search/windows key)
- Navigate to the library directory (step 3)
in my case
e: +return(for the drive)
cd ebooks +return ( for the directory)
- The command prompt now shows the drive and directory
- In the command window type:
sqlite3 metadata.db + return
- he prompt changes to sqlite.
We have to find the custom column for gr_ratings.
type:
select * from custom_columns; +return (don't forget the ; at the end of the command)

- The results ( see image) shows that gr_ratings is number 42. The first number in the row with gr_rating.
The number for you will be different.
- I presume you have already made the custom columns for the orginal goodreads plugin: grrating en grvotes.
- We only will copy the rating info for books, that have no rating from the orginal goodreads-plugin.
Edit the following lines of code: replace custom_column_42 with custom_column_NR (the number of your column in step 10)
Code:
INSERT INTO identifiers (book, type,val)
SELECT c.book,'grrating', c.value
FROM custom_column_42 AS c
WHERE NOT EXISTS (SELECT 1
FROM identifiers AS Ident
WHERE Ident.book = c.book and Ident.type='grrating');
- Copy and paste the edited code in the command window + return;
- If all is OK, you can close the command window;
- When you start calibre, You wil see that the rating of the goodreads-rating plugin is added to the identifiers of the book and is shown in the grrating column.
- If the database is broken, you can rename the copy of the databse back to metadata.db