qrm2 icon indicating copy to clipboard operation
qrm2 copied to clipboard

Rewrite hamstudy commands to cache data

Open classabbyamp opened this issue 6 years ago • 8 comments

also, make hamstudy images more visible by adding a white background. At the moment, hamstudy provides images for rq and rqa that are black fg/transparent bg. these are loaded directly. visibility could be improved by adding a white backrgound.

classabbyamp avatar Oct 05 '19 22:10 classabbyamp

That is computationally expensive, as is requesting the pools and images.

Would prefetching/bundling those work?

0x5c avatar Oct 05 '19 23:10 0x5c

if the pools are cached, then the images could be converted independent of main bot operations. pools should only be updated once in a long time.

classabbyamp avatar Oct 06 '19 00:10 classabbyamp

If long-time is more then a month, then bundling would seem like a good idea.

Does HamStudy allows redistribution of their data? I could see a small data-update script, and a makefile target to run it. Then we would only need to commit the data and call it a day.

0x5c avatar Oct 07 '19 02:10 0x5c

Of course, the image modification would be part of that script (the bot will need PIL anyway)

0x5c avatar Oct 07 '19 02:10 0x5c

Messaged hamstudy guy, no reply yet.

classabbyamp avatar Oct 07 '19 13:10 classabbyamp

We have permission from hamstudy to cache data

image

classabbyamp avatar Oct 08 '19 19:10 classabbyamp

Also, include attribution for hamstudy.

classabbyamp avatar Oct 08 '19 19:10 classabbyamp

admin command to run a script (subprocess) to update the cache. is also run with the makefile on first run

classabbyamp avatar Oct 30 '19 19:10 classabbyamp