View Single Post
Old 10-07-2013, 01:41 AM   #1
squigish
Junior Member
squigish began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jan 2012
Device: Kindle 3, Kindle Touch
Automatically patching custom recipies with updates to built-in recipies

I'm not sure if this belongs in development or recipes. I picked development, because I think the solution is ultimately going to involve using bzr, and/or other development tools.

I have several custom recipes, all of which are based on built-in recipes (specifically, The New York Times). I'd like to keep my customizations, which are mostly just options I changed or set, but still benefit from the periodic updates to the built-in recipes.

Is there some way to automatically download a diff of the changes to the recipe since the last revision, and then patch my custom recipe?

Ideally, I'd have a linux shell script that would check to see if the built-in recipe has been updated more recently than the locally stored custom recipe, and if so, run a subroutine to download or create a diff file and apply it to my recipe. I figure that doing it this way, rather than re-downloading the recipe every time, would minimize server load, both on my server and on launchpad (or wherever I get the recipe from).

I've been directed to http://bazaar.launchpad.net/~kovid/c...head:/recipes/ for the source code of the built-in recipes, but my browser has trouble loading that page, presumably because there are so many files. Where does the calibre executable get the recipes? Is there an easy way to check modification date from that source, using a command-line tool?

I installed bzr on my linux box (Ubuntu Lucid 10.04), but so far have been unable to find an easy command to get a local copy of the source. I've tried
Code:
bzr branch lp:calibre
bzr co lp:calibre
bzr pull lp:calibre
I do plan on eventually teaching myself how to use bzr (I have a passing familiarity with SVN and git), but this seems like something that should be able to be done in a simple one-liner, I'm just not seeing what it is.

Also, is there an easy command to look for changes for a particular file? Would the best way just be to update my local copy using bzr, and then look at the modification time for the relevant recipe? It'd be ideal if I didn't have to keep a local copy of the entire source, but if I do, so be it.

Thanks for the help!
squigish is offline   Reply With Quote