예제 #1
0
파일: Table.py 프로젝트: eblade/pyroman
 def setup(self):
     if '$Table' in self.globalvars:
         G.info("Table already setup.")
         return
     G.info("Setting up Table.")
     # Set defaults
     self.globalvars['$Table'] = {
         'mode': 'inline',
         'headers': 'yes',
             }
     # Init TOT (Table of Tables)  list
     self.globalvars['$TOT'] = []
     counter_create(self.globalvars['$Counters'], 'table', None)
     self.globalvars['numberingtable'] = '!!table!!.'
예제 #2
0
파일: Figure.py 프로젝트: eblade/pyroman
 def setup(self):
     if '$Figure' in self.globalvars:
         G.info("Figure already setup.")
         return
     G.info("Setting up Figure.")
     # Set defaults
     self.globalvars['$Figure'] = {
             'mode': 'base64',
             'width': '100%',
             }
     self.globalvars['$Base64Data'] = {}
     # Init TOF list
     self.globalvars['$TOF'] = []
     counter_create(self.globalvars['$Counters'], 'figure', None)
     self.globalvars['numberingfigure'] = '!!figure!!.'
예제 #3
0
파일: Figure.py 프로젝트: eblade/pyroman
 def setup(self):
     if '$Figure' in self.globalvars:
         G.info("Figure already setup.")
         return
     G.info("Setting up Figure.")
     # Set defaults
     self.globalvars['$Figure'] = {
         'mode': 'base64',
         'width': '100%',
     }
     self.globalvars['$Base64Data'] = {}
     # Init TOF list
     self.globalvars['$TOF'] = []
     counter_create(self.globalvars['$Counters'], 'figure', None)
     self.globalvars['numberingfigure'] = '!!figure!!.'
예제 #4
0
 def setup(self):
     if '$Heading' in self.globalvars:
         G.info("Heading already setup.")
         return
     G.info("Setting up Heading.")
     # Add SyntaxSugar
     # FIXME These could be more generalised
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             '= ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) =',
             ['title'], 'Heading: %title%\nlevel: 1'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             '== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) ==',
             ['title'], 'Heading: %title%\nlevel: 2'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             '=== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) ===',
             ['title'], 'Heading: %title%\nlevel: 3'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             '==== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) ====',
             ['title'], 'Heading: %title%\nlevel: 4'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             '===== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) =====',
             ['title'], 'Heading: %title%\nlevel: 5'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             '====== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) ======',
             ['title'], 'Heading: %title%\nlevel: 6'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             '======= ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) =======',
             ['title'], 'Heading: %title%\nlevel: 7'))
     # Add SyntaxSugar that applies to Jira
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             'h1. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
             ['title'], 'Heading: %title%\nlevel: 1'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             'h2. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
             ['title'], 'Heading: %title%\nlevel: 2'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             'h3. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
             ['title'], 'Heading: %title%\nlevel: 3'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             'h4. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
             ['title'], 'Heading: %title%\nlevel: 4'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             'h5. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
             ['title'], 'Heading: %title%\nlevel: 5'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             'h6. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
             ['title'], 'Heading: %title%\nlevel: 6'))
     self.globalvars['$SyntaxSugar'].append(
         SyntaxSugarDefinition(
             'h7. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
             ['title'], 'Heading: %title%\nlevel: 7'))
     # Set defaults
     self.globalvars['$Heading'] = {
         'level': '2',
     }
     # Init TOC lists
     self.globalvars['$TOC'] = []
     self.globalvars['$ALTTOC'] = []  # alternate toc TOC: alt
     # Init counters
     if not getkey(self.globalvars, '$Counters', False):
         self.globalvars['$Counters'] = {}
     counter_create(self.globalvars['$Counters'], 'toc1', 'toc2')
     counter_create(self.globalvars['$Counters'], 'toc2', 'toc3')
     counter_create(self.globalvars['$Counters'], 'toc3', 'toc4')
     counter_create(self.globalvars['$Counters'], 'toc4', 'toc5')
     counter_create(self.globalvars['$Counters'], 'toc5', 'toc6')
     counter_create(self.globalvars['$Counters'], 'toc6', 'toc7')
     counter_create(self.globalvars['$Counters'], 'toc7', None)
     self.globalvars['numbering1'] = '!!toc1!!.'
     self.globalvars['numbering2'] = '!!toc1!!.!!toc2!!.'
     self.globalvars['numbering3'] = '!!toc1!!.!!toc2!!.!!toc3!!.'
     self.globalvars['numbering4'] = '!!toc1!!.!!toc2!!.!!toc3!!.!!toc4!!.'
     self.globalvars[
         'numbering5'] = '!!toc1!!.!!toc2!!.!!toc3!!.!!toc4!!.!!toc5!!.'
     self.globalvars['numbering6'] = '.!!toc6!!.'
     self.globalvars['numbering7'] = '.!!toc6!!.!!toc7!!.'
     self.globalvars['indexnumbering1'] = ''
     self.globalvars['indexnumbering2'] = '!!toc2!!.'
     self.globalvars['indexnumbering3'] = '!!toc2!!.!!toc3!!.'
     self.globalvars['indexnumbering4'] = '!!toc2!!.!!toc3!!.!!toc4!!.'
     self.globalvars[
         'indexnumbering5'] = '!!toc2!!.!!toc3!!.!!toc4!!.!!toc5!!.'
     self.globalvars['indexnumbering6'] = '.!!toc6!!.'
     self.globalvars['indexnumbering7'] = '.!!toc6!!.!!toc7!!.'
