Module:IncrementParams

-- STEP 1: Click on the "edit" tab at the top of the page to edit this module.

-- STEP 2: if you want to increment by a number other than 1, put that number below, after the equals sign. local increment = 1

-- STEP 3: Replace the example template text with the template text that you wish to increment. local templatetext = [==========[ ]==========]
 * headerstyle = background:#ccf;
 * above     =
 * image     =
 * caption   =
 * label1    = Dimensions
 * data1     =
 * label2    = Type
 * data2     =
 * label3    = Space
 * data3     =
 * label4    = Bowers style acronym
 * data4     =
 * header5   =
 * label6    = Coxeter diagram
 * data6     =
 * label7    = Schläfli symbol
 * data7     =
 * label8    = Symmetry
 * data8     =
 * label9    = Army
 * data9     =
 * label10   = Regiment
 * data10    =
 * header11  =
 * label12   = Vertex figure
 * data12    =
 * header11  =
 * label12   =
 * header11  =
 * label12   =
 * header11  =
 * label12   =
 * header11  =
 * label12   =
 * header11  =
 * label12   =
 * header11  =
 * label12   =
 * header11  =
 * label12   =
 * header11  =
 * label12   =
 * header11  =
 * label12   =
 * label13   = Components
 * data13    =
 * label14   = Xenna
 * data14    =
 * label15   = Yotta
 * data15    =
 * label16   = Zetta
 * data16    =
 * label17   = Exa
 * data17    =
 * label18   = Peta
 * data18    =
 * label19   = Tera
 * data19    =
 * label20   = Cells
 * data20    =
 * label21   = Faces
 * data21    =
 * label22   = Edges
 * data22    =
 * label23   = Vertices
 * data23    =
 * header24  =
 * label25   = Circumradius
 * data25    =
 * label26   = Angle
 * data26    =
 * label27   =
 * data27    =
 * label28   =
 * data28    =
 * label29   =
 * data29    =
 * label30   =
 * data30    =
 * label300   =
 * data300    =
 * label301   =
 * data301    =
 * label302   =
 * data302    =
 * label303   =
 * data303    =
 * label304   =
 * data304    =
 * label315   = Dihedral angle
 * data315    =
 * label326   =
 * data326    =
 * label337   =
 * data337    =
 * label348   =
 * data348    =
 * label359   =
 * data359    =
 * label351   =
 * data351    =
 * label352   =
 * data352    =
 * label353   =
 * data353    =
 * label354   =
 * data354    =
 * label355   =
 * data355    =
 * label361   = Dichoral angle
 * data361    =
 * label372   =
 * data372    =
 * label383   =
 * data383    =
 * label394   =
 * data394    =
 * label405   =
 * data405    =
 * label406   =
 * data406    =
 * label407   =
 * data407    =
 * label408   =
 * data408    =
 * label409   =
 * data409    =
 * label4010   =
 * data4010    =
 * label41   = Diteral angle
 * data41    =
 * label42   =
 * data42    =
 * label43   =
 * data43    =
 * label44   =
 * data44    =
 * label45   =
 * data45    =
 * label45   =
 * data45    =
 * label45   =
 * data45    =
 * label45   =
 * data45    =
 * label45   =
 * data45    =
 * label45   =
 * data45    =
 * label46   = Dipetal angle
 * data46    =
 * label47   =
 * data47    =
 * label48   =
 * data48    =
 * label49   =
 * data49    =
 * label50   =
 * data50    =
 * label50   =
 * data50    =
 * label50   =
 * data50    =
 * label50   =
 * data50    =
 * label50   =
 * data50    =
 * label50   =
 * data50    =
 * label51   = Diexal angle
 * data51    =
 * label52   =
 * data52    =
 * label53   =
 * data53    =
 * label54   =
 * data54    =
 * label55   =
 * data55    =
 * label55   =
 * data55    =
 * label55   =
 * data55    =
 * label55   =
 * data55    =
 * label55   =
 * data55    =
 * label55   =
 * data55    =
 * label56   = Dizettal angle
 * data56    =
 * label57   =
 * data57    =
 * label58   =
 * data58    =
 * label59   =
 * data59    =
 * label60   =
 * data60    =
 * label60   =
 * data60    =
 * label60   =
 * data60    =
 * label60   =
 * data60    =
 * label60   =
 * data60    =
 * label60   =
 * data60    =
 * label61   = Diyottal angle
 * data61    =
 * label62   =
 * data62    =
 * label63   =
 * data63    =
 * label64   =
 * data64    =
 * label65   =
 * data65    =
 * label65   =
 * data65    =
 * label65   =
 * data65    =
 * label65   =
 * data65    =
 * label65   =
 * data65    =
 * label65   =
 * data65    =
 * label66   = Dixennal angle
 * data66    =
 * label67   =
 * data67    =
 * label68   =
 * data68    =
 * label69   =
 * data69    =
 * label70   =
 * data70    =
 * label70   =
 * data70    =
 * label70   =
 * data70    =
 * label70   =
 * data70    =
 * label70   =
 * data70    =
 * label70   =
 * data70    =
 * label71   = Length
 * data71    =
 * label72   = Area
 * data72    =
 * label73   = Volume
 * data73    =
 * label74   = Hypervolume
 * data74    =
 * header75  =
 * label76   = Dual
 * data76    =
 * label77   = Conjugate
 * data77    =
 * header78  = Properties
 * label79   = Convex
 * data79    =
 * label80   = Orientable
 * data80    =
 * label81   = Nature
 * data81    =

-- STEP 4: Save this module.

-- STEP 5: You can now output the incremented text with the following code: --               main -- Or you can simply copy and paste the text from this module's documentation.

-- STEP 6: Check the output! In rare cases this module might produce false positives. -- For example, it will change the text "foo3=bar" to "foo4=bar". -- You can use the "show changes" function in the edit window of the template you are editing -- to find any false positives.

-- STEP 7: When you are finished, undo your changes to this page, so that the next person -- won't be confused by seeing any non-default values. Thanks for using this module!

local p = {} local function replace(prefix, num, suffix) return '|' .. prefix .. tostring(tonumber(num) + increment) .. suffix .. '=' end function p.main(frame) -- Increment the template text. templatetext = mw.ustring.gsub(templatetext, '|(%s*%a?[%a_%-]-%s*)([1-9]%d*)(%s*[%a_%-]-%a?%s*)=', replace) -- Add pre tags and escape html etc. if the pre option is set. if frame and frame.args and frame.args.pre and frame.args.pre ~= '' then templatetext = mw.text.nowiki(templatetext) templatetext = '' .. templatetext .. ' '   end return templatetext end return p