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 07-01-2021, 03:48 AM   #121
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,675
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by davidfor View Post
. . .

. . .most people do interpret last_Modified as when the metadata was last changed.

. . .
And just as many assume it has something to do with the file system Modified date

IIRC POSIX uses Change date for metadata changes, and Modified date for content changes.

I learnt early on to ignore calibre's Modified/last_modified column.

BR
BetterRed is offline   Reply With Quote
Old 07-01-2021, 04:10 AM   #122
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: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by BetterRed View Post
Curious: if you use enter to edit metadata (presumably in the booklist), what are you using F2 to do?

BR
I think he means it opens the edit metadata window?
ownedbycats is online now   Reply With Quote
Advert
Old 07-01-2021, 09:49 AM   #123
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,783
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
Curious: if you use enter to edit metadata (presumably in the booklist), what are you using F2 to do?

BR
Your presumption is incorrect. I use it to open edit metadata. I seldom edit data in the booklist.
chaley is offline   Reply With Quote
Old 07-01-2021, 05:39 PM   #124
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,675
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I'm sort of surprised one can even nominate Return and Numpad/Enter as shortcut keys, but I see one can - that's pretty cool. Now I'm trying to think of how I could use it.

Cheers BR
BetterRed is offline   Reply With Quote
Old 07-01-2021, 05:46 PM   #125
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,783
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
I'm sort of surprised one can even nominate Return and Numpad/Enter as shortcut keys, but I see one can - that's pretty cool. Now I'm trying to think of how I could use it.

Cheers BR
FWIW: I used the tweak "Control behavior of the book list (ID: doubleclick_on_library_view)" to make Return do an edit metadata.

I did a test and using Return as a keyboard shortcut overrides the tweak.
chaley is offline   Reply With Quote
Advert
Old 07-03-2021, 01:29 PM   #126
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: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question. I have this composite column, with sort/search by text:

Code:
program:

input = $#kobobookmark;
a = re(input, '.*\/file(\d+).*', '\1');
fan = $#fanficcat;
status = $#fanficstatus;
ccount = $$#chaptercount;

	if 
			fan
		&&
			status !='Anthology'
		&& 
			$#currentlyreading 
		&& 
			substr(input, 0, 10) == 'OEBPS/file'
	then		
		strcat(format_number(subtract(a, 1), '{0:,d}'), '/',ccount)

	elif
		status ='Oneshot'
	then
		ccount

	elif
		ccount >#1
	then
  		ccount

	fi
On a non-fanfiction book with an undefined ccount this displays as "None." If I switch to non-raw field it becomes blank instead.

Click image for larger version

Name:	2021-07-03 14_27_56-.png
Views:	130
Size:	534.8 KB
ID:	188025

I don't mind it here, but why does raw field result in "none" instead of blank?

Actually I just realized I could probably remove the second elif statement and combine it with the third with a != compare op...

Last edited by ownedbycats; 07-03-2021 at 01:39 PM.
ownedbycats is online now   Reply With Quote
Old 07-03-2021, 01:44 PM   #127
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: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Hmm, the compare op didn't seem to work. I tried this:

Code:
	elif
			ccount >#1
		&&
			status != 'Oneshot'
	then
  		ccount
It resulted in a null on a oneshot (by definition, those are always one chapter )
ownedbycats is online now   Reply With Quote
Old 07-03-2021, 01:44 PM   #128
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,783
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
On a non-fanfiction book with an undefined ccount this displays as "None." If I switch to non-raw field it becomes blank instead.
I don't mind it here, but why does raw field result in "none" instead of blank?

Actually I just realized I could probably remove the second elif statement and combine it with the third with a != compare op...
$$#x is equivalent to raw_field('#x'), which returns 'None' if the value is undefined. If you don't want that then use raw_field('#x', default) where default is whatever you want to see if the value isn't defined. In your case I think you want default to be ''.

EDIT: BTW: raw_field() is useful where the field is formatted in its column definition with characters so that the displayed value is no longer a number. The raw_field() function returns the underlying number, not the formatted one.