예제 #5
0
파일: Heading.py 프로젝트: eblade/pyroman
 def setup(self):
     if '$Heading' in self.globalvars:
         G.info("Heading already setup.")
         return
     G.info("Setting up Heading.")
     # Add SyntaxSugar
     # FIXME These could be more generalised
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('= ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) =',
         ['title'], 
         'Heading: %title%\nlevel: 1'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) ==',
         ['title'], 
         'Heading: %title%\nlevel: 2'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('=== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) ===',
         ['title'], 
         'Heading: %title%\nlevel: 3'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('==== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) ====',
         ['title'], 
         'Heading: %title%\nlevel: 4'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('===== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) =====',
         ['title'], 
         'Heading: %title%\nlevel: 5'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('====== ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) ======',
         ['title'], 
         'Heading: %title%\nlevel: 6'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('======= ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+?) =======',
         ['title'], 
         'Heading: %title%\nlevel: 7'))
     # Add SyntaxSugar that applies to Jira
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('h1. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
         ['title'], 
         'Heading: %title%\nlevel: 1'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('h2. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
         ['title'], 
         'Heading: %title%\nlevel: 2'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('h3. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
         ['title'], 
         'Heading: %title%\nlevel: 3'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('h4. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
         ['title'], 
         'Heading: %title%\nlevel: 4'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('h5. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
         ['title'], 
         'Heading: %title%\nlevel: 5'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('h6. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
         ['title'], 
         'Heading: %title%\nlevel: 6'))
     self.globalvars['$SyntaxSugar'].append(SyntaxSugarDefinition('h7. ([\s\w\.\^\$\*\+\?\{\}\[\]\\\\\|\(\)\/@\",-]+)',
         ['title'], 
         'Heading: %title%\nlevel: 7'))
     # Set defaults
     self.globalvars['$Heading'] = {
             'level': '2',
             }
     # Init TOC lists
     self.globalvars['$TOC'] = []
     self.globalvars['$ALTTOC'] = [] # alternate toc TOC: alt
     # Init counters
     if not getkey(self.globalvars, '$Counters', False):
         self.globalvars['$Counters'] = {}
     counter_create(self.globalvars['$Counters'], 'toc1', 'toc2')
     counter_create(self.globalvars['$Counters'], 'toc2', 'toc3')
     counter_create(self.globalvars['$Counters'], 'toc3', 'toc4')
     counter_create(self.globalvars['$Counters'], 'toc4', 'toc5')
     counter_create(self.globalvars['$Counters'], 'toc5', 'toc6')
     counter_create(self.globalvars['$Counters'], 'toc6', 'toc7')
     counter_create(self.globalvars['$Counters'], 'toc7', None)
     self.globalvars['numbering1'] = '!!toc1!!.'
     self.globalvars['numbering2'] = '!!toc1!!.!!toc2!!.'
     self.globalvars['numbering3'] = '!!toc1!!.!!toc2!!.!!toc3!!.'
     self.globalvars['numbering4'] = '!!toc1!!.!!toc2!!.!!toc3!!.!!toc4!!.'
     self.globalvars['numbering5'] = '!!toc1!!.!!toc2!!.!!toc3!!.!!toc4!!.!!toc5!!.'
     self.globalvars['numbering6'] = '.!!toc6!!.'
     self.globalvars['numbering7'] = '.!!toc6!!.!!toc7!!.'
     self.globalvars['indexnumbering1'] = ''
     self.globalvars['indexnumbering2'] = '!!toc2!!.'
     self.globalvars['indexnumbering3'] = '!!toc2!!.!!toc3!!.'
     self.globalvars['indexnumbering4'] = '!!toc2!!.!!toc3!!.!!toc4!!.'
     self.globalvars['indexnumbering5'] = '!!toc2!!.!!toc3!!.!!toc4!!.!!toc5!!.'
     self.globalvars['indexnumbering6'] = '.!!toc6!!.'
     self.globalvars['indexnumbering7'] = '.!!toc6!!.!!toc7!!.'