Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2012, 03:03 AM   #1
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,550
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
outsourced long text

I've been thinking if using some long text custom columns to hold some chunks of HTML that would show up in Book Details. However I prefer to create & maintain the HTML outside of Calibre because a) I use things like tables & drop downs, and b) the space & function available in Calibre's Metadata Editor is limited.

I can cut the HTML from my IDE editor and paste into a Long Text Custom Column and it works fine, but its tedious and fraught with version management pitfalls.

I would suit me better if there was a Column Type of 'outsourced long text' that contained a file link to my HTML file, which the Book Details painter would read and render the same as an 'embedded long text' Column.

For the record I do not want to put the HTML in the book folder, in the HTML itself I put a link to the file which is located elsewhere (i.e. self reference), that location is managed by subversion.

All I'm seeking at this stage is an opinion on
  1. is it 'doable'
  2. how difficult is it
  3. whether it would undermine the Calibre architecture,

I don't want to take on something that will 'break' Calibre, nor do I want to take on something that someone au fait with Calibre's internals could and is willing to do in 30 minutes what would probably take me a week. After 40+ years at it, I now find programming tedious, so make that three weeks

BR
BetterRed is online now   Reply With Quote
Old 09-02-2012, 05:06 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It should be pretty trivial to do, but it is not something I will accept in calibre, as maintain links to external files breaks the portability of the calibre library. You are of course welcome to make the changes in your local copy of calibre.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-02-2012, 05:07 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you do want to implement this, I woudl instead suggest making a plugin like the open with plugin that opens your external editor of choice with the contents of the custom column and updates the column when the editor exits.
kovidgoyal is offline   Reply With Quote
Old 09-03-2012, 12:30 AM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,550
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
If you do want to implement this, I woudl instead suggest making a plugin like the open with plugin that opens your external editor of choice with the contents of the custom column and updates the column when the editor exits.
  • I like the idea of a plug-in better than putting it the core, but I think I'll just make it read an HTML file and write what it finds into the custom column. I don't want Calibre to be the primary container of the HTML.
  • Will having screeds of HTML in a custom column have any serious impact on Calibre performance. My understanding is that it will be stored in metadata.db. Performance was one of the reasons I thought of having it external. Apart from rendering it in Book Details what else can Calibre do with it. Search it I guess, there's a can of worms lurking there though, "background and style" returns spurious results because it finds HTML keywords, I wasn't expecting it to do otherwise. I searched for "Apple" in Comments once and got a lot of false positives, because there were lots of these in downloaded Comments

    Code:
    <h3><span class="Apple-style-span" style="font-size: 12px; font-weight: normal; ">
  • Maybe longtext columns should be exclude-able from Search.
  • What can & can't I do in the HTML that I put in a long text Custom Column. I already know I can do things that the wysiwyg interface doesn't support. I can find out by trial and error, but if there are some guidelines or standards then ...
BTW, I was surprised to find longtext custom columns can appear in the Book List, even though Comments can't, is that by design or by chance. If by design then why exclude Comments ?

BR

Last edited by BetterRed; 09-03-2012 at 12:33 AM.
BetterRed is online now   Reply With Quote
Old 09-03-2012, 12:44 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by BetterRed View Post
BTW, I was surprised to find longtext custom columns can appear in the Book List, even though Comments can't, is that by design or by chance. If by design then why exclude Comments ?
By Book List are you referring to the Book Details pane? If so comments are not excluded, if selected they just always show up at the end of the pane and can not be moved within the Book details pane.
Attached Thumbnails
Click image for larger version

Name:	bookdetails_pref.jpg
Views:	258
Size:	125.4 KB
ID:	91743  

Last edited by DoctorOhh; 09-03-2012 at 12:46 AM.
DoctorOhh is offline   Reply With Quote
Advert
Old 09-03-2012, 01:00 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can exclude whatever you want from search: Preferences->Searching
kovidgoyal is offline   Reply With Quote
Old 09-03-2012, 04:42 AM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,550
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by dwanthny View Post
By Book List are you referring to the Book Details pane? If so comments are not excluded, if selected they just always show up at the end of the pane and can not be moved within the Book details pane.
Whew - you had me worried momentarily - I mean the Book List, the panel in the middle, order specified in Define Columns - see piccies

Comments, a predefined longtext column, must go at the end of book details, but custom longtext can go anywhere I please, except after Comments

Quote:
Originally Posted by kovidgoyal View Post
You can exclude whatever you want from search: Preferences->Searching
Thanks - Search is not something I do much, I've never opened Prefs->Search, not even sure I was cognizant of its existence

Any thoughts on the performance impact of adding a 2-3K chunk of HTML to each book. Now that I know how to exclude them from search I will, so the only thing Calibre will do with the HTML is to render it in the Book Details.

br
Attached Thumbnails
Click image for larger version

Name:	Capture 2.JPG
Views:	297
Size:	35.4 KB
ID:	91746   Click image for larger version

Name:	Capture.JPG
Views:	252
Size:	42.6 KB
ID:	91747  

Last edited by BetterRed; 09-03-2012 at 05:46 AM.
BetterRed is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre taking a long, long time to update metadata on sony prs650 hydin Calibre 5 06-05-2012 12:21 AM
Fonts for body text - a small study (long) derangedhermit Workshop 9 08-25-2011 04:27 AM
No search/replace on custom long text column? CWatkinsNash Library Management 2 06-20-2011 05:57 PM
Support officially outsourced to Phillippines (paid support) larka enTourage eDGe 5 06-08-2011 12:48 AM
Free Download: Santa Gets Outsourced: A Short Story gayletiller Self-Promotions by Authors and Publishers 3 12-26-2010 01:23 AM


All times are GMT -4. The time now is 04:06 AM.


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