Last edited by chaley; 07-03-2021 at 01:49 PM.
chaley is offline   Reply With Quote
Old 07-03-2021, 01:50 PM   #129
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: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
My percent read column has some formatting to show a percent sign. I found if I don't use raw field when putting it into a composite I get unexpected results.
ownedbycats is online now   Reply With Quote
Old 07-03-2021, 02:10 PM   #130
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: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by ownedbycats View Post
Hmm, the compare op didn't seem to work. I tried this:

Code:
	elif
			ccount >#1
		&&
			status != 'Oneshot'
	then
  		ccount
It resulted in a null on a oneshot (by definition, those are always one chapter )
Ok I figured it out. It wasn't the compare op, but there's no other statements telling it what it should display if it's a oneshot. I'll just leave in the second elif statement, it's easier.

Last edited by ownedbycats; 07-03-2021 at 02:12 PM.
ownedbycats is online now   Reply With Quote
Old 07-07-2021, 01:27 AM   #131
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: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Code:
if 
		variable !='foo' 
	&&
		variable !='bar'
then	
	'output'
Is there a way to merge the two checks?

Last edited by ownedbycats; 07-07-2021 at 01:32 AM.
ownedbycats is online now   Reply With Quote
Old 07-07-2021, 01:40 AM   #132
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: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Also:

Code:
program:

input = $#kobobookmark;
a = re(input, '.*\/file(\d+).*', '\1');
status = $#fanficstatus;
ccount = $$#chaptercount;

	if 
		$#fanficcat
	then
		if		
				!status inlist 'Anthology,Oneshot'
			&& 	
				substr(input, 0, 10) == 'OEBPS/file'
			&& 
				$#currentlyreading 
		then		
			strcat(format_number(subtract(a, 1), '{0:,d}'), '/',ccount)
		else
			ccount
		fi

	elif
		ccount >#1
	then
  		ccount
	fi
I might've asked this before, but does it do all the checks, or only continue the check when it passes the other ones?

If the latter, since #currentlyreading is another composite (psuedobool, it returns 'true' if it passes certain checks), would putting it last be better practice for performance?

Also, are there any other improvements that can be made to this? I notice there's a slight delay whenever the column updates. I've thought of taking out the #currentlyreading check and instead just having it run its checks directly, but I'm not sure if that would help or if there's a better way.

description of template:
Spoiler:
What I'm doing here is:

Check whether or not it's a fanfiction (#fanficcat defined).

If it is, check for three things:

a) Status is not 'Anthology' or 'Oneshot.'
b) #kobobookmark starts with 'OEBPS/file'
c) #currentlyreading is defined

If all three of these are true, do that number formatting stuff; this shows how many chapters I've read compared to how many there are (e.g. 23/25).

If it's a fanfiction but does not fulfill all three checks, display the chapter count.

If it's not a fanfiction, display the chapter count only if it's above 1.

Last edited by ownedbycats; 07-07-2021 at 04:41 AM.
ownedbycats is online now   Reply With Quote
Old 07-07-2021, 01:42 AM   #133
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,119
Karma: 1954138
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Code:
if 
		variable !='foo' 
	&&
		variable !='bar'
then	
	'output'
Is there a way to merge the two checks?
Code:
program:
	! variable inlist 'foo,bar'
capink is offline   Reply With Quote
Old 07-07-2021, 01:50 AM   #134
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: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Will that work for an enumerated column?
ownedbycats is online now   Reply With Quote
Old 07-07-2021, 03:13 AM   #135
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,119
Karma: 1954138
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Will that work for an enumerated column?
I guess yes. No reason for it not to work with enums.
capink is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Library Management: various questions not worth their own thread ownedbycats Library Management 153 05-14-2024 01:30 AM
[Metadata Source Plugin] Questions regarding parse select, docs and ref templates Boilerplate4U Development 13 07-07-2020 02:35 AM
Questions on Kobo [Interfered with another thread topic] spdavies Kobo Reader 8 10-12-2014 11:37 AM
[OLD Thread] Some questions before buying the fire. darthreader13 Kindle Fire 7 05-10-2013 09:19 PM
Thread management questions meme Feedback 6 01-31-2011 05:07 PM


All times are GMT -4. The time now is 07:39 PM.


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