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 example card xml #2

Open
snickercop opened this issue Dec 22, 2019 · 7 comments
Open

Add example card xml #2

snickercop opened this issue Dec 22, 2019 · 7 comments

Comments

@snickercop
Copy link
Owner

@snickercop snickercop commented Dec 22, 2019

Follow the instructions in the docs to make an xml file with example cards, and make sure the program works on it!

@zyjeng11

This comment has been minimized.

Copy link
Contributor

@zyjeng11 zyjeng11 commented Dec 31, 2019

I'd like to work on this issue, can I get more detail information?

@snickercop

This comment has been minimized.

Copy link
Owner Author

@snickercop snickercop commented Dec 31, 2019

You should make an xml file containing data for two or three cards. Then, run the xmlparse.py script on them. You should see some images with the card text spit out. If it works, send me a merge request!

@zyjeng11

This comment has been minimized.

Copy link
Contributor

@zyjeng11 zyjeng11 commented Jan 1, 2020

I got a error message while execute xmlparse.py and I've stuck here.
Traceback (most recent call last):
File "xmlparse.py", line 1, in
from card import Card, filize
File "D:\python\cardizer-master\card.py", line 10, in
rulesF = ImageFont.truetype('fonts/source-code-pro/SourceCodePro-Medium.otf', RULES_FONT_SIZE)
File "D:\program\python\lib\site-packages\PIL\ImageFont.py", line 640, in truetype
return freetype(font)
File "D:\program\python\lib\site-packages\PIL\ImageFont.py", line 637, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "D:\program\python\lib\site-packages\PIL\ImageFont.py", line 186, in init
font, size, index, encoding, layout_engine=layout_engine
OSError: cannot open resource

@zyjeng11

This comment has been minimized.

Copy link
Contributor

@zyjeng11 zyjeng11 commented Jan 1, 2020

I found the problem. In card.py line 9, 10, I need to write the direct path of the font file.
FYI

@snickercop

This comment has been minimized.

Copy link
Owner Author

@snickercop snickercop commented Jan 1, 2020

@snickercop

This comment has been minimized.

Copy link
Owner Author

@snickercop snickercop commented Jan 1, 2020

Oh yeah, you got it! I replied from my email and github hadn't sent your latest reply yet. Good job :)

@zyjeng11

This comment has been minimized.

Copy link
Contributor

@zyjeng11 zyjeng11 commented Jan 11, 2020

Did you receive my PR? I'm I doing it right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.