Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 12:12 PM   #31
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 521
Karma: 718860
Join Date: Dec 2017
Device: Kobo
The DOC!
We forget the doc >_>

Oh dear, you alone on that Kovid, my english is realy not enough for that sorry.
un_pogaz is offline   Reply With Quote
Old Yesterday, 12:15 PM   #32
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 521
Karma: 718860
Join Date: Dec 2017
Device: Kobo
@JSWolf Yep? Very incorect.

Try that:
Code:
python:
from calibre.gui2.library.bookshelf_view import width_from_pages

def evaluate(book, context):
    val = book.get('#pages')
    try:
        pages = max(0, int(val))
    except Exception:
        return '0.4'
    return str(width_from_pages(pages, num_of_pages_for_max_width=1500))
EDIT: Ah, seem you fix it on own.
un_pogaz is offline   Reply With Quote
Advert
Old Yesterday, 12:17 PM   #33
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 81,399
Karma: 150264805
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by un_pogaz View Post
@JSWolf Yep? Very incorect.

Try that:
Code:
python:
from calibre.gui2.library.bookshelf_view import width_from_pages

def evaluate(book, context):
    val = book.get('#pages')
    try:
        pages = max(0, int(val))
    except Exception:
        return '0.4'
    return str(width_from_pages(pages, num_of_pages_for_max_width=1500))
EDIT: Ah, seem you fix it on own.
Yes, I did manage to fix the template. Thanks.

Now to make calibre count into the column I want. I want calibre's count to go into #pages instead o I don't need two of them {pages}. Then I can overwrite the count with Count Pages when I want. I'm also hoping to do away with {Pages} as that's an extra column that I won't need as I already have a page count column. I don't need two columns that do the same thing.

Last edited by JSWolf; Yesterday at 12:22 PM.
JSWolf is offline   Reply With Quote
Old Yesterday, 12:27 PM   #34
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 521
Karma: 718860
Join Date: Dec 2017
Device: Kobo
Quote:
Originally Posted by JSWolf View Post
Now to make calibre count into the column I want. I want calibre's count to go into #pages instead o I don't need two of them {pages}. Then I can overwrite the count with Count Pages when I want. I'm also hoping to do away with {Pages} as that's an extra column that I won't need as I already have a page count column. I don't need two columns that do the same thing.
You can't and it will probably never be an option.
I personaly recomand to use a Composite column that if no value in #pages (Count Pages), return the value in from the Calibre Page:

