obsidian-chess-study icon indicating copy to clipboard operation
obsidian-chess-study copied to clipboard

Support importing variants from Lichess

Open myAlterX opened this issue 1 year ago • 2 comments

Hi! First of all, this is great work. Thank you very much! I tried importing a Lichess analysis with variants and noticed it imported only the main line.

I then tried to check your variant work and it works on top of the import, but ignores what was there. Here's an example I created on Lichess:

1. d4 f5 2. h3 Nf6 3. g4 fxg4 4. hxg4 Nxg4 5. Qd3 h6 (5... Nf6 6. Rxh7 Rxh7 (6... Nxh7 7. Qg6#) 7. Qg6#) (5... g6 6. Qg3 d5) 6. Qg6#

Is there a different variant syntax you use? Or is importing variants not (yet) supported?

myAlterX avatar Feb 16 '24 12:02 myAlterX

Hi!

This is using https://github.com/jhlywa/chess.js for parsing the FENs and PGNs and by looking at this I realized that we could get the comments of the PGN, but I don't think this supports variants yet.

chrislicodes avatar Feb 28 '24 10:02 chrislicodes

I actually have this feature on my local machine. I'll put together the PR for it.

latenitecoding avatar Mar 08 '24 18:03 latenitecoding