[RELEASE][PY] XML Generator

10/17/2013 08:28 poXavincS#1
Hi guys, this is topic all the quotation. I am translate to your all epvp users.

He is use Windows 8 and EterNexus not work. So, this is XML Generator create it.

Go to pack your directory path.

He create open path is C:\Users\user\Desktop\Metin2\Araçlar\EPK-EIX\pack acıcı

[Only registered and activated users can see links. Click Here To Register...]

Windows Button + R >> cmd [ENTER] open CMD

[Only registered and activated users can see links. Click Here To Register...]

cd C:\Users\user\Desktop\Metin2\Araçlar\EPK-EIX\pack acıcı

[Only registered and activated users can see links. Click Here To Register...]

python xmlOlustur.py xmlName directoryName, python xmlOlustur.py fatih Source

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

Ta Daaa
[Only registered and activated users can see links. Click Here To Register...]

---------------

If you haven't python programmic language or not added windows path statement, [Only registered and activated users can see links. Click Here To Register...].

PHP Code:
#-*- coding: cp1254 -*-
# Release:     14.10.2013 20:55
# Author:    Fatih Mert DOĞANCAN
# Facebook:    www.facebook.com/fthmad
# Facebook'tan ulabilirsiniz!!
# HER TÜRLÜ QUEST YAZILIR
# ---------------------------
# Kullanım:
# python xmlOlustur.py [xmlAdi|packAdi] [clientDosyalarininBulunduğuKlasör]
# Örnek
# cmd > cd C:\Users\user\Desktop\Metin2\Araçlar\EPK-EIX\pack acıcı
# python xmlOlustur.py fatih Source
# fatih.xml olustu!

from sys import argv
from os import getcwd
,walk,path

class xmlOlustur(object):
    
def __init__(self):
        
self.data = {"len":len(getcwd()),"dizin":getcwd(),"packAdi":argv[1],"klasorAdi":argv[2]}
        
self.xml = {"dizin":self.data["dizin"]+"\\"+self.data["klasorAdi"],"baslangic":"""<!-- Bu dosya %s Tarafından oluşturulmuştur -->\n<Buildfile version="1.1"><Action type="create" output="%s">"""%("ucurutşulOLMX2MniteM"[::-1],self.data["packAdi"]),"bitis":"""</Action></Buildfile>"""}

    
def getir(self,klasor):
        
bin = []
        for 
root,klasorlar,dosyalar in walk(klasor):
            for 
dosyaAdi in dosyalar:
                
dosyaYol = path.join(root,dosyaAdi)
                
bin.append(dosyaYol)
        return 
bin
        
    def type
(self,item):
        if 
item[-3:] in ["sub","jpg","mp3","gr2"]: #0
            
return 0
        elif item
[-3:] in ["mse","tga","dds","spt","atr","wtr"]: #1
            
return 1
        elif item
[-3:] == "txt":
            return 
2
        elif item
[-2:] == "py":
            return 
2
        
else: #0
            
return 0


    def olustur
(self):
        
son = ""
        
son += self.xml["baslangic"]
        for 
i in self.getir(self.xml["dizin"]):
            
item = """<File archivedPath="%s" type="%s"><![CDATA[[%s]]></File>"""%(i.replace("\\","/")[self.data["len"]+1:],self.type(i),i[self.data["len"]+1:])
            
son += item
        son 
+= self.xml["bitis"]
        try:
            
with open(self.data["packAdi"]+".xml","wb") as dosya:
                
dosya.write(son)
        
except IOError:
            return 
False
        
else:
            return 
True
    

fatihMertDogancan 
= xmlOlustur()
if 
fatihMertDogancan.olustur():
    print 
"%s.xml is created!"%argv[1]
else:
    print 
"File not writing." 
10/17/2013 18:45 kstmr#2
ty but i realy didnt understood what you said
please use english or at least german so some one might translate for us
or ask a friend of yours to translate it for us
10/18/2013 08:12 HaveBeen™#3
If this is your first start, you're very backward. This system already public. Before opening the thread please check whether what you're doing on the internet. :facepalm: Eternexus always is work good. :) XML is a simplified system without a better and nearer to the users.

When you're open topic, please write german/english. Because this community know german/english not turkish.

Mfg HaveBeen™
10/18/2013 11:10 bürokrasi#4
Quote:
Originally Posted by HaveBeen™ View Post
If this is your first start, you're very backward. This system already public. Before opening the thread please check whether what you're doing on the internet. :facepalm: Eternexus always is work good. :) XML is a simplified system without a better and nearer to the users.

When you're open topic, please write german/english. Because this community know german/english not turkish.

Mfg HaveBeen™
yazık zavallı ve köle= kültürel yozlaşma
10/18/2013 12:26 .Kaaarni'#5
Merhaba,

lütfen burda sadece Almanca veya Ingilizce yaz.
Diyer Diller burda Yasaktir.

Wenn jmd juckt was ich geschrieben hab
--> Google Übersetzer.
10/18/2013 13:12 HaveBeen™#6
Quote:
Originally Posted by bürokrasi View Post
yazık zavallı ve köle= kültürel yozlaşma
Açıkcası modern dünyadan geri kalmışsın. Türkleri savunmanı anlarım ama yanlış yerde savunduğunun farkında bile değilsin. Türk forumunda biri ingilizce konuşsa olanlar olur. İngiliz forumunda türkçe yazılırsa hiçbir şey yapılmaz. Sen bunun düşüncesindesin çok yanlış yol izliyorsun. Modernleşsen iyi olur yoksa bu dünya seni paşa paşa unutur.
10/19/2013 00:09 bürokrasi#7
Quote:
Originally Posted by HaveBeen™ View Post
Açıkcası modern dünyadan geri kalmışsın. Türkleri savunmanı anlarım ama yanlış yerde savunduğunun farkında bile değilsin. Türk forumunda biri ingilizce konuşsa olanlar olur. İngiliz forumunda türkçe yazılırsa hiçbir şey yapılmaz. Sen bunun düşüncesindesin çok yanlış yol izliyorsun. Modernleşsen iyi olur yoksa bu dünya seni paşa paşa unutur.
zekasız aptal :)
10/19/2013 10:20 poXavincS#8
Quote:
Originally Posted by .нyMurs View Post
Merhaba,

lütfen burda sadece Almanca veya Ingilizce yaz.
Diyer Diller burda Yasaktir.

Wenn jmd juckt was ich geschrieben hab
--> Google Übersetzer.
You're right! I converted..
10/19/2013 15:38 HaveBeen™#9
Quote:
Originally Posted by bürokrasi View Post
zekasız aptal :)
Zekasız olduğum için senden fazla bilgim varya. Daha fazla uzatmaya gerek yok, senin aptallığın kendinedir burayıda türk forumuna çevirme saygının ne olduğunu öğrenmeni tavsiye ederim. Belki o zaman uslu bir köpek olabilirsin.