Mobileread
Patch: Ticket 9168 (Allow maximum number of copies (issues) per recipe)
#1  spedinfargo 02-25-2011, 05:21 PM
As described in this thread: http://www.mobileread.com/forums/sho...d.php?t=122336

I think a great feature for recipes would be to allow you to define at the recipe level how many copies you want to keep of a particular recipe. For daily newspapers, it might only be worthwhile to keep one or two day's copies around. For some magazines, you might want to set up a monthly download and then keep five or more around.

I've attached a patch that would achieve this. It adds a "max issues" variable to the main scheduler page and then saves it in the recipes XML file. It should be pretty non-intrusive and upgrade-friendly - if the element doesn't exist in the XML node, it will default to 0 and add that value it when the user touches the recipe. A value of 0 means no change from current functionality (i.e. it disables the new feature and keeps the maximum number of copies).

The functionality depends on the recipe title being saved as tag (I think that's enabled by default and unique) and of course the "delete news older than x days" would still be in effect (and have priority).
Reply 

#2  spedinfargo 02-25-2011, 05:23 PM
By the way, setting up the source repository and getting started in debug mode was hands-down the best experience I've ever had in a community-led development effort. I was up in running in no time and it was pretty painless to check in my changes...
Reply 

#3  kovidgoyal 02-25-2011, 05:26 PM
Quote spedinfargo
By the way, setting up the source repository and getting started in debug mode was hands-down the best experience I've ever had in a community-led development effort. I was up in running in no time and it was pretty painless to check in my changes...
That's one of the advantages of using a dynamic language like Python. I'll review your patch when I have a moment.

Any reason you chose to use number of issues rather than say, number of days?
Reply 

#4  spedinfargo 02-25-2011, 10:35 PM
Good question - I think it's probably just the way the idea popped into my head. I think mktgu explains the "business case" a little better (in the other thread).

It would probably be easy to make it a radio button and have "days" or "issues"... Especially since the code is already there to compare dates... If I had to vote between the two, though, I think issues would be better... more intuitive to multiply issues by "download every x days" to figure out how many days you're keeping than divide to figure out how many issues you'd end up (if that makes any sense).
Reply 

Today's Posts | Search this Thread | Login | Register