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 01-05-2022, 11:44 AM   #1
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: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Changes to the custom column dialogs

I made a few rather fundamental changes to Preferences / Add your own columns. If you run from source then please post here if you find things that don't work.

Some of the changes:
  • Added a column showing the status of the column: edited, new, deleted.
  • You can undelete a deleted column if you haven't accepted the changes.
  • You can't reuse a lookup name until the changes have been accepted. This was the bug that started the process.
  • Added tooltips to show the contents of the cells when the columns are narrow.
  • Some improvement in error handling.
chaley is offline   Reply With Quote
Old 01-05-2022, 04:24 PM   #2
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: 21,721
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Only if easy:

Make the list sortable by row-number, lookup-name, header-name and type -- would default and revert to row-number. Sorting by anything other than row-number would presumably need to disable the up/down arrows. Maybe a button to sort by row-number to get the arrows back.

I sometimes 'lose sight' of a column, so I recreate it.

BR
BetterRed is offline   Reply With Quote
Advert
Old 01-05-2022, 06:18 PM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I think I requested that a while back because I wanted to sort by column type. It was marked as wontfix. Might be worth look at again though?

EDIT: https://bugs.launchpad.net/calibre/+bug/1933568

Last edited by ownedbycats; 01-05-2022 at 06:41 PM.
ownedbycats is offline   Reply With Quote
Old 01-05-2022, 11:50 PM   #4
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 ownedbycats View Post
I think I requested that a while back because I wanted to sort by column type. It was marked as wontfix. Might be worth look at again though?

EDIT: https://bugs.launchpad.net/calibre/+bug/1933568
Yes, it's something I've always wanted but have been to lazy to implement. So, I agree with everyone on this

@chaley: It all looks good here. And it's amazing how useful adding the tooltip is.
davidfor is offline   Reply With Quote
Old 01-06-2022, 06:18 AM   #5
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: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The attached file implements sortable headings. I would be grateful if some of you who run from source could try it.

You will note that the up and down arrows turn on and off. A possible surprise: you can't move new columns. Reason: they don't exist yet so their order cannot be stored.

Decompress it and put it in <calibre source>/src/calibre/gui2/preferences, replacing the existing columns.py. I will submit it to Kovid once someone other than me has tried it.

I suggest you make a backup of your library just in case something is broken. For example, my first version threw away all column order information. The only way to get it back was to restore from backup.

EDIT: zip file removed. The changes are now in calibre source.

Last edited by chaley; 01-06-2022 at 10:24 AM. Reason: Remove the python file. The changes are in calibre source
chaley is offline   Reply With Quote
Advert
Old 01-06-2022, 07:31 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 chaley View Post
The attached file implements sortable headings. I would be grateful if some of you who run from source could try it.

You will note that the up and down arrows turn on and off. A possible surprise: you can't move new columns. Reason: they don't exist yet so their order cannot be stored.

Decompress it and put it in <calibre source>/src/calibre/gui2/preferences, replacing the existing columns.py. I will submit it to Kovid once someone other than me has tried it.

I suggest you make a backup of your library just in case something is broken. For example, my first version threw away all column order information. The only way to get it back was to restore from backup.
I give that a big I tested it with my testing library and I had no issues. The sorting worked for all columns. The move buttons disabled when the order was not Order. The status shows and sorts properly. For sorting, I did wonder if the lookup name sort should ignore the hash. Using it is good as it will group the custom columns together. But, I don't normally think of the hash as part of the name. It probably doesn't matter as I'm more likely to sort on the column header.

The only question related to the changes is if the Status is in the correct place. It will normally be empty and having it were it is feels like it is wasting space. Would you like to hide it until a change is made? Though that might be confusing.

The other thing that occurred to me is that none of the core columns have descriptions. A description on the not-so-obvious one could be good. And no, I'm not volunteering
davidfor is offline   Reply With Quote
Old 01-06-2022, 08:19 AM   #7
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: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by davidfor View Post
For sorting, I did wonder if the lookup name sort should ignore the hash. Using it is good as it will group the custom columns together. But, I don't normally think of the hash as part of the name. It probably doesn't matter as I'm more likely to sort on the column header.
I think it should sort using the hash. I don't want to introduce behavior that could confuse the syntax of a lookup name.
Quote:
The only question related to the changes is if the Status is in the correct place. It will normally be empty and having it were it is feels like it is wasting space. Would you like to hide it until a change is made? Though that might be confusing.
Hiding it doesn't help because the columns don't grow to take up the unused space. However, moving it to the end does help because you can hide most of the column behind the right side of the dialog and use the tool tip or scroll bar to see it if needed. I did this.
Quote:
The other thing that occurred to me is that none of the core columns have descriptions. A description on the not-so-obvious one could be good. And no, I'm not volunteering
Sorry, I am not going to add that. I think it would turn into a good deed that can't go unpunished.

EDIT: I decided to submit the changes to Kovid.

EDIT 2: The changes are now in calibre source

Last edited by chaley; 01-06-2022 at 10:23 AM.
chaley is offline   Reply With Quote
Old 01-06-2022, 02:56 PM   #8
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: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I found several bugs while further testing. In particular, reordering the list while reverse sorted doesn't work well at all. There are also a few problems with editing columns while not in the default sort. I suggest that if you use it then you make changes while sorted by row number ascending.

I have submitted changes to fix these problems. I would be surprised if Kovid doesn't merge them in tomorrow AM (his time), especially if he intends to make a release (I don't know about that).
chaley is offline   Reply With Quote
Old 01-06-2022, 05:17 PM   #9
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: 21,721
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Goodness, thought it was just me - thanks to all.

