Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-19-2014, 07:16 AM   #1
Khan-Dam
Enthusiast
Khan-Dam began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jul 2011
Location: France
Device: iPad, Kindle 3, Kobo Glo, Kobo Aura
Question Apply Functions on a column on a set of select row

Hi,

I'm seeking a solution for this problem

I have a custom Column type number with coma and for any reason i would add a value for theese cell after selected some row in the library

exemple :

in column Indice a have
Sel Indice | Book
> 1 | a book
> 6 | book 2
3 | book 3
> 9 | book 4

after applying add 2 for column indice on selected 1,2 and 4 book i would obtain :
> 3 | a book
> 8 | book 2
3 | book 3
> 11 | book 4

and the same thing on a colum type like serie with index

Is there an existing solution in calibre or this must done by a plug-in ?

thank in advance

regards

Khan-Dam
Khan-Dam is offline   Reply With Quote
Old 02-19-2014, 08:34 AM   #2
chaley
Grumpy old git
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: 9,064
Karma: 2737964
Join Date: Jan 2010
Location: UK
Device: Many android devices
If I understand correctly what you want to do (not sure), then you can do it with global search & replace. The attached screen capture shows how. It adds two to the #myint field for every book selected.
Attached Thumbnails
Click image for larger version

Name:	Clipboard04.jpg
Views:	124
Size:	109.8 KB
ID:	119263  
chaley is offline   Reply With Quote
Advert
Old 02-19-2014, 10:02 AM   #3
Khan-Dam
Enthusiast
Khan-Dam began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jul 2011
Location: France
Device: iPad, Kindle 3, Kobo Glo, Kobo Aura
Yes it's exactily what i need

thank you very much for that

i seek for a long time to do but i don't understand exactly that i can make without find and replace field in regular expression

it make's me gain a lot of time when i maintain library

is it possible to make same thing with adding something from the value in the column of the previous row

#myint = #myint ( from previous row) + 1


regards

Last edited by Khan-Dam; 02-19-2014 at 10:10 AM.
Khan-Dam is offline   Reply With Quote
Old 02-19-2014, 11:14 AM   #4
chaley
Grumpy old git
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: 9,064
Karma: 2737964
Join Date: Jan 2010
Location: UK
Device: Many android devices
Quote:
Originally Posted by Khan-Dam View Post
is it possible to make same thing with adding something from the value in the column of the previous row

#myint = #myint ( from previous row) + 1


regards
No. The template language can "see" only the current book. The is no way to use the metadata from book A while processing book B.

You can do that sort of thing in a plugin, because it has access to the complete database and the complete selection list.
chaley is offline   Reply With Quote
Old 02-19-2014, 02:43 PM   #5
Khan-Dam
Enthusiast
Khan-Dam began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jul 2011
Location: France
Device: iPad, Kindle 3, Kobo Glo, Kobo Aura
Thanks a Lot

Regard from France
Khan-Dam is offline   Reply With Quote
Advert
Reply

Tags
function, library managment, python

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A way to have column w Fixed set o values but not alphabeticaly sorted ? Riva3000 Library Management 9 09-21-2013 07:03 PM
Set value of another column from composite? dirgeon Library Management 1 02-03-2013 12:40 PM
Using OnDevice to set the value of a custom column WendyR14 Library Management 3 10-23-2011 09:03 PM
Feature request - have tags set background colour of row KPHarg Calibre 5 01-01-2010 01:44 AM


All times are GMT -4. The time now is 11:22 AM.


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