Changes between Version 2 and Version 3 of BittenRecipesExtractorScript


Ignore:
Timestamp:
Nov 28, 2011 11:09:37 PM (2 years ago)
Author:
mjasonmiller
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BittenRecipesExtractorScript

    v2 v3  
    1616[http://trac-hacks.org/newticket?component=BittenRecipesExtractorScript&owner=mjasonmiller new ticket]. 
    1717 
    18 == Download == 
    19  
    20 Download the zipped source from [download:bittenrecipesextractorscript here]. 
    21  
    22 == Source == 
    23  
    24 You can check out BittenRecipesExtractorScript from [http://trac-hacks.org/svn/bittenrecipesextractorscript here] using Subversion, or [source:bittenrecipesextractorscript browse the source] with Trac. 
    25  
    26 == Example == 
    27  
    28 '''Retrieve recipes:'''[[BR]] 
    29  
    30 mkdir ~/some/location[[BR]] 
    31 cp recipe_get.py ~/some/location[[BR]] 
    32 cp recipe_put.py ~/some/location[[BR]] 
    33 cd ~/some/location[[BR]] 
    34 sudo python recipe_get.py /var/www/Trac/My_Test_Trac[[BR]] 
    35  
    36 '''Save recipes:'''[[BR]] 
    37  
    38 sudo python recipe_put.py /var/www/Trac/My_Test_Trac[[BR]] 
    39  
     18=== Known Issues === 
     19When I have been modifying the scripts using emacs (and possibly some other editors do this), the editor will create a backup swap file, which just so happens to match the file matching routine I have in place for recipes to be committed. I have not seen this cause issues, but it most certainly is not desirable. My advice is to edit a master copy, such as the ones in the subversion directory, and copy those two files, to your recipe directory and use them there.[[BR]] 
    4020 
    4121Super User access is needed when reading and writing to the Trac database directly. Also, on some of my clusters that I work with, multiple version of python can exist. Meaning, if you receive errors like:  
     
    4828}}} 
    4929 
     30== Download == 
     31 
     32Download the zipped source from [download:bittenrecipesextractorscript here]. 
     33 
     34== Source == 
     35 
     36You can check out BittenRecipesExtractorScript from [http://trac-hacks.org/svn/bittenrecipesextractorscript here] using Subversion, or [source:bittenrecipesextractorscript browse the source] with Trac. 
     37 
     38== Example == 
     39I may combined these two scripts into one someday, but for now the usage follows:[[BR]] 
     40 
     41=== Reading and Writing Recipes === 
     42Create a directory for which the recipes will be saved at. Each Bitten Rule will be a separate <recipe_name>.recipe file. The two python scripts must be copied to this newly created directory.[[BR]] 
     43Each python script uses the same single argument. The only argument that is needed, is the path to your Trac environment. Which exactly what is necessary when ever you run: 
     44{{{ 
     45trac-admin /some/trac/environment 
     46}}} 
     47To be absolutely clear on this, and to add additional text spam to this site: 
     48{{{ 
     49sudo python recipe_get.py /some/trac/environment 
     50sudo python recipe_put.py /some/trac/environment 
     51}}} 
     52Whilst in the same directory as your saved recipes. You can leave these files there and continue to run both scripts for eternity. No need to clean them up. And quite frankly, leaving them alone for backup reasons, is a darn good idea. 
     53 
     54=== Editing the Recipe Files === 
     55The file syntax is fairly straight forward. The values are delimited by the two carrot characters.[[BR]] 
     56From first value to last: 
     57  * The unique recipe name (NEVER CHANGE THIS) 
     58  * The path in your repository 
     59  * Is this recipe active or not? 1 being active, 0 being inactive 
     60  * The bitten recipe itself 
     61  * The recipe name as seen on the Trac Bitten Builds page 
     62  * The recipe description 
     63I have seen no harm in changing all but the first value. In fact, I have altered the other values with incorrect data, and was easily able to recover from it, by making my corrections, and running the recipe_put.py script again. 
    5064 
    5165== Recent Changes ==