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 05-16-2024, 09:11 PM   #676
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,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
For an Action Chains copy-to-clipboard, how do I insert a line break into a strcat?
use the character() function.
chaley is offline   Reply With Quote
Old 05-16-2024, 10:01 PM   #677
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: 9,540
Karma: 64960939
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thanks.

Also, what's the best way to copy an identifier URL if you don't need the html in urls_from_identifiers? I thought of using strcat to construct it but I'm having trouble remembering what to use to extract the ID itself.
ownedbycats is offline   Reply With Quote
Old 05-16-2024, 11:48 PM   #678
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,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Thanks.

Also, what's the best way to copy an identifier URL if you don't need the html in urls_from_identifiers? I thought of using strcat to construct it but I'm having trouble remembering what to use to extract the ID itself.
use select() to get the value of an identifier.
chaley is offline   Reply With Quote
Old 05-17-2024, 02:07 AM   #679
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: 9,540
Karma: 64960939
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
thank you! that worked!
ownedbycats is offline   Reply With Quote
Old 06-09-2024, 07:06 PM   #680
correoparaappzz
Enthusiast
correoparaappzz began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Nov 2023
Device: Kindle Oasis
hi, I'm having trouble with coloring my "reading progress" column, it glitches.

and if somebody have an alternative way to do it, i would appreciate the help
Attached Thumbnails
Click image for larger version

Name:	Captura de pantalla 2024-06-09 150041.png
Views:	344
Size:	71.4 KB
ID:	208774  
correoparaappzz is offline   Reply With Quote
Old 06-27-2024, 05:21 AM   #681
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: 9,540
Karma: 64960939
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question:

Code:
program:
	status = readstatus();
	times = $$#timesread;

	switch_if(
		status=='read', 'Read',
		status=='didnotfinish', 'Did Not Finish',
		status=='currentlyreading', if times >#0 then 'Currently Rereading' else 'Currently Reading' fi,
		status=='toberead', if times >#0 then 'To Be Reread' else 'To Be Read' fi,
		status=='unread', if 'readinggoal:' in $#admintags then 'Backlog' else 'Unread' fi,
		''
	)
On line 10, I'd like to change the criteria to instead check for readinggoal:{currentyear} - the obvious is just check for a literal 'readinggoal:2024' but is there a way to do this automagically?
ownedbycats is offline   Reply With Quote
Old 06-27-2024, 05:50 AM   #682
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,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Question:

Code:
program:
	status = readstatus();
	times = $$#timesread;

	switch_if(
		status=='read', 'Read',
		status=='didnotfinish', 'Did Not Finish',
		status=='currentlyreading', if times >#0 then 'Currently Rereading' else 'Currently Reading' fi,
		status=='toberead', if times >#0 then 'To Be Reread' else 'To Be Read' fi,
		status=='unread', if 'readinggoal:' in $#admintags then 'Backlog' else 'Unread' fi,
		''
	)
On line 10, I'd like to change the criteria to instead check for readinggoal:{currentyear} - the obvious is just check for a literal 'readinggoal:2024' but is there a way to do this automagically?
Try using
Code:
if 'readinggoal:' & format_date(today(), 'yyyy') in $#admintags then 'Backlog' else 'Unread' fi
chaley is offline   Reply With Quote
Old 06-27-2024, 08:21 PM   #683
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: 9,540
Karma: 64960939
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Ah, does a '&' work the same as a strcat in this instance? That's what I was trying but having trouble inserting it into the line.
ownedbycats is offline   Reply With Quote
Old 06-28-2024, 08:08 AM   #684
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,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Ah, does a '&' work the same as a strcat in this instance? That's what I was trying but having trouble inserting it into the line.
Yes. It works like strcat(). I think in all instances, but to be sure I would need to check precedence of functions vs operators.

Here it is with strcat().
Code:
if strcat('readinggoal:', format_date(today(), 'yyyy')) in $#admintags  then 'Backlog' else 'Unread' fi
chaley is offline   Reply With Quote
Old 06-29-2024, 02:33 AM   #685
YGKGamer
Junior Member
YGKGamer began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2024
Device: Kindle Paper White
Can I create a template or plugboard to do the following?

Is it possible to create a template that can be used to do the following when importing books:
1. Ensure that author is always = last name, first name (title case)
2. Title is always title case
3. Tags can be changed into a set list of tags (convert the incoming tags to ones I want and then drop the rest)
4. Series will be listed name and series number
5. Make sure the rating field is blank
6. Make sure the comment field is blank
7. strip blanks that appear in names or titles as _


