View Single Post
Old 10-21-2012, 06:39 PM   #17
Xwang
Connoisseur
Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2136220
Join Date: Sep 2012
Device: none
Quote:
Originally Posted by JimmXinu View Post
I'd forgotten that searches are case insensitive, so the regexp search doesn't work, sorry.

Getting and setting custom column values is pretty easy:

Code:
existing=db.get_custom(book_id,label=label,index_is_id=True)

db.set_custom(book_id, value, label=label, commit=True)
Where label is the # name, like #wordcount, or whatever you set it to.

(added) And, of course, you can use the custom column for the search instead of the regexps.
I've done as you suggested and also this problem seem solved.
I attach the latest version just in case it is useful to someone else (in the next few days I will try on windows and on my huge collection of about 1000 books).
Xwang
Attached Files
File Type: zip Upperize_DB.zip (11.7 KB, 266 views)
Xwang is offline   Reply With Quote