comparison orpg/tools/InterParse.py @ 243:3bbfd84619c0 beta

Traipse Beta 'OpenRPG' {101018-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Closing/Closed) New Features: New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order New to Server GUI, can now clear log New Earthdawn Dieroller New IronClaw roller, sheet, and image Updates: Update to Warhammer PC Sheet. Rollers set as macros. Should work with little maintanence. Update to Browser Server window. Display rooms with ' " & cleaner Update to Server. Handles ' " & cleaner Update to Dieroller. Cleaner, more effecient expression system Update to Hidden Die plugin, allows for non standard dice rolls Fixes: Fix to InterParse that was causing an Infernal Loop with Namespace Internal Fix to XML data, removed old Minidom and switched to Element Tree Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread Fix to metaservers.xml file not being created Fix to Single and Double quotes in Whiteboard text Fix to Background images not showing when using the Image Server Fix to Duplicate chat names appearing Fix to Server GUI's logging output Fix to FNB.COLORFUL_TABS bug Fix to Gametree for XSLT Sheets Fix to Gametree for locating gametree files Fix to Send to Chat from Gametree Fix to Gametree, renaming and remapping operates correctly
author sirebral
date Mon, 18 Oct 2010 23:48:49 -0500
parents 72e0cce81a47
children 682032381be8
comparison
equal deleted inserted replaced
242:72e0cce81a47 243:3bbfd84619c0
159 anyone. Using !" :: "! will allow you to use an internal namespace from within another internal 159 anyone. Using !" :: "! will allow you to use an internal namespace from within another internal
160 namespace -- TaS, Prof. Ebral""" 160 namespace -- TaS, Prof. Ebral"""
161 reg2 = re.compile("(!=(.*?)=!)") 161 reg2 = re.compile("(!=(.*?)=!)")
162 """Adding the Parent and Child references to Namespace Internal. Namespace 2.0 is powerful enough it 162 """Adding the Parent and Child references to Namespace Internal. Namespace 2.0 is powerful enough it
163 should be able to handle them with no problem. For future reference, if you are paying attention, Namespace 163 should be able to handle them with no problem. For future reference, if you are paying attention, Namespace
164 will include two methods for Internal and External. !@ :: @! and !& :: @! for External and !" :: "! and != :: =! 164 will include two methods for Internal and External. !@ :: @! and !& :: &! for External and !" :: "! and != :: =!
165 for Internal. See above Easter Egg for reasoning.""" 165 for Internal. See above Easter Egg for reasoning."""
166 reg3 = re.compile("(!!(.*?)!!)") 166 reg3 = re.compile("(!!(.*?)!!)")
167 reg4 = re.compile("(!#(.*?)#!)") 167 reg4 = re.compile("(!#(.*?)#!)")
168 matches = reg1.findall(s) + reg2.findall(s) + reg3.findall(s) + reg4.findall(s) 168 matches = reg1.findall(s) + reg2.findall(s) + reg3.findall(s) + reg4.findall(s)
169 try: tree_map = node.get('map') 169 try: tree_map = node.get('map')
178 s = s.replace(matches[i][0], newstr, 1) 178 s = s.replace(matches[i][0], newstr, 1)
179 s = s.replace(u'\xa0', ' ') 179 s = s.replace(u'\xa0', ' ')
180 #s = self.NodeMap(s, node) 180 #s = self.NodeMap(s, node)
181 #s = self.NodeParent(s, node) 181 #s = self.NodeParent(s, node)
182 return s 182 return s
183
184 def NameSpaceXE(self, s):
185 reg = re.compile("(!&(.*?)&!)")
186 matches = reg.findall(s)
187 nodeable = ['rpg_grid_handler', 'container_handler',
188 'group_handler', 'tabber_handler',
189 'splitter_handler', 'form_handler', 'textctrl_handler']
190
191 for i in xrange(0,len(matches)):
192 find = matches[i][1].split('::')
193 node = component.get('tree').xml_root
194 for x in xrange(0, len(find)):
195 namespace = node.getiterator('nodehandler')
196 for node in namespace:
197 if find[x] == node.get('name'):
198 if node.get('class') not in nodeable: continue
199 try:
200 if self.FutureCheck(node, find[x+1]): break
201 else: continue
202 except:
203 if x == len(find)-1:
204 return node
205 break
206 else: break
207 return None
183 208
184 def NameSpaceE(self, s): 209 def NameSpaceE(self, s):
185 reg = re.compile("(!&(.*?)&!)") 210 reg = re.compile("(!&(.*?)&!)")
186 matches = reg.findall(s) 211 matches = reg.findall(s)
187 newstr = False 212 newstr = False