|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Junior Member
![]() 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 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! |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43,307
Karma: 21696336
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre no longer uses bzr, it uses git. https://github.com/kovidgoyal/calibr...master/recipes
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2012
Device: Kindle 3, Kindle Touch
|
Thanks for the update! The recipe sticky should probably be edited to reflect the new link, no?
As I said, I have only a passing familiarity with git. Can it fetch the modification time of a single file from the source tree, without having a local copy of the whole source stored? |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43,307
Karma: 21696336
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I have no idea, I'm a developer of calibre, not git.
|
![]() |
![]() |
![]() |
#5 |
Zealot
![]() Posts: 136
Karma: 60
Join Date: Jul 2009
Location: Munich, Germany
Device: Nook Classic rooted; Galaxy S IV with Aldiko, other older devices
|
@squigish No, you have to fetch the git repository ("git fetch") by which time you already have all the changes to every file already downloaded.
What you could do is to use the web interface on github ( https://github.com/kovidgoyal/calibre/tree/ ) and do some web scraping but in the end, you will be much better off just cloning the source tree and periodically updating it (git pull) |
![]() |
![]() |
Advert | |
|
![]() |
Tags |
bzr, diff, patch, recipe |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Recipies using OAI Protocol | microgiraffe | Recipes | 0 | 05-22-2012 08:02 AM |
Looking for spicy (and easy) recipies | xg4bx | Lounge | 5 | 09-29-2011 05:12 PM |
ebook-convert: use user recipies | mic47 | Recipes | 3 | 03-07-2011 10:21 AM |