Discussion of anything and everything relating to chess playing software and machines.
Moderators: hgm , Rebel , chrisw
Roland Chastain
Posts: 640 Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain
Post
by Roland Chastain » Fri Jan 31, 2020 9:29 pm
Hello!
I would like to present a very simple command line tool, that makes a picture of a chess position.
https://github.com/rchastain/chess-image
For now it accepts three arguments: an EPD string, the desired size of the picture, and the name of the file to create.
Code: Select all
chess-image -p "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -" -s 320 -o position.png
chess-image --position="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -" --size=320 --output=position.png
Maybe I will add more options if someone is interested.
Regards.
Roland
Qui trop embrasse mal étreint.
JohnW
Posts: 381 Joined: Thu Nov 22, 2012 12:20 am
Location: New Hampshire
Post
by JohnW » Sat Feb 01, 2020 12:06 am
Is there an advantage to using the command line instead of using something like Fritz 17 or Arena?
Ovyron
Posts: 4556 Joined: Tue Jul 03, 2007 4:30 am
Post
by Ovyron » Sat Feb 01, 2020 12:48 am
One advantage would be not needing to use a GUI like Fritz 17 or Arena.
Dann Corbit
Posts: 12542 Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA
Post
by Dann Corbit » Sat Feb 01, 2020 5:08 am
JohnW wrote: ↑ Sat Feb 01, 2020 12:06 am
Is there an advantage to using the command line instead of using something like Fritz 17 or Arena?
Imagine if you wanted to do 15,000 images.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Guenther
Posts: 4611 Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon
Post
by Guenther » Sat Feb 01, 2020 8:48 am
This thread links to two similar tools with batch capability.
http://talkchess.com/forum3/viewtopic.p ... vg#p785948
https://rwbc-chess.de
trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...
Roland Chastain
Posts: 640 Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain
Post
by Roland Chastain » Sat Feb 01, 2020 10:00 am
Thank you for your comments.
Dear Guenther, thank you for the link. I didn't know that Python had a standard chess library. Very interesting.
I could easily add HTML output. I have some code ready for that. If I understand you correctly, by batch capability you mean that the tool accepts as argument an EPD file and generates an HTML document with all positions?
Qui trop embrasse mal étreint.
JohnW
Posts: 381 Joined: Thu Nov 22, 2012 12:20 am
Location: New Hampshire
Post
by JohnW » Sat Feb 01, 2020 2:21 pm
Dann Corbit wrote: ↑ Sat Feb 01, 2020 5:08 am
JohnW wrote: ↑ Sat Feb 01, 2020 12:06 am
Is there an advantage to using the command line instead of using something like Fritz 17 or Arena?
Imagine if you wanted to do 15,000 images.
That's a good point, though I can't imagine ever wanting to do that I am sure somebody would.
Roland Chastain
Posts: 640 Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain
Post
by Roland Chastain » Sun Feb 02, 2020 12:39 pm
Hello!
A new version is available.
https://github.com/rchastain/chess-image/releases
Two options have been added:
-f <font> or --font=<font>
-c or --coordinates
The possible values for the
font parameter are:
adventurer, montreal .
The borders with coordinates aren't available for the Chess Montreal font. If you ask the coordinates with that font, the option is ignored without warning.
Regards.
Roland
Qui trop embrasse mal étreint.