当前位置: 首页 > news >正文

做网站什么主题比较好网络工程师考几科

做网站什么主题比较好,网络工程师考几科,阿里巴巴网站如何做固定背景,学习建设网站书籍创建cocos工程.bat在多人合作的cocos项目中#xff0c;大家公用一个ccs文件#xff0c;存在的问题是如果大家都提交ccs文件比较容易出现冲突#xff0c;解决冲突麻烦要耗费时间#xff0c;不提交的话就拉不到其他人更新的csd文件。 方案一 解决冲突#xff0c;更新提交c…创建cocos工程.bat在多人合作的cocos项目中大家公用一个ccs文件存在的问题是如果大家都提交ccs文件比较容易出现冲突解决冲突麻烦要耗费时间不提交的话就拉不到其他人更新的csd文件。 方案一  解决冲突更新提交ccs文件 这种方案也可以说没有方案容易造成开发人员不愿意提交自己的ccs文件 方案二 每个人拷贝一个ccs文件自己用 这种方案比较简单粗暴缺点是要看别人的csd文件需要打开别人的工程 方案三 ccs文件不进行维护由脚本生成 先说工作流当需要看别人的csd的时候 1.更新svn(假如版控用svn) 2.执行脚本 CreateCocosProject.py注意读者需要根据脚本存放位置适当修改文件 #!/usr/bin/python # -*- coding: utf-8 -*-import os, shutil, re, sys import xml.etree.ElementTree as ET from xml.dom import minidomSCRIPT_PATH os.path.dirname(os.path.realpath(__file__))COCOS_PATH os.path.realpath(os.path.join(SCRIPT_PATH, .., cocosstudio)) PROJECT_NAME sys.argv[1]# COCOS_INCLUDE_DIRS {res:True, csb:True, preview:True} # COCOS_UNINCLUDE_DIRS {res/csb:True, res/spine:True, res/chatEmoji:True} OUT_PATH os.path.realpath(os.path.join(COCOS_PATH, ..,PROJECT_NAME))# 获取csd文件类型 def GetCsdFileType(csdPath):print(csdPath)tree ET.parse(csdPath)propertyGroupNode tree.getroot().find(./PropertyGroup)attrib propertyGroupNode.attribreturn attrib[Type]#创建一个工程节点 def CreateProjectNode(csdPath):e ET.Element(Project)csdType GetCsdFileType(csdPath)csdName os.path.basename(csdPath)e.set(Type, csdType)e.set(Name, csdName)return e#获取plsit文件frames def GetPlistFrames(plistPath):tree ET.parse(plistPath)rootDict tree.getroot().find(dict)frames []dictList list(rootDict)sizeStr for i in range(0, len(dictList), 2):node1 dictList[i]node2 dictList[i1]if node1.text frames:framesNodes node2.findall(./key)for frameNameNode in framesNodes:frames.append(frameNameNode.text)return framesdef CreatePListNode(plistPath):e ET.Element(PlistImageFolder)plistName os.path.basename(plistPath)plistBaseName os.path.splitext(plistName)[0]e.set(PListFile, plistName)e.set(Name, .%s_PList.Dir % plistBaseName)# 添加子节点frames GetPlistFrames(plistPath)for frame in frames:childE ET.Element(PlistImageFile)childE.set(Name, frame)childE.set(Key, frame)e.append(childE)return edef CreateFolderNode(folderName):e ET.Element(Folder)e.set(Name, folderName)return edef CreateNode(tag, filePath):e ET.Element(tag)eBaseName os.path.basename(filePath)e.set(Name, eBaseName)return e def CreateCsiNode(csiName):eBaseName os.path.basename(csiName)e ET.Element(PlistInfo)eBaseName os.path.basename(csiName)e.set(Name, eBaseName)e.set(Type, Plist)return ezh_pattern re.compile(u[\u4e00-\u9fa5]) def contain_zh(word):if word.find( ) ! -1:print(uError:发现空格)print(word)return Truetry:word word.encode(utf-8)global zh_patternmatch zh_pattern.search(word)return matchexcept UnicodeError:print(uError:发现中文)print(word)return Truereturn matchdef CreateHead():Solution ET.Element(Solution)PropertyGroup ET.Element(PropertyGroup, {Name:CocosProject, Type:CocosStudio, Version:3.10.0.0})SolutionFolder ET.Element(SolutionFolder)Group ET.Element(Group, {ctype:ResourceGroup})RootFolder ET.Element(RootFolder, {Name:.})Solution.append(PropertyGroup)Solution.append(SolutionFolder)SolutionFolder.append(Group)Group.append(RootFolder)return Solution, RootFolderdef checkCanAdd(dirName):# if dirName.find(.svn) ! -1:# return False# p dirName[len(COCOS_PATH) 1:]# p p.replace(os.path.sep, /)# for k in COCOS_INCLUDE_DIRS:# if re.match(r^%s.*%k, p):# for j in COCOS_UNINCLUDE_DIRS:# if re.match(r^%s.*%j, p):# return False# return Truereturn Truedef TraversalDir(dirPath):rootNode, rootFolderNode CreateHead()nodeDict {}nodeDict[] rootNodeindex 0for root, dirs, files in os.walk(dirPath):if not checkCanAdd(root):continueif re.match(r.*_PList.Dir.*, root):continueif contain_zh(root):exit(-1)tempFolderPath root[len(COCOS_PATH) 1:]rIndex tempFolderPath.rfind(os.path.sep)folderNode NonedirName NonedirKey Noneif -1 ! rIndex:dirName tempFolderPath[rIndex1:]dirKey tempFolderPath[0:rIndex]parentNode nodeDict[dirKey]folderNode CreateFolderNode(dirName)parentNode.append(folderNode)nodeDict[tempFolderPath] folderNodeelif tempFolderPath :folderNode rootFolderNodeelse:folderNode CreateFolderNode(tempFolderPath)nodeDict[tempFolderPath] folderNoderootFolderNode.append(folderNode)for file in files:if contain_zh(os.path.join(root, file)):exit(-1)childNode Noneext os.path.splitext(file)if len(ext) 2 :extName ext[1].lower()if extName .png or extName .jpg:if not os.path.exists(os.path.join(root, ext[0].plist)):childNode CreateNode(Image, file)elif extName .mp3:childNode CreateNode(Audio, file)elif extName .ttf:childNode CreateNode(TTF, file)elif extName .fnt:childNode CreateNode(Fnt, file)elif extName .csd:fullCsdPath os.path.join(root, file)childNode CreateProjectNode(fullCsdPath)elif extName .csi:childNode CreateCsiNode(file)elif extName .plist:if root.find(particle) ! -1:childNode CreateNode(PlistParticleFile, file) else:if os.path.exists(os.path.join(root, ext[0].png)):fullPlistPath os.path.join(root, file)childNode CreatePListNode(fullPlistPath)if childNode is not None:folderNode.append(childNode)# tree.write(OUT_PATH)# strArr PrettyDumpXml(rootNode, 0)# rootNode.write(OUT_PATH)# print(list(rootFolderNode))# for node in list(rootFolderNode):# print(node.attrib)pFile open(OUT_PATH, w)pFile.write(ET.tostring(rootNode))pFile.close()def rewriteXml():doc_xml minidom.parse(OUT_PATH)pFile open(OUT_PATH, w)doc_xml.writexml(pFile, \t, \t, \n, utf-8)pFile.close()TraversalDir(COCOS_PATH) rewriteXml() 创建cocos工程.bat echo off set dir%~dp0 cd %dir%scripts echo %dir%scripts python CreateCocosProject.py game_ui_edit.ccs pause
http://www.hkea.cn/news/14551130/

