Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 01-04-2020, 10:31 AM   #271
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
Read the Menu ToolTips

Quote:
Originally Posted by Angelo.Mascaro View Post
I searched the table _mcs_authors_by_book with DB Browser for SQLite with this query:
SELECT authorname, count(book) AS totalbook
FROM _mcs_authors_by_book
GROUP BY authorname
ORDER BY totalbook DESC
because I wanted to know the authors with more books.
I discovered that this table does not reflect the true content of the library and all the deleted/moved books are still considered. The field book in this table points to id of books that are no longer in the table books.
Would it be possible to fix this modifying the TRIGGER books_delete_trg in one of the next versions? Or maybe there is a way to realign the table to the library?

If you bother to read the MCS icon menu's tooltips, you will discover that the MCS search acceleration tables are automatically maintained by MCS. In other words, you have to actually use MCS to have MCS keep them refreshed and up-to-date.




DaltonST

Last edited by DaltonST; 01-04-2020 at 11:28 AM.
DaltonST is offline   Reply With Quote
Old 01-13-2020, 12:28 PM   #272
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Quote:
Originally Posted by DaltonST View Post
[1] The unique similarity group ID custom column is tag-like, so there only needs to be one (1) of it. To compare multiple columns for each book, simply execute the query for each column sequentially. The image shows that many queries for different comparison value columns have already been executed, with the many unique similarity group IDs for each book, if any, so indicated.


[2] The Value Comparison Percentage specifies how similar a comparison value has to be for one book to another book for a specific comparison value from the specified comparison value column. 100% means "identical".


Attached is an example that includes the Debug Log.

DaltonST
Would it be possible to add the percentage from the debug-log to Calibre? Or base the different tag-names on the percentages?

If it's a 100% match: Title_100_1 or so?
Tanjamuse is offline   Reply With Quote
Advert
Old 04-09-2020, 08:37 PM   #273
kcarscadden
Zealot
kcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavens
 
kcarscadden's Avatar
 
Posts: 138
Karma: 13776
Join Date: Jan 2007
Location: semi-north Ontario, Canada (N 45.41 W -79.67)
Device: iPad Air 5, Samsung Galaxy S20 FE
@DaltonST, could you please review thread searching for books modified in the main Calibre forum.

As you see, I would like to do a search on a column that appears to only have data in the memory resident database that is used for search, sorting etc and by plugins, not in metadata.db So far, I have not been able to get MCS to search this column. Could you take a look and see if you have any suggestions?
kcarscadden is offline   Reply With Quote
Old 04-09-2020, 11:37 PM   #274
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
Quote:
Originally Posted by kcarscadden View Post
@DaltonST, could you please review thread searching for books modified in the main Calibre forum.

As you see, I would like to do a search on a column that appears to only have data in the memory resident database that is used for search, sorting etc and by plugins, not in metadata.db So far, I have not been able to get MCS to search this column. Could you take a look and see if you have any suggestions?



MCS searches metadata.db standard and custom column tables using SQL. Composite columns are virtual and do not get stored in metadata.db in their assigned table(s). SQL finds nothing for them. This is not a bug. Virtual means virtual.

Last edited by DaltonST; 04-10-2020 at 10:41 AM.
DaltonST is offline   Reply With Quote
Old 04-10-2020, 02:01 PM   #275
kcarscadden
Zealot
kcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavens
 
kcarscadden's Avatar
 
Posts: 138
Karma: 13776
Join Date: Jan 2007
Location: semi-north Ontario, Canada (N 45.41 W -79.67)
Device: iPad Air 5, Samsung Galaxy S20 FE
@DaltonST, OK, thanks. I expected it searched metadata.db, but still hoped . ..
kcarscadden is offline   Reply With Quote
Advert
Old 04-10-2020, 05:17 PM   #276
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
Version 1.0.80 Ability to search table books_plugin_data

Version 1.0.80 - 10 April 2020 Ability to search table books_plugin_data using new Raw SQL Query user function keyword "PARSEJSON".

See the attached image.

I have tested this in both Python 2 and Python 3.



DaltonST


