View Single Post
Old 10-22-2024, 05:28 PM   #1398
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,211
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by correoparaappzz View Post
is there a way to add the entire series of the selected book? I'm using 'Reading Goal' and it doesn't have that option
If the 'Reading Goal' has a menu option to add the series, you can choose that from Calibre Actions.

If the 'Reading Goal' has no such option, you will have to make the Action Chains select all the books in the series. You can do this by adding the following template to "Search Using Templates" action:

Code:
program:
	initial_ids = from_selection('id');
	set_globals(initial_ids=initial_ids);
	all_series_ids = '';
	for book_id in initial_ids:
		series = book_field(book_id, 'series');
		series_ids = from_search('id', 'series:"=' & series & '"');
		all_series_ids = list_union(all_series_ids, series_ids, ',')
	rof;
	all_series_ids
Note: In the "Search Using Templates" action, make sure to tick the option: "Template output is a list of book ids"

If you want to revert to the original selections after adding all the books in the series, you can use another "Search Using Templates" action with the following template:

Code:
program:
    globals(initial_ids)
Note: In the "Search Using Templates" action, make sure to tick the option: "Template output is a list of book ids"
capink is offline   Reply With Quote