相关文章:

  • 强生公司网站建设原则wordpress主题兜
  • 企业建设H5响应式网站的5大好处镇江本地网
  • 江门网站建设公司网站轮播效果怎么做
  • 上海网站制作的费用做a高清视频在线观看网站
  • 网站建设开发报价方案模板网页设计制作实训总结
  • 阿里云做网站的哪家公司提供专业的网站建设
  • 百度云虚拟主机如何建设网站东莞感染人数最新消息
  • 网站建设开发报价单天津关键词优化网站
  • 3d建模在线制作网站10大工程必备软件
  • 广西钦州住房与城乡建设局网站男女做污污的网站
  • 上海企业网站建设公司哪家好什么网站可以做软件有哪些内容吗
  • 怎样建立一个企业网站长沙柒零叁网站建设
  • 网站建设百灵鸟企业网站素材
  • 长沙网站制作主要公司网店代运营被骗怎么追回
  • wordpress搬站换空间赣州市九一人才网手机版
  • 如何做好网站需求分析平板做网站服务器
  • 开发高端网站开发网络技术服务是干什么的
  • 深圳做分销网站建设光纤网络是哪个公司的
  • 新乡建设网站公司手机网站怎么做才适合优化
  • 网站做seo推广 s手机网站设计公司只选亿企邦
  • 制作一个学校门户网站泉州网站建站模板
  • 公司网站设计需要什么个人网站可以挂广告吗
  • 沈阳响应式网站建设sirna在线设计网站
  • 欧卡乐网站建设初期网站价值
  • 织梦网做网站过程猎头可以做单的网站
  • 网站管理系统怎么做淄博网站建设高端企业
  • seo网站快速排名外包wordpress 导出主题
  • 设计最简单的企业网站wordpress微博挂件
  • 忻州做网站饲料行业建设网站方案设计免费下载ppt
  • 一个网站成本公司注册地址怎么查