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

[Features request] Loading pgn and comments from the chess-study chunk

Open kevinpolisano opened this issue 2 years ago • 9 comments

Hello,

Your plugin is really helpful. It would be still better if it was possible to:

  • Include directly the PGN in text format (inside the chess-study environment) rather than opening a new window, because first I want to keep a trace of the moves (if your plugin will stop to work one day); and secondly because I use Templater to fill these fields with the content of my clipboard.
  • It would be convenient as well if the comments of the PGN could be directly loaded in the dynamic interface.
  • Finally it could be useful to have a simple way to remove the json file associated to the chunk.
  • Will your plugin work on mobile?

Thank you!

kevinpolisano avatar Aug 01 '23 19:08 kevinpolisano

Hey Kevin, thanks for the feedback!

Reading the PGN from a codeblock attribute and writing it back shouldn't be a problem. The same is true for removing the JSON - I wanted to create a little panel where one can mange these.

Interactions should already work on mobile - I think we are missing some responsive design here? I will have a look (not sure when though, I have a lot to do these last weeks).

chrislicodes avatar Aug 15 '23 07:08 chrislicodes

Hey Christoph,

Thanks I really appreciate what you plan to do! You think it would be also possible to load comments from the PGN?

For instance:

[FEN "r4rk1/p2bRpp1/2p2n1p/6q1/2Bp4/3P1Q1P/PPP2PP1/R5K1 b - - 4 19"]
19... Rfe8 {He made an error with this move} 20. Bxf7+

kevinpolisano avatar Aug 15 '23 09:08 kevinpolisano

Do you plan to work on these stuffs?

Thanks!

kevinpolisano avatar Nov 29 '23 12:11 kevinpolisano

I have a PR in the works for exporting the PGN. This would allow you to export the PGN to clipboard to then paste into your notes, so that you can save it in that form later. Also, you shouldn't worry about the plugin not working someday. Once you install the plugin, it's on your machine for as long as you'd like to have it.

I can also work on having comments parsed from the initial PGN as well as copied to clipboard when the PGN is exported.

As for mobile, the issues with mobile stem from the board being rendered to a specific size. The CSS needs to be configured to scale the board relative to the resolution of the display down to a minimum size and up to a maximum size. It's currently set to an absolute value of 450px.

I don't have any plans to work on a JSON file manager, but I can see how that would be useful. I'm okay with just deleting the files from my machine myself.

latenitecoding avatar Feb 05 '24 00:02 latenitecoding

Hey, I plan to work on responsiveness and a simple JSON file manager soon.

I can also work on having comments parsed from the initial PGN as well as copied to clipboard when the PGN is exported.

@latenitecoding is this already part of the upcoming PRs? 🤔

chrislicodes avatar Feb 11 '24 14:02 chrislicodes

I've completed variants but not comments. I can put comment export along with the same PR. Comment parsing from the initial PGN is more difficult, so that will need to be a separate PR

latenitecoding avatar Mar 08 '24 19:03 latenitecoding

Reading the PGN from a codeblock attribute and writing it back shouldn't be a problem.

@chrislicodes Will you offer this possibility in the next version? 😄

I've completed variants but not comments. I can put comment export along with the same PR. Comment parsing from the initial PGN is more difficult, so that will need to be a separate PR

@latenitecoding Oh I'm really interesting on the comments import feature ! 👍

kevinpolisano avatar Mar 22 '24 13:03 kevinpolisano

Reading the PGN from a codeblock attribute and writing it back shouldn't be a problem.

Is it still something you plan to do?

Thanks!

kevinpolisano avatar Jul 18 '24 09:07 kevinpolisano

Hey @latenitecoding, are you able to make any progress on this?

sbhal avatar Nov 20 '24 04:11 sbhal