Code:
program: ifempty($#pages, $pages)
And if you don't want the Calibre Page, don't show it. Its calculations are done in the background, so it won't be a problem.
I understand that it name can be confused by your custom column if you name it "Pages", but I'm affraind that is not something that can be solve.

Last edited by un_pogaz; Yesterday at 12:35 PM.
un_pogaz is offline   Reply With Quote
Old Yesterday, 12:32 PM   #35
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 81,399
Karma: 150264805
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by un_pogaz View Post
You can't and it will probably never be an option.
I personaly recomand to use a Composite column that if no value in #pages (Count Pages), return the value in from the Calibre Page:

Code:
program: ifempty($#pages, $pages)
And if you don't want the Calibre Page, don't show it. Its calculations are done in the background, so it won't be a problem.
If we are allowed to swap columns, there will be a value in #pages. There will either be the Count Pages value or the calibre value. Given this is a beta, I hope this is something Kovid will allow us.
JSWolf is offline   Reply With Quote
Advert
Old Yesterday, 12:32 PM   #36
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 564
Karma: 2110015
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
If you dont like the bookshelf view feel free to not use it. It doesnt cost you anything. Personally, I only ever use the book list view myself. The other views exist for other people that have different preferences. Let's not shit on their use cases.
I don't shit on it, I am only criticising the implementation - the opposite of good is well-meant - and I don't care about other people's use cases either, if it weren't for the unfortunate forced addition of a new column here. Make it optional please and I will never comment on this view again.
Wiggo is offline   Reply With Quote
Old Yesterday, 12:38 PM   #37
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 521
Karma: 718860
Join Date: Dec 2017
Device: Kobo
Quote:
Originally Posted by JSWolf View Post
If we are allowed to swap columns, there will be a value in #pages. There will either be the Count Pages value or the calibre value. Given this is a beta, I hope this is something Kovid will allow us.
Calibre page value can be changed, so is better to ask the Count Page plugin to support it to output it result.
But personaly, I don't recomend it since this field is auto filled by Calibre and so it could be unpredictable.
un_pogaz is offline   Reply With Quote
Old Yesterday, 12:40 PM   #38
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 81,399
Karma: 150264805
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Is this a bug. I change the value in the column for the page count and the cover does not change the width. Is there a way to update this or do we have to restart?
JSWolf is offline   Reply With Quote
Old Yesterday, 12:41 PM   #39
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: 45,765
Karma: 28586150
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Wiggo View Post
I don't shit on it, I am only criticising the implementation - the opposite of good is well-meant - and I don't care about other people's use cases either, if it weren't for the unfortunate forced addition of a new column here. Make it optional please and I will never comment on this view again.
Yes you are complaining that the title doesnt always fit on the spine. If you have some magical way to make arbitrarily long titles fit on fixed height spines, am all ears. And you dont like that there is a cover thumbnail on the spine. So disable the thumbnail in the preferences if you prefer it to be without a cover.

How on earth does the existence of a column in the database bother you? What the bloody hell is wrong with you? After this thread and the AI thread I am really sick of calibre development.
kovidgoyal is offline   Reply With Quote
Old Yesterday, 12:43 PM   #40
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 521
Karma: 718860
Join Date: Dec 2017
Device: Kobo
Quote:
Originally Posted by JSWolf View Post
Is this a bug. I change the value in the column for the page count and the cover does not change the width. Is there a way to update this or do we have to restart?
No sorry, my bad. Calibre Page is read only, I confused it with my own Page Count column, you can't change it.

Last edited by un_pogaz; Yesterday at 12:45 PM.
un_pogaz is offline   Reply With Quote
Old Yesterday, 12:47 PM   #41
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 81,399
Karma: 150264805
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Would it be possible to allow the Page column to be used with Count Pages? This way I can do away with having a second page count column. I can do away with my column once Count Pages is updated to use the new column. Thanks.

Last edited by JSWolf; Yesterday at 12:58 PM.
JSWolf is offline   Reply With Quote
Old Yesterday, 12:59 PM   #42
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 521
Karma: 718860
Join Date: Dec 2017
Device: Kobo
Quote:
Originally Posted by JSWolf View Post
Would it be possible to allow the Page column to be used with Count Pages? This way I can do away with having a second page count column. I can do away with my column once Count Pages is updated to use the new column. Thanks.
Probably never because is auto-filled. Their is a lot happening in the backstage to this columns work as their is.

Like I say early, you best option is to use a composite column that use dynamically Calibre Page or Page Count, wich use it own column.
The all point to Calibre where create custom column is trivial, and the composite column are here to fill such niche case.
un_pogaz is offline   Reply With Quote
Old Yesterday, 01:02 PM   #43
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 564
Karma: 2110015
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
Yes you are complaining that the title doesnt always fit on the spine. If you have some magical way to make arbitrarily long titles fit on fixed height spines, am all ears. And you dont like that there is a cover thumbnail on the spine. So disable the thumbnail in the preferences if you prefer it to be without a cover.

How on earth does the existence of a column in the database bother you? What the bloody hell is wrong with you? After this thread and the AI thread I am really sick of calibre development.
Could we please return to civilised manners? I wouldn't know what was wrong with me if I expressed objective criticism.
Wiggo is offline   Reply With Quote
Old Yesterday, 01:06 PM   #44
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: 45,765
Karma: 28586150
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Wiggo View Post
Could we please return to civilised manners? I wouldn't know what was wrong with me if I expressed objective criticism.
I suggest you ignore both the bookshelf view and this thread. Then you wont be exposed to "uncivilised manners" and cut off titles. Objective indeed.
kovidgoyal is offline   Reply With Quote
Old Yesterday, 01:28 PM   #45
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,751
Karma: 7927573
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Right click the book details panel and you get a menu entry to trigger a recount for that book.
Thanks. bloody easy
Comfy.n is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibre 5: Beta testers needed kovidgoyal Calibre 497 09-29-2020 01:58 AM
Beta testers needed kovidgoyal Calibre 75 08-18-2019 08:00 PM
Beta testers for calibre 3.0 needed kovidgoyal Calibre 598 07-09-2017 11:26 PM
Beta testers needed kovidgoyal Calibre 54 05-20-2016 01:34 PM
Beta testers for calibre 2.0 needed kovidgoyal Calibre 142 05-08-2015 05:44 AM


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


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