yes i did with some wirred feature of python.
i already sorted the event part.
the different between a action/ function or event...
is just a flag "FlagEvent".
This code is the current version.
Presets was not done. I will do it tonight.
#! /bin/env python3## GPL license:## This program is free software: you can redistribute it and/or modify## it under the terms of the GNU General Public License as published by## the Free Software Foundation, either version 3 of the License, or## (at your option) any later version.#### This program is distributed in the hope that it will be useful,## but WITHOUT ANY WARRANTY; without even the implied warranty of## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the## GNU General Public License for more details.#### You should have received a copy of the GNU General Public License## along with this program. If not, see <http://www.gnu.org/licenses/>.# import libsfromxml.saximportContentHandlerfromxml.saximportmake_parserfromxml.sax.handlerimportfeature_namespacesimportsys,os,string,retry:importSC2MapsterEditbot=Trueexcept:bot=False#########important files############native_lib=open(os.path.join('Base.SC2Data','TriggerLibs','NativeLib.SC2Lib'),'rb')native_galaxy=open(os.path.join('Base.SC2Data','TriggerLibs','natives.galaxy'),'r')string_list=open(os.path.join('enGB.SC2Data','LocalizedData','TriggerStrings.txt'),'r')#output_file = open(os.path.join('output.txt'),'w')output_file=sys.stdout######################################empty dictionary for all kind of data##they need to be copied else the reference will point to same adress#trigger is not important nowempty_trigger={'Label':""}#idenfifier of category will be ignoredempty_category={'SubCategory':[],'Label':'','FunctionDef':[],'Preset':[],'Variable':[],'Trigger':[],'Comment':[],'Root':False}#no EventResponse no Variable no functioncallempty_function_def={'Identifier':"",'Label':"",'Flag':{},'ReturnType':'','TypeElement':'','Parameter':[]}#too complicated to parseempty_function_call={'FunctionDef':[]}#too complicated to parse,only important for default values for parametersempty_param={'ParameterDef':'','Value':'','ValueType':'','ValueTypeInfo':'','Preset':'','PresetValue':'','FunctionCall':'','Variable':'','Array':''}#empty_param_def={'Identifier':'','Value':'','Type':'','TypeElement':'','VariableType':"",'GameType':'','Default':False,'Preset':'','Limits':""}#empty_preset={'Identifier':'','Label':'','BaseType':'','PresetValue':[],'Flag':[]}#empty_preset_value={'Identifier':'','Value':'','DefinesDefault':False}#remove double spacespace_filter=re.compile(" +")defwhite_space_filter(s):returnre.sub(space_filter," ",s)#transform name to lowercase and replace space with -defname_to_url(s):returnwhite_space_filter(s.strip().lower().replace(" ","-").replace("("," ").replace(")"," ").strip())#copy a 2 dimention dict without pointer referencedefnew_dict(old_dict):res=old_dict.copy()forainold_dict.keys():iftype(res[a])==type([]):res[a]=list()eliftype(res[a])==type({}):res[a]=dict()returnres#cmp wrapperdefcmp_to_key(mycmp):'Convert a cmp= function into a key= function'classK(object):def__init__(self,obj,*args):self.obj=objdef__lt__(self,other):returnmycmp(self.obj,other.obj)def__gt__(self,other):returnmycmp(self.obj,other.obj)def__eq__(self,other):returnmycmp(self.obj,other.obj)def__le__(self,other):returnmycmp(self.obj,other.obj)def__ge__(self,other):returnmycmp(self.obj,other.obj)def__ne__(self,other):returnmycmp(self.obj,other.obj)returnK#our main classclassFunctionWriter(ContentHandler):def__init__(self,stringFile,nativesFile):self.setting=""self.root_category={}self.category={}self.label={}self.icon={}self.comment={}self.temp_id=""self.temp_name=""self.function_def={}self.trigger={}self.function_call={}self.param={}self.param_def={}self.preset={}self.preset_value={}self.subfunc_type={}self.variable={}#we need the file saved as list#filestream is not very fastself.string_file=stringFile.readlines()self.natives_file=nativesFile.readlines()defsort_cat_func(self):pass#how we collect attrs data#important is self.setting, which defines how the next child tag will be processeddefstartElement(self,name,attrs):self.temp_name=nameifname=="Root":self.setting="Root"elifname=="Item":ifself.setting=="Root":ifattrs["Type"]=="Label":self.label[attrs['Id']]={}elifattrs["Type"]=="Category":self.category[attrs['Id']]=new_dict(empty_category)self.category[attrs['Id']]["Root"]=Trueself.root_category[attrs['Id']]=attrs['Id']elifself.setting=="Category":ifattrs['Type']=="Category":try:self.category[self.temp_id]['SubCategory'].append(attrs["Id"])exceptKeyError:self.category[self.temp_id]=new_dict(empty_category)self.category[self.temp_id]['SubCategory'].append(attrs["Id"])elifattrs['Type']=="FunctionDef":try:self.category[self.temp_id]['FunctionDef'].append(attrs["Id"])exceptKeyError:self.category[self.temp_id]=new_dict(empty_category)self.category[self.temp_id]['FunctionDef'].append(attrs["Id"])elifattrs['Type']=="Preset":try:self.category[self.temp_id]['Preset'].append(attrs["Id"])exceptKeyError:self.category[self.temp_id]=new_dict(empty_category)self.category[self.temp_id]['Preset'].append(attrs["Id"])elifattrs['Type']=="Variable":try:self.category[self.temp_id]['Variable'].append(attrs["Id"])exceptKeyError:self.category[self.temp_id]=new_dict(empty_category)self.category[self.temp_id]['Variable'].append(attrs["Id"])elifattrs['Type']=="Trigger":try:self.category[self.temp_id]['Trigger'].append(attrs["Id"])exceptKeyError:self.category[self.temp_id]=new_dict(empty_category)self.category[self.temp_id]['Trigger'].append(attrs["Id"])elifattrs['Type']=="Comment":try:self.category[self.temp_id]['Comment'].append(attrs["Id"])exceptKeyError:self.category[self.temp_id]=new_dict(empty_category)self.category[self.temp_id]['Comment'].append(attrs["Id"])elifself.setting=="Preset"andattrs["Type"]=="PresetValue":try:self.preset[self.temp_id]['PresetValue'].append(attrs["Id"])exceptKeyError:self.preset[self.temp_id]=new_dict(empty_preset)self.preset[self.temp_id]['PresetValue'].append(attrs["Id"])elifname=="Element":ifattrs["Type"]=="Label":self.setting="Label"self.temp_id=attrs["Id"]elifattrs["Type"]=="Comment":self.setting="Comment"self.temp_id=attrs["Id"]elifattrs["Type"]=="Category":self.setting="Category"self.temp_id=attrs["Id"]try:test=type(self.category[self.temp_id])except:self.category[self.temp_id]=new_dict(empty_category)elifattrs["Type"]=="Trigger":self.setting="Trigger"self.temp_id=attrs["Id"]elifattrs["Type"]=="FunctionDef":self.setting="FunctionDef"self.temp_id=attrs["Id"]elifattrs["Type"]=="FunctionCall":self.setting="FunctionCall"self.temp_id=attrs["Id"]elifattrs["Type"]=="Param":self.setting="Param"self.temp_id=attrs["Id"]elifattrs["Type"]=="ParamDef":self.setting="ParamDef"self.temp_id=attrs["Id"]elifattrs["Type"]=="Preset":self.setting="Preset"self.temp_id=attrs["Id"]elifattrs["Type"]=="PresetValue":self.setting="PresetValue"self.temp_id=attrs["Id"]try:test=type(self.preset_value[self.temp_id])except:self.preset_value[self.temp_id]=new_dict(empty_preset_value)elifattrs["Type"]=="SubFuncType":self.setting="SubFuncType"self.temp_id=attrs["Id"]elifattrs["Type"]=="Variable":self.setting="Variable"self.temp_id=attrs["Id"]elifname=="Label":ifself.setting=="Category":try:self.category[attrs['Id']]['Label']=attrs['Id']exceptKeyError:self.category[attrs['Id']]=new_dict(empty_category)self.category[attrs['Id']]['Label']=attrs['Id']elifself.setting=="Trigger":try:self.trigger[attrs['Id']]['Label']=attrs['Id']exceptKeyError:self.trigger[attrs['Id']]=new_dict(empty_trigger)self.trigger[attrs['Id']]['Label']=attrs['Id']elifself.setting=="FunctionDef":try:self.function_def[self.temp_id]["Label"]=attrs['Id']exceptKeyError:self.function_def[self.temp_id]=new_dict(empty_function_def)self.function_def[self.temp_id]["Label"]=attrs['Id']elifself.setting=="Preset":try:self.preset[self.temp_id]["Label"]=attrs['Id']exceptKeyError:self.preset[self.temp_id]=new_dict(empty_preset)self.preset[self.temp_id]["Label"]=attrs['Id']elifname[:4]=="Flag":ifself.setting=="FunctionDef":try:self.function_def[self.temp_id]["Flag"][name]=nameexceptKeyError:self.function_def[self.temp_id]=new_dict(empty_function_def)self.function_def[self.temp_id]["Flag"][name]=nameelifname=="Parameter":ifself.setting=="FunctionDef":try:self.function_def[self.temp_id]["Parameter"].append(attrs['Id'])exceptKeyError:self.function_def[self.temp_id]=new_dict(empty_function_def)self.function_def[self.temp_id]["Parameter"].append(attrs['Id'])elifname=="Type":ifself.setting=="FunctionDef":try:self.function_def[self.temp_id]["ReturnType"]=attrs['Value']exceptKeyError:self.function_def[self.temp_id]=new_dict(empty_function_def)self.function_def[self.temp_id]["ReturnType"]=attrs['Value']elifself.setting=="ParamDef":try:self.param_def[self.temp_id]["Type"]=attrs['Value']exceptKeyError:self.param_def[self.temp_id]=new_dict(empty_param_def)self.param_def[self.temp_id]["Type"]=attrs['Value']elifname=="TypeElement":ifself.setting=="FunctionDef":try:self.function_def[self.temp_id]["TypeElement"]=attrs['Id']exceptKeyError:self.function_def[self.temp_id]=new_dict(empty_function_def)self.function_def[self.temp_id]["TypeElement"]=attrs['Id']elifself.setting=="ParamDef":try:self.param_def[self.temp_id]["TypeElement"]=attrs['Id']exceptKeyError:self.param_def[self.temp_id]=new_dict(empty_function_def)self.param_def[self.temp_id]["TypeElement"]=attrs['Id']elifname=="GameType":ifself.setting=="ParamDef":try:self.param_def[self.temp_id]["GameType"]=attrs['Value']exceptKeyError:self.param_def[self.temp_id]=new_dict(empty_param_def)self.param_def[self.temp_id]["GameType"]=attrs['Value']elifname=="Limits":ifself.setting=="ParamDef":try:self.param_def[self.temp_id]["Limits"]=attrs['Value']exceptKeyError:self.param_def[self.temp_id]=new_dict(empty_param_def)self.param_def[self.temp_id]["Limits"]=attrs['Value']elifname=="BaseType":ifself.setting=="Preset":try:self.preset[self.temp_id]["BaseType"]=attrs['Value']exceptKeyError:self.preset[self.temp_id]=new_dict(empty_preset)self.preset[self.temp_id]["BaseType"]=attrs['Value']elifname[:5]=="Preset":ifself.setting=="Preset":try:self.preset[self.temp_id]["Flag"].append(name)exceptKeyError:self.preset[self.temp_id]=new_dict(empty_preset)self.preset[self.temp_id]["Flag"].append(name)elifname=="DefinesDefault":ifself.setting=="PresetValue":try:self.preset_value[self.temp_id]["DefinesDefault"]=TrueexceptKeyError:self.preset_value[self.temp_id]=new_dict(empty_preset_value)self.preset_value[self.temp_id]["DefinesDefault"]=True#reset settings defendElement(self,name):ifname=="Root"orname=="Element":self.setting=""# we need to parse the data between <x> and </x> this is the function defcharacters(self,content):s=content.strip()ifs!="":ifself.setting=="Label":ifself.temp_name=="Icon":try:self.icon[self.temp_id]['Texture']=sexceptKeyError:self.icon[self.temp_id]={'Texture':"",'Color':""}self.icon[self.temp_id]['Texture']=selifself.temp_name=="Color":try:self.icon[str(self.temp_id)]['Color']=sexceptKeyError:self.icon[self.temp_id]={'Texture':"",'Color':""}self.icon[self.temp_id]['Color']=selifself.setting=="Comment":ifself.temp_name=="Comment":try:self.comment[self.temp_id]['Text']=sexceptKeyError:self.comment[self.temp_id]={'Text':"",'SubFuncType':""}self.comment[self.temp_id]['Text']=selifself.setting=="FunctionDef":ifself.temp_name=="Identifier":try:self.function_def[self.temp_id]["Identifier"]=sexceptKeyError:self.function_def[self.temp_id]=new_dict(empty_function_def)self.function_def[self.temp_id]["Identifier"]=selifself.setting=="ParamDef":ifself.temp_name=="Identifier":try:self.param_def[self.temp_id]["Identifier"]=sexceptKeyError:self.param_def[self.temp_id]=new_dict(empty_param_def)self.param_def[self.temp_id]["Identifier"]=selifself.setting=="Preset":ifself.temp_name=="Identifier":try:self.preset[self.temp_id]["Identifier"]=sexceptKeyError:self.preset[self.temp_id]=new_dict(empty_preset)self.preset[self.temp_id]["Identifier"]=selifself.setting=="PresetValue":ifself.temp_name=="Identifier":try:self.preset_value[self.temp_id]["Identifier"]=sexceptKeyError:self.preset_value[self.temp_id]=new_dict(empty_preset_value)self.preset_value[self.temp_id]["Identifier"]=selifself.temp_name=="Value":try:self.preset_value[self.temp_id]["Value"]=sexceptKeyError:self.preset_value[self.temp_id]=new_dict(empty_preset_value)self.preset_value[self.temp_id]["Value"]=s#generate event functions in wikicrealedefgenerate_sub_event(self,a,b):res=0self.category[b]['FunctionDef'].sort(key=cmp_to_key(lambdax,y:self.function_def[x]["Identifier"]<self.function_def[y]["Identifier"]))forcinself.category[b]['FunctionDef']:if'FlagEvent'inself.function_def[c]['Flag'].keys():res=1print("={}-{}".format(self.get_string("root",a),self.get_string("SubCategory",b)),file=output_file)# if there is a trigger in category we want to show category## flag_root+=1## flag_category+=1## if flag_root == 1:## print("=="+self.get_string("root",a),file=output_file)## if flag_category == 1 and self.get_string("SubCategory",b).strip() !="":## print ("==="+self.get_string("SubCategory",b),file=output_file)# get the grammar hint name as a listgrammar_hint_name=self.get_string("GrammarHintName",c)#print("<<apifunction>>",file=output_file)print("=="+grammar_hint_name[2],file=output_file)print("===GUI",file=output_file)grammar_split=white_space_filter(grammar_hint_name[0].strip()).split()grammer_var=[]foriinrange(len(grammar_split)):ifgrammar_split[i][-1]=="~"orgrammar_split[i][0]=="~":grammer_var.append(i)grammar_split[i]=grammar_split[i].replace("~","")#parse the galaxy script function#galaxy_code=""forlineinself.natives_file:ifline.find(self.function_def[c]['Identifier'])>-1:galaxy_code=line.strip()break#makeup for parametergalaxy_code=white_space_filter(galaxy_code.replace("native ","").replace(";",""))galaxy_code2=galaxy_code[galaxy_code.find("("):]galaxy_code2=galaxy_code2.replace("(","").replace(")","")galaxy_code2=galaxy_code2.split(",")foriinrange(len(galaxy_code2)):galaxy_code2[i]=tuple(galaxy_code2[i].split())galaxy_code=galaxy_code[:galaxy_code.find("(")]+"("foriinrange(len(galaxy_code2)):ifi>0:grammar_split[grammer_var[i-1]]="[[galaxy/triggers/types/{}|{}]]".format(galaxy_code2[i][0],grammar_split[grammer_var[i-1]])galaxy_code+="[[galaxy/triggers/types/{}|{}]] ".format(galaxy_code2[i][0],galaxy_code2[i][0])+galaxy_code2[i][1]+","galaxy_code=galaxy_code[:-1]+")"#makeup for the return typei=galaxy_code.find(" ")galaxy_code2=galaxy_code[:i]galaxy_code2="[[galaxy/triggers/types/{}|{}]] ".format(galaxy_code2,galaxy_code2)galaxy_code=galaxy_code2+galaxy_code[i:]grammar_hint_name[0]=""foriingrammar_split:grammar_hint_name[0]+=i+" "print(self.get_string("root",a)+" - "+grammar_hint_name[0],file=output_file)print("===Galaxy Code",file=output_file)print(galaxy_code,file=output_file)print("===Description",file=output_file)print(grammar_hint_name[1],file=output_file)print("===Parameters",file=output_file)print("*[[galaxy/triggers/types/trigger|trigger]] t\n",file=output_file)forparameterinself.function_def[c]['Parameter']:k=self.get_string("ParamDef",parameter)print("*"+k[2],file=output_file)foriinrange(3,len(k)):print("**"+k[i],file=output_file)print("\n\n",file=output_file)returnresdefgenerate_event(self,k="",g=""):ifk==""andg=="":print("=EVENT",file=output_file)key_list=sorted(self.root_category.keys(),key=cmp_to_key(lambdax,y:self.get_string("root",x)<self.get_string("root",y)))forainkey_list:self.category[a]['SubCategory'].sort(key=cmp_to_key(lambdax,y:self.get_string("SubCategory",x)<self.get_string("SubCategory",y)))forbinself.category[a]['SubCategory']:ifself.category[b]['SubCategory']==[]:self.generate_sub_event(a,b)else:self.generate_event(a,b)else:ifself.category[g]['SubCategory']==[]:self.generate_sub_event(k,g)else:self.generate_sub_event(k,g)self.category[g]['SubCategory'].sort(key=cmp_to_key(lambdax,y:self.get_string("SubCategory",x)<self.get_string("SubCategory",y)))forcinself.category[g]['SubCategory']:self.generate_event(k,c)#generate event functions in wikicrealedefgenerate_event_index(self,k=""):ifk=="":print("=EVENT INDEX",file=output_file)key_list=sorted(self.root_category.keys(),key=cmp_to_key(lambdax,y:self.get_string("root",x)<self.get_string("root",y)))forainkey_list:self.category[a]['SubCategory'].sort(key=cmp_to_key(lambdax,y:self.get_string("SubCategory",x)<self.get_string("SubCategory",y)))print("==[[galaxy/triggers/category-{}|{}]]".format(name_to_url(self.get_string("root",a)),self.get_string("root",a).strip()),file=output_file)forbinself.category[a]['SubCategory']:ifself.category[b]['SubCategory']==[]:self.category[b]['FunctionDef'].sort(key=cmp_to_key(lambdax,y:self.function_def[x]["Identifier"]<self.function_def[y]["Identifier"]))result=self.generate_sub_event_index(b)ifresult!="":print("==="+self.get_string("SubCategory",b),file=output_file)print(result,file=output_file)else:self.generate_event_index(b)else:ifself.category[k]['SubCategory']==[]:self.category[k]['FunctionDef'].sort(key=cmp_to_key(lambdax,y:self.function_def[x]["Identifier"]<self.function_def[y]["Identifier"]))result=self.generate_sub_event_index(k)ifresult!="":#print("==[[galaxy/triggers/category-{}|{}]]".format(name_to_url(self.get_string("root",a)),self.get_string("root",k).strip()),file=output_file)print("==="+self.get_string("SubCategory",k),file=output_file)print(result,file=output_file)else:self.category[k]['FunctionDef'].sort(key=cmp_to_key(lambdax,y:self.function_def[x]["Identifier"]<self.function_def[y]["Identifier"]))result=self.generate_sub_event_index(k)ifresult!="":print("==="+self.get_string("SubCategory",k),file=output_file)print(result,file=output_file)self.category[k]['SubCategory'].sort(key=cmp_to_key(lambdax,y:self.get_string("SubCategory",x)<self.get_string("SubCategory",y)))forcinself.category[k]['SubCategory']:self.generate_event_index(c)defgenerate_sub_event_index(self,b):res=""self.category[b]['FunctionDef'].sort(key=cmp_to_key(lambdax,y:self.function_def[x]["Identifier"]<self.function_def[y]["Identifier"]))forcinself.category[b]['FunctionDef']:if'FlagEvent'inself.function_def[c]['Flag'].keys():# get the grammar hint name as a listgrammar_hint_name=self.get_string("GrammarHintName",c)res+="====[[galaxy/triggers/{}|{}]]".format(name_to_url(grammar_hint_name[2]),grammar_hint_name[2].strip())+"\n"res+="*"+grammar_hint_name[1]+"\n"returnres#generate action or functions in wikicrealedefgenerate_function(self):pass#generate preset + preset values in wikicrealedefgenerate_preset(self):res=""forainself.preset.keys():res=""res+="=="+self.preset[a]['Identifier']+"\n"res+="*"+self.preset[a]['Label']+"\n"res+="*BaseType: "+self.preset[a]['BaseType']+"\n"## res +="*Flag:\n"## for b in self.preset[a]['Flag']:## res +="** "+b+"\n"res+="===PresetValue\n"forbinself.preset[a]['PresetValue']:value=self.get_string("PresetValue",b)res+="* {}:{}".format(value[0],value[1])ifvalue[2]:res+="Default \n"else:res+="\n"print(res)pass#get pure data in simple string no mackup except link tagdefget_string(self,its_category="",its_id=""):res=""temp_tag=""ifits_category=="root":temp_tag="Category/Name/lib_Ntve_"+its_id+"="forlineinself.string_file:ifline.find(temp_tag)==0:res+=line[len(temp_tag):]res=res.strip()breakelifits_category=="SubCategory":temp_tag="Category/Name/lib_Ntve_"+its_id+"="forlineinself.string_file:ifline.find(temp_tag)==0:res+=line[len(temp_tag):]res=res.strip()breakelifits_category=="GrammarHintName":temp_tag=['FunctionDef/Grammar/lib_Ntve_'+its_id+"="]temp_tag.append('FunctionDef/Hint/lib_Ntve_'+its_id+"=")temp_tag.append('FunctionDef/Name/lib_Ntve_'+its_id+"=")a=0#temp_prefix=["===GUI","===Description ","=="]res=[]forlineinself.string_file:ifline.find(temp_tag[a])!=-1:res.append(line[len(temp_tag[a]):])a+=1ifa>=3:breakelifits_category=="ParamDef":res=[]res.append(self.param_def[its_id]['Type'])res.append(self.param_def[its_id]['Identifier'])res.append("[[galaxy/triggers/types/{}|{}]] ".format(self.param_def[its_id]['Type'],self.param_def[its_id]['Type'])+self.param_def[its_id]['Identifier'])ifself.param_def[its_id]['Type']!="preset":#get rest info like limitforkeyinself.param_def[its_id]:ifkey!="Type"andkey!="Identifier"andself.param_def[its_id][key]!=""andself.param_def[its_id][key]!=False:res.append(key+": "+str(self.param_def[its_id][key]))else:preset_name=""temp_tag="Preset/Name/lib_Ntve_"+self.param_def[its_id]["TypeElement"]+"="forlineinself.string_file:ifline.find(temp_tag)>=0:preset_name+=line[len(temp_tag):]breakres.append("Preset: [[galaxy/triggers/presets/{}|{}]]".format(name_to_url(preset_name),preset_name.strip()))#get rest info like limitforkeyinself.param_def[its_id]:ifkey!="Type"andkey!="Identifier"andkey!="TypeElement"andself.param_def[its_id][key]!=""andself.param_def[its_id][key]!=False:res.append(key+": "+str(self.param_def[its_id][key]))elifits_category=="PresetValue":res=[]res.append(self.preset_value[its_id]["Identifier"])res.append(self.preset_value[its_id]["Value"])res.append("Default: {}".format(str(self.preset_value[its_id]["DefinesDefault"])))returnres#we want to save the output or print the data here. defendDocument(self):self.generate_preset()defclean_lines(file):data=file.readlines()title=0k=len(data)i=0whilei<k:iflen(data[i])>=3anddata[i][:2]=="=="anddata[i][2]!="=":title+=1iftitle==2:data.pop(i-1)k-=1title-=1i-=1i+=1returndata#main function, which will be called if u use this file as a exec not as libif__name__=='__main__':# Create a parserparser=make_parser()# Tell the parser we are not interested in XML namespacesparser.setFeature(feature_namespaces,0)# Create the handlerdh=FunctionWriter(string_list,native_galaxy)# Tell the parser to use our handlerparser.setContentHandler(dh)# Parse the inputparser.parse(native_lib)output_file.close()data=clean_lines(open(os.path.join('output.txt'),'r'))output_file=open(os.path.join('output.txt'),'w')forlineindata:ifline.strip()!="":print(line.strip(),file=output_file)output_file.close()
Currently parsed the trigger index page to this:
http://wiki.sc2mapster.com/galaxy/test/
pls compare to old page:
http://wiki.sc2mapster.com/galaxy/triggers/category-events/
and tell me, what i need to change.
@avogatro: Go
whats with the Gread Lines that have no Info under them?
Kinda confuses me
@SouLCarveRR: Go
u mean green title?
Really want to know, which browser u use -_-
they are links to trigger category, which have no trigger in it.
EDIT: I changed it, was a little bit hack, really ugly script now
Are you trying to replicate vjeux's script or are you trying to make the page look different/better?
@Sixen: Go
I want to replicate the function of his script, make the script better.
Publish the script somewhere here as project, so people after me can parse newer patch using this script.
And UPDATE wiki pages, using our new template.
And i want to train my skill in python 3.1.
It looks more or less exactly the same other than the category headings that have nothing under them (and the updates, of course).
@Abion47: Go
well, the update was important. I don't want to change the event list to a tutorial.
Just need time for a update script so i can update all 2000 functions without copy and past. really hate those red fields, especially presets.
I think the Presets just need to have their links fixed, i'll have to look into that.
And the script looks good, :D.
@Sixen: Go
u can also tell me where i should put presets to. galaxy/triggers/presets maybe?
Does your parser sort the triggers by GUI categories?
@Abion47: Go
yes i did with some wirred feature of python. i already sorted the event part. the different between a action/ function or event... is just a flag "FlagEvent".
This code is the current version. Presets was not done. I will do it tonight.
Now I finally updated all the functions/action event presets.
I could update the index file too. http://wiki.sc2mapster.com/galaxy/all-functions/
The old javascript index is more like the galaxy editor without the search function. That is why, I never activate javascript for fooo.fr
Every browser has a search function, right?
go to http://wiki.sc2mapster.com/galaxy/triggers/category-actor/
and search "Actor Get Text"
The 3 red category on the front page belong to campaign mod or chalenge mod. No one use it yet? Really hate them.