Changes between Version 9 and Version 10 of BittenRecipesExtractorScript
- Timestamp:
- Jun 3, 2015, 8:38:06 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BittenRecipesExtractorScript
v9 v10 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = Bitten Recipe Extractor =3 = Bitten Recipe Extractor 4 4 5 == Description == 5 {{{#!box warning 6 **Notice:** Bitten is no longer being maintained: https://groups.google.com/forum/#!topic/bitten/j9xaMRdbJ9o, which deprecates this plugin. There are [t:PluginList#ContinuousIntegration more suitable alternatives]. 7 }}} 6 8 7 Two small scripts who's purpose is to retrieve a Trac's Bitten rule sets. Thus allowing you to make off-line changes quickly with your favorite text editor.[[BR]] 9 == Description 10 11 Two small scripts who's purpose is to retrieve a Trac's Bitten rule sets. Thus allowing you to make off-line changes quickly with your favorite text editor. 8 12 Once satisfied with your changes, a second script uploads said changes. 9 13 10 == Bugs/Feature Requests ==14 == Bugs/Feature Requests 11 15 12 16 Existing bugs and feature requests for BittenRecipesExtractorScript are … … 14 18 15 19 If you have any issues, create a 16 [ http://trac-hacks.org/newticket?component=BittenRecipesExtractorScript&owner=mjasonmillernew ticket].20 [/newticket?component=BittenRecipesExtractorScript new ticket]. 17 21 18 === Known Issues === 19 Pattern matching may include swap and backup specific files from editing your recipes. The only issue this would cause, may be a file with no changes from the original, or other non-desirable changes. Keep this in mind if your finding recipes not updating with correct data. Search for hidden files in your recipe directory, and delete them. I have attempted to solve this, but unfortunately I have found that Trac allows periods and dashes in the naming convention of bitten rules. So this rules out a lot of simple pattern matching I can perform. eg: {{{if str.isalnum(file_name)}}} 22 [[TicketQuery(component=BittenRecipesExtractorScript&group=type,format=progress)]] 20 23 21 Super User access is needed when reading and writing to the Trac database directly.[[BR]] 24 === Known Issues 25 26 Pattern matching may include swap and backup specific files from editing your recipes. The only issue this would cause, may be a file with no changes from the original, or other non-desirable changes. Keep this in mind if your finding recipes not updating with correct data. Search for hidden files in your recipe directory, and delete them. I have attempted to solve this, but unfortunately I have found that Trac allows periods and dashes in the naming convention of bitten rules. So this rules out a lot of simple pattern matching I can perform. eg {{{if str.isalnum(file_name)}}} 27 28 Super User access is needed when reading and writing to the Trac database directly. 22 29 Also, on some of my clusters that I work with, multiple version of python can exist. Meaning, if you receive errors like: 23 {{{ 24 #!sh 30 {{{#!sh 25 31 ImportError: No module named trac.env 26 32 }}} 33 27 34 You need to adjust your PATH environment to include the path to which ever python version was used to install and run Trac: 28 {{{ 29 #!sh 35 {{{#!sh 30 36 export PATH=/usr/local/python2.7/bin:$PATH 31 37 }}} 32 ^Note: This, being the one reason I do not include the common #!/usr/bin/python interrupter header in my scripts.^[[BR]][[BR]]33 38 34 == Download == 39 '''Note''': This is the reason I do not include the common #!/usr/bin/python interrupter header in my scripts. 40 41 == Download 35 42 36 43 Download the zipped source from [download:bittenrecipesextractorscript here]. 37 44 38 == Source ==45 == Source 39 46 40 47 You can check out BittenRecipesExtractorScript from [http://trac-hacks.org/svn/bittenrecipesextractorscript here] using Subversion, or [source:bittenrecipesextractorscript browse the source] with Trac. 41 48 42 == Example == 43 I may combined these two scripts into one someday, but for now the usage follows:[[BR]] 49 == Example 44 50 45 === Reading and Writing Recipes === 51 I may combine these two scripts into one someday, but for now the usage follows: 52 53 === Reading and Writing Recipes 54 46 55 Each Bitten Rule will be a separate <recipe_name>.recipe file.[[BR]] 47 56 Each python script uses the same single argument. The only argument that is needed, is the path to your Trac environment. Which is exactly what is necessary when ever you run: 48 {{{ 49 #!sh 57 {{{#!sh 50 58 trac-admin /some/trac/environment 51 59 }}} 60 52 61 To be absolutely clear on this, and to add additional text spam to this site: 53 {{{ 54 #!sh 62 {{{#!sh 55 63 sudo python recipe_get.py /some/trac/environment 56 64 }}} 65 57 66 and: 58 {{{ 59 #!sh 67 {{{#!sh 60 68 sudo python recipe_put.py /some/trac/environment 61 69 }}} 62 Accordingly.[[BR]][[BR]] 70 71 Accordingly. 72 63 73 When you perform a recipe_get.py, a directory will be created with a name equal to your Trac directory with '_recipes' appended to it (trac-directory-name_recipes). The recipes will be saved (or updated for recipes currently residing) in this directory. 64 74 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. 65 75 66 === Editing the Recipe Files === 67 The file syntax is fairly straight forward. The values are delimited by two carrot characters. Please, if there is a quicker better way, do submit a ticket.[[BR]] 76 === Editing the Recipe Files 77 78 The file syntax is fairly straight forward. The values are delimited by two carrot characters. Please, if there is a quicker better way, do submit a ticket. 68 79 69 80 From the first value to last: … … 78 89 I 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. 79 90 80 == Recent Changes ==91 == Recent Changes 81 92 82 93 [[ChangeLog(bittenrecipesextractorscript, 3)]] 83 94 84 == Author/Contributors ==95 == Author/Contributors 85 96 86 97 '''Author:''' [wiki:mjasonmiller] [[BR]] 87 '''Maintainer:''' [ wiki:mjasonmiller] [[BR]]98 '''Maintainer:''' [[Maintainer]] [[BR]] 88 99 '''Contributors:'''