BTW: the plugin that updates table books_plugin_data, SaveCompositeCustomColumns, will not compile as of this writing in Python 3 Calibre 4.99.4.
Attached Thumbnails
Click image for larger version

Name:	mcs_sql_query_parsjson_keyword_composite_custom_columns.jpg
Views:	192
Size:	1.24 MB
ID:	178247  
DaltonST is offline   Reply With Quote
Old 04-11-2020, 11:43 AM   #277
kcarscadden
Zealot
kcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavens
 
kcarscadden's Avatar
 
Posts: 138
Karma: 13776
Join Date: Jan 2007
Location: semi-north Ontario, Canada (N 45.41 W -79.67)
Device: iPad Air 5, Samsung Galaxy S20 FE
@DalsonST, after loading the new version of MCS 1.0.80, attempting to use PARSEJSON gives error "Raw SQL Query Fatal Error: SQLError: no such function parsejson'

Do I need to do something additional to get parsejson?
kcarscadden is offline   Reply With Quote
Old 04-11-2020, 12:23 PM   #278
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
Quote:
Originally Posted by kcarscadden View Post
@DalsonST, after loading the new version of MCS 1.0.80, attempting to use PARSEJSON gives error "Raw SQL Query Fatal Error: SQLError: no such function parsejson'

Do I need to do something additional to get parsejson?

Spell it as instructed: PARSEJSON not parsejson.


Added: I will add automatic correction of PARSEJSON capitalization errors in the next version of MCS.




DaltonST

Last edited by DaltonST; 04-11-2020 at 01:35 PM.
DaltonST is offline   Reply With Quote
Old 04-11-2020, 02:28 PM   #279
kcarscadden
Zealot
kcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavenskcarscadden is a rising star in the heavens
 
kcarscadden's Avatar
 
Posts: 138
Karma: 13776
Join Date: Jan 2007
Location: semi-north Ontario, Canada (N 45.41 W -79.67)
Device: iPad Air 5, Samsung Galaxy S20 FE
@DaltonST, Oops, thanks. Of course, python is case sensitive, even though SQL is not.
kcarscadden is offline   Reply With Quote
Old 05-21-2020, 08:52 AM   #280
GruberMa
Junior Member
GruberMa began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2016
Device: Amazon Kindle Paperwhite (1, 2)
Hi DaltonST,
Hi everyone,

Since some time, indexing new/unindexed books in TXT formats on my system results in the Calibre error
Code:
force_refresh_of_cache() takes exactly 2 arguments (1 given)
Details:
Code:
calibre, version 4.16.0
FEHLER: Unbehandelter Ausnahmefehler: <b>TypeError</b>:force_refresh_of_cache() takes exactly 2 arguments (1 given)

calibre 4.16 Portable embedded-python: True is64bit: False
Windows-10-10.0.19041-SP0 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '10', '10.0.19041')
Python 2.7.16+
Windows: ('10', '10.0.19041', 'SP0', u'Multiprocessor Free')
Interface language: de
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 31, 0) && Package KFX (from KFX Input) (1, 31, 0) && Modify ePub (1, 4, 1) && KindleUnpack - The Plugin (0, 82, 1) && KFX metadata reader (from KFX Input) (1, 31, 0) && KFX Input (1, 31, 0) && Kindle hi-res covers (0, 4, 0) && Set KFX metadata (from KFX Output) (1, 41, 1) && KFX Output (1, 41, 1) && MultiColumnSearch (1, 0, 81)
Traceback (most recent call last):
  File "site-packages\calibre\gui2\__init__.py", line 484, in dispatch
  File "calibre_plugins.multi_column_search.ui", line 6384, in mcs_finish_with_refresh
TypeError: force_refresh_of_cache() takes exactly 2 arguments (1 given)
The job log of MCS shows the following error message
Code:
SQLError: unknown database _mcs_word_book_index


All library and database checks within Calibre are successful, I do not recognize any other errors.

Removing the search accelerators, uninstalling MCS and installing it again did not help.

