View Single Post
Old 06-07-2022, 02:31 AM   #2763
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I assume this has been about sending books as kepubs using the template. My current template is:

Code:
program:
as_kepub = '';
if (current_library_name()=='Incoming' || in_list($tags, ',', '\[as_kepub\]',  'as_kepub', '')) then
    as_kepub = 'as_kepub'
fi
Which of course means everything in one of my libraries plus anything else with the tag "[as_kepup]". And that looks clumsy.

What I realised when I saw the release is that I should have added the global variables that I added for the collections template. That would let you use the device serial number to only send to a particular device.

And as I don't remember if I mentioned it anywhere outside the code, the collections template has the following global variables:
  • 'serial_number': The serial number of the connected device
  • 'firmware_version': Firmware version as a tuple. e.g. (4, 33, 12345)
  • 'display_firmware_version': Firmware version as a string. e.g. 4.33.12345
  • 'dbversion': Database version. For the current firmware is should be 170.

I think only the first one is particularly useful, but, the others are things that I could see that the driver knows about the connected device and might make sense.
davidfor is offline   Reply With Quote