Sorry I am not a programmer and the help functions were not at my level of understanding so I do not know what syntax to use.
YGKGamer is offline   Reply With Quote
Old 06-29-2024, 08:41 AM   #686
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,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by YGKGamer View Post
Is it possible to create a template that can be used to do the following when importing books:
1. Ensure that author is always = last name, first name (title case)
2. Title is always title case
3. Tags can be changed into a set list of tags (convert the incoming tags to ones I want and then drop the rest)
4. Series will be listed name and series number
5. Make sure the rating field is blank
6. Make sure the comment field is blank
7. strip blanks that appear in names or titles as _


Sorry I am not a programmer and the help functions were not at my level of understanding so I do not know what syntax to use.
The best way to do this is with the Action Chains plugin. You would set up an action for each test/modification you wish, put them in a chain, then run that chain when a book is added to calibre.

Ask for help in that plugin's thread.
chaley is offline   Reply With Quote
Old 06-29-2024, 08:52 AM   #687
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,443
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Simple answer for a not simple desired result: NO

If the metadata is embedded,
Calibre populates the fields upon adding. <<<<
There are tools to help tame, but that requires YOU to write each rule. Considering the dreaded VARIATIONS
Preferences:Adding Books:Adding Actions (a tab)
The whole bottom is where you start (there are none out of the box)

OTOH Download Metadata has its own configuration
Preferences:Metadata download (there are configure buttons on some forms that get you here also)
Sources to look at. This also allows you to set Cover (use choice) priority
On the Right: Is the Master Use or not use ticks
BUT
the Configure button BELOW the Sources allows you to fine tune these by Selected Source, (AKA Cherry pick )
The others are pretty self explanatory. (hover on the item for more details)

Again: These do not affect Previously Embedded at import time.
theducks is offline   Reply With Quote
Old 07-08-2024, 01:15 PM   #688
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: 9,540
Karma: 64960939
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Code:
program: 

	if 
		'(In-Progress|Dormant|Abandoned)' in $#fanficstatus
		|| $#fanficstatus=='Oneshot' && $$#pagecount<30)
		|| readstatus()=='read'
	then
		$#admintags

	else
		columnupdate_admintags_readinggoal()
	fi
How does $$#pagecount<30 work with undefined columns?

Issue: columnupdate_admintags_readinggoal() adds "readinggoal:{currentyear}" to admintags.

I noticed the tag (which auto-adds books to Reading Goal addon) was showing up on certain fics where it shouldn't, specifically oneshots of less than 30 pages. I think I know why - FanFicFare calls both Action Chains and Count Pages simultaneously upon fic download, so the chain with this template runs before Count Pages has a chance to populate the column.

If I'm right and <30 doesn't include the nulls, then I'll just update the template to exclude oneshots entirely and add the tag manually.

Last edited by ownedbycats; 07-08-2024 at 01:32 PM.
ownedbycats is offline   Reply With Quote
Old 07-08-2024, 01:37 PM   #689
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,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Code:
program: 

	if 
		'(In-Progress|Dormant|Abandoned)' in $#fanficstatus
		|| $#fanficstatus=='Oneshot' && $$#pagecount<30)
		|| readstatus()=='read'
	then
		$#admintags

	else
		columnupdate_admintags_readinggoal()
	fi
How does $$#pagecount<30 work with undefined columns?
For numeric comparisons, null (None) values are treated as zero. For string comparisons they have the string value "None".

Your template is using a string comparison (<). I suspect you want a numeric comparison (<#).

The raw_field() function has a default value parameter to use if the field is None. For example, if you want something other than zero for None you could use
Code:
raw_field('#pagecount', 100) <# 30
chaley is offline   Reply With Quote
Old 07-08-2024, 11:29 PM   #690
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: 9,540
Karma: 64960939
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Yeah, makes sense... still, considering the unpopulated-pagecount issue, I figure I'll just exclude the oneshots and add them manually.
ownedbycats 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 173 11-05-2024 11:43 PM
[Metadata Source Plugin] Questions regarding parse select, docs and ref templates Boilerplate4U Development 13 07-07-2020 03:35 AM
Questions on Kobo [Interfered with another thread topic] spdavies Kobo Reader 8 10-12-2014 12:37 PM
[OLD Thread] Some questions before buying the fire. darthreader13 Kindle Fire 7 05-10-2013 10:19 PM
Thread management questions meme Feedback 6 01-31-2011 06:07 PM


All times are GMT -4. The time now is 08:31 PM.


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