Maybe I can try mentioning another long standing niggle, the only way to get to a set of Preferences - e.g. Tweaks… is by clicking on an icon.

I get into Preferences via Ctrl+P, I then have to use a mouse (or some other point and click device) to open the Preferences I want.

One solution would be that the Preferences panel had a hierarchical context menu that I could access via the keyboard using the ≡ key or Shift+F10, it would pop something like this.

Code:
Interface→
    Look & Feel
    Behaviour
    ...
Conversion→
    Input options
    Common options
    ...
...
...
Advanced→
    Plugins
    Tweaks
...
    Template functions
With luck that would also allow frequently used Preferences to be added to the Favourites plugin.

Aside - the Preferences panel reminds me of Windows 3.0 Program Manager

BR
BetterRed is offline   Reply With Quote
Old 01-06-2022, 08:24 PM   #10
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 chaley View Post
I think it should sort using the hash. I don't want to introduce behavior that could confuse the syntax of a lookup name.
It's one of those things that might help or might not. I have had to do something similar recently. The sort needed to ignore a prefix because that's the way users always thought about them.
Quote:
Hiding it doesn't help because the columns don't grow to take up the unused space. However, moving it to the end does help because you can hide most of the column behind the right side of the dialog and use the tool tip or scroll bar to see it if needed. I did this.
That works well.

I was going to say that you had not swapped the width of the two columns. But, I realised they were saved. Which is fine as they should be good for new users. But, it did discover that the widths are only saved if the "Apply" button is pressed and that means a column has to be changed. I'm not sure if there is a good fix for that.
Quote:
Sorry, I am not going to add that. I think it would turn into a good deed that can't go unpunished.
davidfor is offline   Reply With Quote
Old 01-06-2022, 09:01 PM   #11
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by BetterRed View Post
Aside - the Preferences panel reminds me of Windows 3.0 Program Manager
I thought I was the only one who thought that too.
ownedbycats is offline   Reply With Quote
Old 01-06-2022, 09:03 PM   #12
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by BetterRed View Post
Goodness, thought it was just me - thanks to all.

Maybe I can try mentioning another long standing niggle, the only way to get to a set of Preferences - e.g. Tweaks… is by clicking on an icon.

For some of the Look & Feel preferences, you can also get there by right-clicking the toggle-view icons in the lower right.
ownedbycats is offline   Reply With Quote
Old 01-06-2022, 10:19 PM   #13
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: 21,721
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by ownedbycats View Post
For some of the Look & Feel preferences, you can also get there by right-clicking the toggle-view icons in the lower right.
Still requires point & click with mouse or similar - and at a smaller target.

Added: Perhaps a better way would be to allow traversing the preferences icon grid with arrow keys and enter on the panel one wants, so for Tweaks ↓↓↓↓→ ↵

BR

Last edited by BetterRed; 01-06-2022 at 10:29 PM.
BetterRed is offline   Reply With Quote
Old 01-07-2022, 05:27 AM   #14
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: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by davidfor View Post
I was going to say that you had not swapped the width of the two columns. But, I realised they were saved. Which is fine as they should be good for new users. But, it did discover that the widths are only saved if the "Apply" button is pressed and that means a column has to be changed. I'm not sure if there is a good fix for that.
I noticed that and worked around it by deleting then undeleting a column. That enabled the button without actually changing anything.

I have considered always enabling the button. It doesn't hurt anything to press it when no changes have been made.
chaley is offline   Reply With Quote
Old 01-07-2022, 06:31 AM   #15
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 chaley View Post
I noticed that and worked around it by deleting then undeleting a column. That enabled the button without actually changing anything.
I'll have to remember that.
Quote:
I have considered always enabling the button. It doesn't hurt anything to press it when no changes have been made.
I always like fields and buttons to be disabled when they have nothing to do. When the "Apply" button gets enabled, it tells me something has changed. It's something that GUI builders don't seem to understand.

But, on another topic, guess how I got these errors:

Code:
Traceback (most recent call last):
  File "E:\Development\GitHub\calibre\src\calibre\gui2\preferences\main.py", line 319, in show_plugin
  File "E:\Development\GitHub\calibre\src\calibre\gui2\preferences\columns.py", line 31, in genesis
ValueError: max() arg is an empty sequence

Code:
Traceback (most recent call last):
  File "calibre_plugins.goodreads_sync.action", line 929, in show_configuration
  File "E:\Development\GitHub\calibre\src\calibre\customize\__init__.py", line 166, in do_user_config
  File "calibre_plugins.goodreads_sync.__init__", line 65, in config_widget
  File "calibre_plugins.goodreads_sync.config", line 946, in __init__
  File "calibre_plugins.goodreads_sync.config", line 1166, in get_custom_columns
  File "calibre_plugins.goodreads_sync.config", line 1386, in get_create_new_custom_column_instance
  File "E:\Development\GitHub\calibre\src\calibre\gui2\preferences\create_custom_column.py", line 790, in __init__
ValueError: max() arg is an empty sequence
Or maybe I should say: Guess what the state of the library I was using was in
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using RE to extract pattern from custom column into another custom column activedirectory Library Management 1 12-15-2019 08:07 PM
Adding custom column with any lookup-name gives me empty column as a result? Ahu Lee Library Management 16 06-09-2019 12:14 PM
Move selected data from series column to a new custom column fvdham Library Management 3 06-02-2017 03:49 PM
Custom column returns value based on value of another custom column? calvin-c Calibre 3 09-14-2013 02:24 PM
how to move value(s) of tag column to a custom made column zoorakhan Library Management 0 12-08-2012 03:53 AM


All times are GMT -4. The time now is 01:53 AM.


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