Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SVG.py #28

Closed
wants to merge 1 commit into from
Closed

add SVG.py #28

wants to merge 1 commit into from

Conversation

yuiseki
Copy link

@yuiseki yuiseki commented Oct 5, 2020

Issue

Content

  • Added ./shogi/SVG.py.
  • Updated ./shogi/__init__.py to append board.svg() method.
  • Updated README.rst to introduce board.svg() method.

How To Check

  • I cant understand how to write and run test in this project.
  • So I've checked my code by python interpreter.
  • $ python
  • >>> import shogi
  • >>> board = shogi.Board()
  • >>> board.svg() should output SVG text.

Others

  • Base SVG string is published under Creative Commons BY-SA License, Is it safe to merge?
  • If there are coding rules in this project, let me know so I can follow them.

@coveralls
Copy link

Coverage Status

Coverage decreased (-9.06%) to 74.202% when pulling a3ed5b2 on yuiseki:add-svg-renderer into 343eb42 on gunyarakun:master.

@gunyarakun
Copy link
Owner

@yuiseki
I generate a SVG file like following, but the image only contains a shogi board, not komas.
I checked with Firefox and Adobe Illustrator.
Could you check that?

board.svg

import shogi
board = shogi.Board()
print(board.svg())

@DerAndereJohannes
Copy link
Contributor

I pulled yuiseki's branch and didn't have the same problem as you (pieces were loading! - not all though). I forked the project and managed to get it to work

Default Board (as in your example)

Default Board

SFEN ('4+R3l/1r1+P2gk1/3p1p1s1/2pg3pp/1p4p2/SP4PPP/2NP1PKS1/2G2+n3/8L w B2N2L3Pbgsp 10')

custom sfen

I can open a new pull request if you like to see!

@gunyarakun
Copy link
Owner

@DerAndereJohannes
I wonder if you could make a new pull request, thank you!

@yuiseki
Copy link
Author

yuiseki commented Feb 24, 2021

Looks Nice! Sorry for my half-baked contribution

@DerAndereJohannes
Copy link
Contributor

Looks Nice! Sorry for my half-baked contribution

I did not do much to your code! You set it up very nicely! 😁👍 You can check it out in the other pull request!

@gunyarakun
Copy link
Owner

Close this pull request because of #36 .

@gunyarakun gunyarakun closed this Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request - SVG image rendering
4 participants