![]() |
#16 | ||
Frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,217
Karma: 5422155
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
Adding a "link" to all columns could be better than the search scheme proposed above, but possibly not. Search links can be entered without looking at the other library or knowing the book id. They tolerate the book id being changed. A hybrid method is to add a column that contains the other library name and the column to search instead of a book link. Related: I have been bothered for a long time that entering a link in the authors table silently overrides all the other link options. My personal preference would be to use two links as in: Authors: Joe Blogs (details), John Smith (details) The link for the author would do what is specified in Look & feel. The "details" link would use the link in the authors table. This same idea would extend to the other columns.The current "implementation" using a column gives us a way to test these theories without changing the database scheme and introducing a mess of UI changes. I will look a bit more at what I have done, but won't submit it until we reach some resolution. |
||
![]() |
![]() |
![]() |
#17 |
Frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,217
Karma: 5422155
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I saw the enhancement request and also the post on the other thread. On top of that I (and Kovid) have been thinking about this problem since the beginning of the year. I put it aside because of travel and illness.
|
![]() |
![]() |
![]() |
#18 |
null operator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,416
Karma: 24342256
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I have multiple content libraries (e.g. Books, Periodicals, Media) which have content from common creators - e.g. Professor Jeffery Sachs.
I have 47 of his 'works' distributed across my Books, Journals and Media libraries all of which link to one record in my Creators library, and in the Links column of that record I have a calibre:\\search URLs for the three libraries, along with links to his WikiP page, his page at Columbia, his JDS blog etc. I do not create a record in my Creators library for every author in my Books, Journals and Media libraries - maybe 10-15%. If I want to browse my Creators library, whilst accessing my Books, Periodicals and Media libraries, I use calibre-spy. I mention this because it can provide the calibre:\\ links for that library to paste wherever BR Last edited by BetterRed; 03-24-2023 at 07:57 PM. |
![]() |
![]() |
![]() |
#19 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,553
Karma: 20170928
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I dont mind having this facility, it doesnt impinge on anyone not using it, so there arent many downsides. As I said in the ticket, patches welcome. However, I dont think its suitable as a general solution to storing information about non-book entities.
|
![]() |
![]() |
![]() |
#20 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,553
Karma: 20170928
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#21 | |
Frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,217
Karma: 5422155
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Not totally, but my brain has defogged enough where I am doing fewer silly things.
Quote:
As for the proposal: I decided to look at adding a links column to normalized tables in the database. With this I can get rid of the new template function and the calibre://book-details-search link. If a link for an item is defined then it shows like this example: There are two links there shown as '(item link)'. The item does what it normally does in calibre. The 'item link' opens whatever the link says. The API in db.cache is: Code:
@read_api def get_links_for_field(self, field, values): ''' field: the lookup name values: singleton, list or tuple of field values. returns dict(field_value:link_value, ...) ''' @write_api def set_link_for_field(self, field, value_to_link_map): ''' field: the lookup name value_to_link_map: dict(field_value:link, ...) returns books changed by setting the link ''' |
|
![]() |
![]() |
![]() |
#22 | |
null operator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,416
Karma: 24342256
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() Nor is impalement of a leg with sharp stick, as happened to me in March last year. Even though the wound was small (< 1cm) and didn't bleed much, it was deep. Took two OT sessions under GA to remove the debris and a third for a skin graft, I now have two more scars, one at the wound site (lower calf) and another at the graft donor site (upper thigh). The medics were concerned the wound would ulcerate - fortunately it didn't, in no small part thanks to their efforts; ftr: March 2022 was peak pandemic in Sydney. But at least, I got to know what a plastic surgeon is. BR Last edited by BetterRed; 03-24-2023 at 08:36 PM. |
|
![]() |
![]() |
![]() |
#23 |
null operator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,416
Karma: 24342256
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Curiosity questions:
1. Why don't I see calibre in here? 2. What are the ramifications of a user choosing the Entire feature will be unavailable: for the Register calibre:// URLs installer setting - does it mean the copy links options in Book Details will be hidden or unavailable? 3. Also, what is the default setting for that installer option, I don't recall making a decision between the first 3 options. BR |
![]() |
![]() |
![]() |
#24 | |
null operator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,416
Karma: 24342256
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I thought adding columns to calibre's database tables was off-limits because of the potential impact on the databases in the wild. BR |
|
![]() |
![]() |
![]() |
#25 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,553
Karma: 20170928
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There's a lot of pink skin now, so hopefully the scarring wont be too bad. Coconut oil which is a bit of a cure all in India, works well on these.
@BR: 1) No idea 2) It just means the URL scheme wont be registered with windows. no functionality in calibre is changed 3) the defaults are to install everything |
![]() |
![]() |
![]() |
#26 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,553
Karma: 20170928
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@charles: Adding a link column is fine by me.
@BR: No the calibre datbase has undergone lots and lots of changes over the years. See the schema_upgrades.py file for details. |
![]() |
![]() |
![]() |
#27 | |
null operator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,416
Karma: 24342256
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Whilst you're there could you pop the Link value in a tooltip on mouse hover, they are often quite long.
Quote:
![]() btw - the plastic surgery dressings nurse gave me some coconut oil to put on my leg. BR |
|
![]() |
![]() |
![]() |
#28 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 42,553
Karma: 20170928
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#29 | ||
Frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,217
Karma: 5422155
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
There are always risks when changing the schema because reverting to a previous calibre release (before the change) might not work. I don't think this change will do that, but it might. In addition, anyone who reads the upgraded tables using SELECT * expecting to get the old number of values will have problems. As I said when I taught a database course way-back-when, don't do that. Always select only the columns you need. |
||
![]() |
![]() |
![]() |
#30 |
Frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,217
Karma: 5422155
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
@kovid: referring back to the ideas we discussed in January:
I built a test implementation that uses a "popup:" action in the link field to open an information dialog to display the contents. I added invoking the rich text editor (CommentsDialog) in the context menu of the links field to make it easier to set it. The result: the rich text document is displayed when the link on the item is clicked. Including images, as long as they are file:// urls. This might be a way to go forward with the original idea. The link field can refer to whatever the user wants: another library, a web site, a local "description document", or whatever. The methods can be intermixed. The "description document" rich text editor could cache images locally (as we discussed). Cleanup can happen when a table line is removed (a trigger, again as you suggested). I haven't submitted these changes. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre book details | detourx | Calibre | 8 | 07-08-2021 03:35 AM |
Calibre Book Details now blank. | polli | Library Management | 8 | 06-01-2016 08:31 AM |
Calibre:Book Cover size in Book Details side pane & Edit Metadata Individually window | Volfer | Calibre | 3 | 01-05-2016 01:56 PM |
Calibre 2.0...show book details | clady | Calibre | 3 | 08-24-2014 09:47 AM |
Enhancement (Delete formats from Book Details Panel) | JohnnyBook | Library Management | 5 | 07-21-2012 08:17 AM |