When searching for the error message, I found https://www.mobileread.com/forums/sh...d.php?t=246486 - as this thread was created and answered by DaltonST himself, it might not be of help in this case.


Does anyone have an idea, how to get rid of this error? If tests or logs are needed, I will be glad to provide them.

Cheers,

GruberMa
GruberMa is offline   Reply With Quote
Old 05-21-2020, 11:40 AM   #281
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
You need to post your entire Calibre MCS debug log. Run Calibre in debug mode, then recreate your error.

Also, post your Job Log of the indexing job that is causing this error.

This error is being caused by a callback from the indexing Job to MCS.

You said "Removing the search accelerators" did not work. That is only for permanently uninstalling MCS. To reinstall all search accelerators, reinstall MCS and then execute the MCS dialog to automatically reinstall them.


Added: The indexing job works perfectly for me. See the attached job log.


Where is your metadata.db? In the cloud? On a LAN?






DaltonST
Attached Thumbnails
Click image for larger version

Name:	2020-05-21 10_59_40-Window.jpg
Views:	168
Size:	316.0 KB
ID:	179397  

Last edited by DaltonST; 05-21-2020 at 12:02 PM.
DaltonST is offline   Reply With Quote
Old 05-21-2020, 12:55 PM   #282
GruberMa
Junior Member
GruberMa began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2016
Device: Amazon Kindle Paperwhite (1, 2)
Thanks for your fast answer!

My database is located on a hard drive folder, synchronized with OneDrive. The error also occurs, if the OneDrive process is not running or if I move the whole folder to USB and open Calibre Portable on another computer.

The debug output is as follows:

Code:
calibre Fehlerdiagnoseprotokoll
calibre 4.16 Portable embedded-python: True is64bit: False
Windows-10-10.0.19041-SP0 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '10', '10.0.19041')
Python 2.7.16+
Windows: ('10', '10.0.19041', 'SP0', u'Multiprocessor Free')
Interface language: de
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 31, 0) && Package KFX (from KFX Input) (1, 31, 0) && MultiColumnSearch (1, 0, 81) && Set KFX metadata (from KFX Output) (1, 41, 1) && KFX Output (1, 41, 1) && Kindle hi-res covers (0, 4, 0) && KindleUnpack - The Plugin (0, 82, 1) && KFX metadata reader (from KFX Input) (1, 31, 0) && KFX Input (1, 31, 0) && Modify ePub (1, 4, 1)
calibre 4.16 Portable embedded-python: True is64bit: False
Windows-10-10.0.19041-SP0 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '10', '10.0.19041')
Python 2.7.16+
Windows: ('10', '10.0.19041', 'SP0', u'Multiprocessor Free')
Interface language: de
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 31, 0) && Package KFX (from KFX Input) (1, 31, 0) && MultiColumnSearch (1, 0, 81) && Set KFX metadata (from KFX Output) (1, 41, 1) && KFX Output (1, 41, 1) && Kindle hi-res covers (0, 4, 0) && KindleUnpack - The Plugin (0, 82, 1) && KFX metadata reader (from KFX Input) (1, 31, 0) && KFX Input (1, 31, 0) && Modify ePub (1, 4, 1)
Turning off automatic hidpi scaling
devicePixelRatio: 1.0
logicalDpi: 144.0 x 144.0
physicalDpi: 46.4457142857 x 46.4949152542
Using calibre Qt style: False
[0.00] Starting up...
[0.00] Showing splash screen...
[0.49] splash screen shown
[0.49] Initializing db...
[0.53] db initialized
[0.53] Constructing main UI...
[0] un-optimized number of undesirable characters accumulated:  757
[1] optimized number of undesirable characters accumulated:  597
MCS has finished initialization...
[2.62] main UI initialized...
[2.62] Hiding splash screen
[19.20] splash screen hidden
[19.22] Started up in 19.22 seconds with 722 books
mcs_build_index:  D:\OneDrive\Buecher\Calibre Library
starting vacuum
calibre 4.16 Portable embedded-python: True is64bit: False
Windows-10-10.0.19041-SP0 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '10', '10.0.19041')
Python 2.7.16+
Windows: ('10', '10.0.19041', 'SP0', u'Multiprocessor Free')
Interface language: de
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 31, 0) && Package KFX (from KFX Input) (1, 31, 0) && MultiColumnSearch (1, 0, 81) && Set KFX metadata (from KFX Output) (1, 41, 1) && KFX Output (1, 41, 1) && Kindle hi-res covers (0, 4, 0) && KindleUnpack - The Plugin (0, 82, 1) && KFX metadata reader (from KFX Input) (1, 31, 0) && KFX Input (1, 31, 0) && Modify ePub (1, 4, 1)
Traceback (most recent call last):
  File "site-packages\calibre\gui2\__init__.py", line 484, in dispatch
  File "calibre_plugins.multi_column_search.ui", line 6384, in mcs_finish_with_refresh
