Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-23-2025, 08:06 AM   #646
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,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kiwidude View Post
The only additional thing that comes to mind I "could" do in theory is do what Kovid added for the main UI grid of offering a column header context menu for "Adjust width of column for xxx". TBH I think that dialog is overkill (I've only just found it myself) but I can understand it would give you more granular control over a column width. I don't know if Kovid wrapped it up all his functionality in a nice reusable delegate that would make this a trivial change - I certainly wouldn't want to reinvent the wheel by having to recreate it myself.
It is the "class AdjustColumnSize(QDialog)" dialog in gui2.library.views. IIRC it is self contained. It requires a QTableView object. It might work with a QTableWidget as that is a subclass of QTableView, but I've never tried it.

And everything there was requested when the dialog was written.
chaley is offline   Reply With Quote
Old 04-23-2025, 08:26 AM   #647
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Thanks for that chaley - I will take a look at some point if time permits. To clarify the overkill comment - I've never in (too many) decades of coding and using apps seen anything as comprehensive for a user. I'm sure they love it - I just wouldn't be trying to code it up myself for a calibre plugin grid column. But if it comes for nearly free...
kiwidude is offline   Reply With Quote
Old 04-24-2025, 05:24 PM   #648
Rellwood
Library Breeder (She/Her)
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 1,274
Karma: 1937891
Join Date: Apr 2015
Location: Fullerton, California
Device: Paperwhite 2015 (2), PW 2024 (12 GEN), PW 2023 (11 GEN), Scribe (1st)
https://chatgpt.com/share/680ab946-5...6-5ca6f7e2a541

This is what Open AI has been doing with the Plugin. It still keeps throwing errors though. I have the updated versions if anyone is interested. Im still working on it.

Edit: Updated info

Last edited by Rellwood; 04-24-2025 at 06:31 PM. Reason: Updated info and link
Rellwood is offline   Reply With Quote
Old 04-24-2025, 10:57 PM   #649
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@Rellwood - thanks for posting that, interesting info. Like anything AI from my experience there is a lot of wrong conclusions and paths in there. I originally only read your getting it to analyze stuff, I haven't gone through all the proposed fix stuff that went after (that all looked pretty frustrating)...

The real issue here (that hadn't been spelled out to me or at least not clearly) is if your column is wider than the width of the dialog then the grid will attempt to make sure the next column is completely visible on screen when you scroll right. If it fits then great - the horizontal scrollbar works and you are able to resize that column to the left which is what I was doing in my quick tests. If it doesn't fit then you have a problem because it puts as much of the next column on screen as it can which usually means left aligning and hence giving you no visible grab for the previous column to resize it.

The AI is correct in pointing out that I haven't applied max width restrictions to columns. That was intentional. Otherwise you would then have to handle all the user events like them resizing the window - now the max widths you tried to set have to be changed and it all gets very complicated.

I still come back to you not actually saying what the use case you have here is. The plugin saves column widths - so just like the main calibre window you should be able to size your columns to a "usable" width for 90% of the time that display enough data to be useful. Why do you feel the need to try to max out columns (and triggering this grid behaviour)? Is it because of something I could fix by just adding a tooltip, or ?
kiwidude is offline   Reply With Quote
Old 05-02-2025, 10:09 PM   #650
Rellwood
Library Breeder (She/Her)
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 1,274
Karma: 1937891
Join Date: Apr 2015
Location: Fullerton, California
Device: Paperwhite 2015 (2), PW 2024 (12 GEN), PW 2023 (11 GEN), Scribe (1st)
Quote:
Originally Posted by kiwidude View Post
@Rellwood - thanks for posting that, interesting info. Like anything AI from my experience there is a lot of wrong conclusions and paths in there. I originally only read your getting it to analyze stuff, I haven't gone through all the proposed fix stuff that went after (that all looked pretty frustrating)...

The real issue here (that hadn't been spelled out to me or at least not clearly) is if your column is wider than the width of the dialog then the grid will attempt to make sure the next column is completely visible on screen when you scroll right. If it fits then great - the horizontal scrollbar works and you are able to resize that column to the left which is what I was doing in my quick tests. If it doesn't fit then you have a problem because it puts as much of the next column on screen as it can which usually means left aligning and hence giving you no visible grab for the previous column to resize it.


The AI is correct in pointing out that I haven't applied max width restrictions to columns. That was intentional. Otherwise you would then have to handle all the user events like them resizing the window - now the max widths you tried to set have to be changed and it all gets very complicated.

I still come back to you not actually saying what the use case you have here is. The plugin saves column widths - so just like the main calibre window you should be able to size your columns to a "usable" width for 90% of the time that display enough data to be useful. Why do you feel the need to try to max out columns (and triggering this grid behaviour)? Is it because of something I could fix by just adding a tooltip, or ?

I dont think I am making myself clear.

When I import a list. The initial window where I match columns in the list to columns in Calibre - all the columns are default set to max width. I am not doing this. Which isn't too big of a problem, but a pain when dealing with a lot of columns and I have to keep scrolling over. The major problem lies when I click "next"

In the Next screen there are two different viewing panes, the one on the left that has the columns from the list, and the one on the right with the matched books and their matching columns.

My problem is that the title and author columns in the calibre list (on the left pane) are still shown at max width and do not allow for grabbing and shrinking them down. I am left with only being able to see only the title, then scroll over, then ONLY the Author, then scroll over, THEN I can see multiple columns. The Title and Authors are unable to be shown outside of single column view. This is on the Imported List side. The Calibre book list side is fine.

The initial picture is showing how the AI developed the plugin before the attempt to get to the next section which is where the errors show. NOTE that the columns are all evenly spaced.

The Next picture shows what the original import list plugin looks like when I import the same exact list. Every column to match is default set to max -

The final picture shows how the imported list side of the viewer pane to determine if the books match shows ONLY the Title, no matter how far I stretch the pane, it will ONLY show the title, then if I scroll a tiny bit, it will ONLY show the Author. This is just on the List side, the Calibre side is ok, I can move them over. But the List side is ONLY title, ONLY author, THEN you can see the other columns and adjust them.

I hope that makes sense.

Also, Please ignore my pervy books
Attached Thumbnails
Click image for larger version

Name:	Even Columns.jpg
Views:	65
Size:	288.5 KB
ID:	215410   Click image for larger version

Name:	Plugin with wide columns.jpg
Views:	57
Size:	258.0 KB
ID:	215411   Click image for larger version

Name:	Before Fix Full length.jpg
Views:	59
Size:	237.4 KB
ID:	215412  

Last edited by Rellwood; 05-02-2025 at 10:13 PM.
Rellwood is offline   Reply With Quote
Old 05-03-2025, 07:11 PM   #651
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Thanks for the clarification. We were talking about completely different screens - originally you had said “the matching window” which in my head is the Step 2 page with the Matches in library/possible matches for selected book grids. Whereas you are talking about the CSV preview on step 1 and books in list on step 2. Picture worth a thousand words and all that!

I now understand what you mean and can look to make a few tweaks. But I think the easiest solution for now is to either just not use resizeColumnsToContents() on those grids in case of outliers, or use it but then go through and check if any sizes are wider than the current grid width and shrink them down. Also I believe there is a HorizontalScrollMode which can be changed on the grid to Pixel, so it would allow the manual resizing even if your column goes super large by manually double clicking the column header.

Last edited by kiwidude; 05-04-2025 at 02:25 AM.
kiwidude is offline   Reply With Quote
Old 05-04-2025, 03:40 AM   #652
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Import List v1.9.8

Release Notes
https://github.com/kiwidude68/calibr...rt_list-v1.9.8

Ive forced a max width of 300 on columns after an autoresize, and changed the scrollbar mode to per pixel so that if you do oversize the column by dragging or double clicking you can always get to the right edge of it by horizontal scrolling to then resize it.
kiwidude is offline   Reply With Quote
Old 05-04-2025, 04:27 PM   #653
Rellwood
Library Breeder (She/Her)
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 1,274
Karma: 1937891
Join Date: Apr 2015
Location: Fullerton, California
Device: Paperwhite 2015 (2), PW 2024 (12 GEN), PW 2023 (11 GEN), Scribe (1st)
Thanks! Works great now! Fixed the issue I had, I appreciate it! Sent donation Cheers!
Rellwood is offline   Reply With Quote
Old Yesterday, 02:42 PM   #654
bellereads
Member
bellereads began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Sep 2023
Device: ipad
Match Method clarification

I want to import a CSV file with just the ID:id and the data for for a custom column, just 2 columns in total. From what I can see, that ID:id is the sequential unique number assigned when you add a book. I changed the Match Method identifier to the ID. Under columns to import I added those 2 columns but title and authors were already specified. If I click on preview it shows 4 columns: title, authors, ID, and my custom column.

Do I always have to include the author and title in my file? What's the purpose of being able to specify the Match Method if it's always going to use the author and title?
bellereads is offline   Reply With Quote
Old Today, 05:59 AM   #655
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,198
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by bellereads View Post
I want to import a CSV file with just the ID:id and the data for for a custom column, just 2 columns in total. From what I can see, that ID:id is the sequential unique number assigned when you add a book. I changed the Match Method identifier to the ID. Under columns to import I added those 2 columns but title and authors were already specified. If I click on preview it shows 4 columns: title, authors, ID, and my custom column.

Do I always have to include the author and title in my file? What's the purpose of being able to specify the Match Method if it's always going to use the author and title?
First of all, Import List does not support ID:id. What you have is ID:uuid which is completely different. See here for more details.

The title filed is mandatory in calibre. So if your csv file is creating new records, it must have title.

If however, you are merely updating existing records, an easy way to get around:
  • In the csv tab, point your title to the the same uuid columns (yes you can repeat it more than once)
  • Since the author column is not mandatory, you can assign it to 0.
  • In the next dialog (the resolve dialog), when you press the "update metadata for selected books", make sure the title and authors fields are unticked to avoid overwriting them with the uuid they were assigned to.

See the screenshots for illustration.

Edit: An alternative approach, is to use Excel to create a new title column in your csv file. Note however, that the title value cannot be empty, so you have to mass populate the column with an arbitrary value. And you still have to make sure the title column is unticked in the "update metadata for selected books" dialog.
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	5
Size:	114.5 KB
ID:	217282   Click image for larger version

Name:	2.jpg
Views:	5
Size:	98.9 KB
ID:	217283  

Last edited by capink; Today at 07:56 AM.
capink is offline   Reply With Quote
Old Today, 12:40 PM   #656
bellereads
Member
bellereads began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Sep 2023
Device: ipad
Thumbs up Thanks

Thanks for the clarification. I thought using the ID:id would be unique enough to identify the calibre entry. And thanks for the screen shots.
bellereads is offline   Reply With Quote
Reply

Tags
column types


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Reading List kiwidude Plugins 1426 07-29-2025 06:31 PM
[GUI Plugin] Manage Sony x50 Reader Book List kpw Plugins 170 10-02-2014 08:23 PM
Import List plugin idea thread kiwidude Development 45 08-13-2012 06:05 AM
[GUI Plugin] WebOS Kindle-Import CranstD Plugins 0 01-24-2012 03:36 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 01:41 PM.


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