View Single Post
Old 03-26-2016, 12:19 AM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kovidgoyal View Post
As theducks said, you can create arbitrary ids in calibre. However if you want them to be clickable links in the book details panel, you need to use the url prefix, like this

url1:http://whatever
url2:file://whatever
The "file:" url isn't working. It's probably Windows only, but the following doesn't work:

Code:
url1:file://E:/Download/KoboBooks-BookStats.jpg
Checking the code, in ebooks/metadata/sources/identify.py, there is:

Code:
if url and re.match(r'ur[il]\d*$', k) is not None and url.startswith('http'):
Changing that to:

Code:
if url and re.match(r'ur[il]\d*$', k) is not None and (url.startswith('http') or  url.startswith('file')):
Gets the file link displayed, but the colon after the "e" is lost somewhere in the parsing. I get the following error in the console:

Code:
ShellExecute 'file://e/Download/KoboBooks-BookStats.jpg' failed (error 3).
davidfor is offline   Reply With Quote