TypeError: force_refresh_of_cache() takes exactly 2 arguments (1 given)

Job: 0 MultiColumnSearch: Build Index finished
Starting job: MultiColumnSearch: Build Index 
	  
	D:/OneDrive/Buecher/Calibre Library/metadata.db 
	Thu May 21 18:42:25 2020 
	Python: Windows   CPython   2.7.16+ 
	SQLite Version: 3031001    [APSW] 
	PRAGMA main.busy_timeout = 15000; 
	  
	Beginning 'Index Words by Book'  
	═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ 
	  
	Indexing Action chosen: Index All Unindexed Books [TXT Only] 
	  
	  
	Number of books available to be indexed if needed and possible:    722 
	Number of unindexed books that need to be indexed if possible: 5 
	  
	Word lengths in this min/max range will be indexed:  3 to 50 
	  
	  
	  
	  
	  
	Custom Column #mcs_was_indexed has been synchronized with the word-book index for non-MCS (i.e., user) index deletions or insertions, if any. 
	  
	  
	  
	Total number of books indexed: 0 
	  
	Total number of words indexed: 0 
	  
	  
	Deleted Books or Invalid Books added via a CSV file, if any, have been removed from the Index. 
	  
	  
	SQLError: unknown database _mcs_word_book_index 
	You should now defragment/vacuum this library's metadata.db by invoking Calibre menu path: Library > Library Maintenance > Check Library. 
	  
	  
	MCS Word by Book Indexing is Complete.
GruberMa is offline   Reply With Quote
Old 05-21-2020, 01:38 PM   #283
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
Just found a regression error caused by changes for Python 3 used by Calibre 4.99.5. I will upload a new version of MCS after I have fully retested it in Calibre 4.99.5 and 4.16.


DaltonST
DaltonST is offline   Reply With Quote
Old 05-21-2020, 02:04 PM   #284
GruberMa
Junior Member
GruberMa began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2016
Device: Amazon Kindle Paperwhite (1, 2)
Quote:
Originally Posted by DaltonST View Post
Just found a regression error caused by changes for Python 3 used by Calibre 4.99.5. I will upload a new version of MCS after I have fully retested it in Calibre 4.99.5 and 4.16.


DaltonST
Thank you very much!
GruberMa is offline   Reply With Quote
Old 05-21-2020, 02:46 PM   #285
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
Version 1.0.82 - Python 3 regression errors fixed

Version 1.0.82 - 21 May 2020 Python 3 regression errors fixed.


As a reminder, the post immediately after the Original Post has additional documentation and overview images that Mobileread.com does not allow in the OP due to the "18 attachments maximum" rule.



DaltonST
DaltonST is offline   Reply With Quote
Reply

Tags
columns, search


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Clipboard Search kiwidude Plugins 29 04-02-2024 10:05 PM
[GUI Plugin] Search the Internet kiwidude Plugins 433 04-01-2024 05:48 PM
[GUI Plugin] Walk Search History kiwidude Plugins 38 03-17-2024 12:47 AM
[GUI Plugin] Recoll Full Text Search Satas Plugins 16 08-05-2016 03:54 AM
[GUI Plugin] Full Text Search (SOLR) peterpisljar Plugins 2 08-09-2015 08:16 AM


All times are GMT -4. The time now is 07:29 PM.


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