Changeset - f0b8120281b9
[Not reviewed]
default
9 0 8
Laman - 8 years ago 2017-01-21 21:08:33

saner directory structure
9 files changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/diana.py
Show inline comments
 
file renamed from src/diana/diana.py to src/diana.py
 
import os
 
import re
 
import sys
 
 
import go
 
import sgf
 
import go
 
 
if len(sys.argv)>1:
 
	files=sys.argv[1:]
 
else:
 
	sys.exit("no input file specified")
 
 
movesPerDiagram=75
 
minMovesPerDiagram=10
 
 
t=sys.stdout
 
c=28
 
padding=15
 
highNumbers=True
 
 
class Svg:
 
	content=""
 
	footer=""
 
	extension="svg"
 
 
	padding=15
 
	gridSize=28
 
	highNumbers=True
 
	
 
	def __init__(self):
 
		self.content='''<?xml version="1.0" standalone="no"?>
 
<svg width="{0}" height="{0}" version="1.1" xmlns="http://www.w3.org/2000/svg" alignment-baseline="center">
 
	<defs>
 
		<style type="text/css"><![CDATA[
 
		text{{font-family:"DejaVu Sans";text-anchor:middle;}}
 
		line{{stroke:black;stroke-width:0.7}}
 
		circle{{stroke:black}}
 
		.b{{fill:black}}
 
		.w{{fill:white}}
 
		]]></style>
 
	</defs>
 
	<rect width="{0}" height="{0}" x="0" y="0" style="fill:white;stroke:white"/>\n'''.format(2*self.padding+18*self.gridSize)
 
		self.footer="</svg>\n"
 
 
		grid='  <line x1="{0}" x2="{1}" y1="{2}" y2="{3}" />\n'
 
 
		# okraje desky
 
		for i in (0,18):
 
			self.content+='  <line x1="{0}" x2="{1}" y1="{2}" y2="{3}" style="stroke-width:1"/>\n'.format(self.padding, 18*self.gridSize+self.padding, self.gridSize*i+self.padding, self.gridSize*i+self.padding)
 
			self.content+='  <line x1="{0}" x2="{1}" y1="{2}" y2="{3}" style="stroke-width:1"/>\n'.format(self.gridSize*i+self.padding, self.gridSize*i+self.padding, self.padding, 18*self.gridSize+self.padding)
 
		
 
		# mřížka
 
		for i in range(1,18):
 
			self.content+=grid.format(padding, 18*c+padding, c*i+padding, c*i+padding)
src/diana/__init__.py
Show inline comments
 
deleted file
src/go.py
Show inline comments
 
file renamed from src/diana/go.py to src/go.py
src/sgf.py
Show inline comments
 
file renamed from src/diana/sgf.py to src/sgf.py
src/sgfParser.py
Show inline comments
 
file renamed from src/diana/sgfParser.py to src/sgfParser.py
src/tests/__init__.py
Show inline comments
 
file renamed from src/diana/tests/__init__.py to src/tests/__init__.py
src/tests/data/kogos.sgf
Show inline comments
 
file renamed from src/diana/tests/data/kogos.sgf to src/tests/data/kogos.sgf
src/tests/data/simple.sgf
Show inline comments
 
file renamed from src/diana/tests/data/simple.sgf to src/tests/data/simple.sgf
src/tests/testSgfParser.py
Show inline comments
 
file renamed from src/diana/tests/sgfParser.py to src/tests/testSgfParser.py
0 comments (0 inline, 0 general)