示例#1
0
def doit(token):
	 # each token one svg file
	# create name "generated/token_{0}.svg"
	# calcTokenValue(front, back)
	fileName = sys.argv[2].format(token.idno)
	svgfile = open(fileName, "w")
	svg = SvgWriter(svgfile)    
	svg.begin()
	
	# write symbols
	svg.beginDefs()
	writeTokenFront(svg, token)
	writeTokenBack(svg, token)
	svg.endDefs()
	
	# write drawings
	svg.file.write('<use xlink:href="#{0}" x="{1}mm" y="{2}mm" width="22mm" height="27mm" />\n'.format(token.idno+'f', 0, 0))
	svg.file.write('<use xlink:href="#{0}" x="{1}mm" y="{2}mm" width="22mm" height="27mm" />\n'.format(token.idno+'b', "7", 0))
	
	svg.end()
	svgfile.close()
	
	print("{0}-{1}-{2}-{3}".format(token.idno, token.directions, token.attack, token.defense))
	
	pass
示例#2
0
def doit(token):

    #frontside
    writeTokenFront(svg, token)
    #backside
    writeTokenBack(svg, token)

    print("{0}-{1}-{2}-{3}".format(token.idno, token.directions, token.attack,
                                   token.defense))

    pass
示例#3
0
文件: genLibrary.py 项目: okard/depot
def doit(token):
	
	#frontside
	writeTokenFront(svg, token)
	#backside
	writeTokenBack(svg, token)
	
	
	
	
	
	print("{0}-{1}-{2}-{3}".format(token.idno, token.directions, token.attack, token.defense))
	
	pass