Changes between Version 2 and Version 3 of BittenRecipesExtractorScript

Nov 28, 2011, 10:09:37 PM (6 years ago)
Jason Miller



  • BittenRecipesExtractorScript

    v2 v3  
    1616[ new ticket].
    18 == Download ==
    20 Download the zipped source from [download:bittenrecipesextractorscript here].
    22 == Source ==
    24 You can check out BittenRecipesExtractorScript from [ here] using Subversion, or [source:bittenrecipesextractorscript browse the source] with Trac.
    26 == Example ==
    28 '''Retrieve recipes:'''[[BR]]
    30 mkdir ~/some/location[[BR]]
    31 cp ~/some/location[[BR]]
    32 cp ~/some/location[[BR]]
    33 cd ~/some/location[[BR]]
    34 sudo python /var/www/Trac/My_Test_Trac[[BR]]
    36 '''Save recipes:'''[[BR]]
    38 sudo python /var/www/Trac/My_Test_Trac[[BR]]
     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]]
    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:
     30== Download ==
     32Download the zipped source from [download:bittenrecipesextractorscript here].
     34== Source ==
     36You can check out BittenRecipesExtractorScript from [ here] using Subversion, or [source:bittenrecipesextractorscript browse the source] with Trac.
     38== Example ==
     39I may combined these two scripts into one someday, but for now the usage follows:[[BR]]
     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:
     45trac-admin /some/trac/environment
     47To be absolutely clear on this, and to add additional text spam to this site:
     49sudo python /some/trac/environment
     50sudo python /some/trac/environment
     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.
     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 script again.
    5165== Recent Changes ==