WandererXII / lishogi

☗ lishogi.org: the forever free, adless and open source shogi server forked from lichess.org ☗
https://lishogi.org
GNU Affero General Public License v3.0
268 stars 41 forks source link

Request for Automatic Analysis Initialization from SFEN in Game Records #864

Open akicho8 opened 1 month ago

akicho8 commented 1 month ago

Hello,

I would like to propose a new feature for the automatic initiation of game analysis via SFEN in the URL.

For example, given the following SFEN:

position sfen 7k1/7s1/7+P1/9/9/9/9/9/9 b G2r2b3g3s4n4l17p 1 moves G*3b 2a1a 3b2b

We could start the analysis in a pre-loaded state using a URL like:

https://lishogi.org/analysis?sfen=7k1%2F7s1%2F7%2BP1%2F9%2F9%2F9%2F9%2F9%2F9%20b%20G2r2b3g3s4n4l17p%201%20moves%20G%2A3b%202a1a%203b2b

Additionally, adding a parameter such as analysis=true would automatically commence the analysis.

I believe implementing this feature will enhance usability and allow for greater external utilization of the platform.

I would appreciate it if you would consider this. Best regards.

WandererXII commented 1 month ago

Hello, seems like a nice idea, I will definitely add analysis=true param functionality. As for the moves in url - there could be some issues with urls being too long when there are too many moves cca 500+. But I guess such a limit is reasonable... I should prob also add some 'share' option to easily create the url.