Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-24-2023, 06:30 AM   #16
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
What is clicking on the links in the secondary windows going to do?
I was intending to turn them off.
Quote:
And while this is a relatively low effort hack to make storing ancilliary information possible, I would much rather store it correctly in a table in the same library. Doing it this way has all the problems of maintaining data in multiple places. You rename/delete a publisher, you have to do it in two places, you have to update the links manually, etc. Not to mention this is completely undiscoverable for an average user.
Although it is really up to @BetterRed to argue for this scheme that he has spent years perfecting, I see some advantages to using another library for column value metadata.
  • The user can use full calibre to structure the information about the item. For example, with publishers one can have all the things he mentioned in post #9. The information is searchable and sortable. It is easily edited.
  • You can use the same "other library" for multiple "book" libraries, e.g., a single publishers library for Comics, Journal Articles, and book genres. This gives you one place to maintain the publisher data.
  • The "book details" popup is familiar to users. For convenience, a link to show the "book" in the other library can be on that screen.

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.
chaley is offline   Reply With Quote
Old 03-24-2023, 06:32 AM   #17
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
He had his chance already

Did he refer my request to you, or did you pick it up as you drove past.

BR
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.
chaley is offline   Reply With Quote
Advert
Old 03-24-2023, 07:38 AM   #18
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,572
Karma: 26954694
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.
BetterRed is offline   Reply With Quote
Old 03-24-2023, 10:17 AM   #19
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,859
Karma: 22666666
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.
kovidgoyal is online now   Reply With Quote
Old 03-24-2023, 10:18 AM   #20
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,859
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by chaley View Post
I put it aside because of travel and illness.
I hope the illness has passed. I myself, had my leg badly burned with boiling water these past few weeks.
kovidgoyal is online now   Reply With Quote
Advert
Old 03-24-2023, 01:36 PM   #21
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
I hope the illness has passed.
Not totally, but my brain has defogged enough where I am doing fewer silly things.
Quote:
I myself, had my leg badly burned with boiling water these past few weeks.
Burns are not fun. I hope you are healing without scarring.

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:
Click image for larger version

Name:	Clipboard01.jpg
Views:	55
Size:	17.1 KB
ID:	200587

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
        '''
I don't yet have any UI to manage these. I will probably change the category editor used for tags etc, adding a link column to the table.
chaley is offline   Reply With Quote
Old 03-24-2023, 07:17 PM   #22
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,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
I hope the illness has passed. I myself, had my leg badly burned with boiling water these past few weeks.
Quote:
Originally Posted by chaley View Post
I hope you are healing without scarring.


Quote:
Originally Posted by chaley View Post
Burns are not fun.
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.
BetterRed is offline   Reply With Quote
Old 03-24-2023, 07:54 PM   #23
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,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Curiosity questions:

1. Why don't I see calibre in here?

Click image for larger version

Name:	Screenshot 2023-03-25 102146.jpg
Views:	65
Size:	47.8 KB
ID:	200598

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?

Click image for larger version

Name:	Screenshot 2023-03-25 102920.jpg
Views:	66
Size:	65.3 KB
ID:	200599

3. Also, what is the default setting for that installer option, I don't recall making a decision between the first 3 options.

BR
BetterRed is offline   Reply With Quote
Old 03-24-2023, 08:34 PM   #24
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,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
As for the proposal: I decided to look at adding a links column to normalized tables in the database.
Would that mean every item listed in the Manage categories tool would have a link field similar to Authors, viz?

Click image for larger version

Name:	awards.jpg
Views:	59
Size:	44.3 KB
ID:	200601

I thought adding columns to calibre's database tables was off-limits because of the potential impact on the databases in the wild.

BR
BetterRed is offline   Reply With Quote
Old 03-25-2023, 12:26 AM   #25
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,859
Karma: 22666666
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
kovidgoyal is online now   Reply With Quote
Old 03-25-2023, 12:28 AM   #26
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,859
Karma: 22666666
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.
kovidgoyal is online now   Reply With Quote
Old 03-25-2023, 01:34 AM   #27
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,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
@charles: Adding a link column is fine by me.
Whilst you're there could you pop the Link value in a tooltip on mouse hover, they are often quite long.

Quote:
Originally Posted by kovidgoyal View Post
@BR: No the calibre datbase has undergone lots and lots of changes over the years. See the schema_upgrades.py file for details.
Must have been given a bum steer, now where did I put that wishlist

btw - the plastic surgery dressings nurse gave me some coconut oil to put on my leg.

BR
BetterRed is offline   Reply With Quote
Old 03-25-2023, 02:02 AM   #28
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,859
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by BetterRed View Post
btw - the plastic surgery dressings nurse gave me some coconut oil to put on my leg.
Nice, I thought this was a peculiarly Indian thing. We tend to use it for everything. From diaper rashes to bed sores.
kovidgoyal is online now   Reply With Quote
Old 03-25-2023, 09:35 AM   #29
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
Would that mean every item listed in the Manage categories tool would have a link field similar to Authors, viz?
Yes
Quote:
I thought adding columns to calibre's database tables was off-limits because of the potential impact on the databases in the wild.
As Kovid mentioned, there have been many. With my change we are up to version 26.

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.
chaley is offline   Reply With Quote
Old 03-25-2023, 03:51 PM   #30
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
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.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


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


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