SabakiHQ / Sabaki

An elegant Go board and SGF editor for a more civilized age.
https://sabaki.yichuanshen.de/
MIT License
2.39k stars 376 forks source link

Convert this to an extension on Obsidian? #943

Closed psygo closed 7 months ago

psygo commented 1 year ago

Would love to see Sabaki as an extension option for Obsidian, is that possible? What would be the necessary steps in order to achieve this? If this conversion is anything simple, I could do it myself, but I don't really have any experience with Electron, unfortunately.

I don't think it's necessary to have the whole thing there, but having Sabaki as an option for reading and editing SGF files in my vaults would be awesome.

psygo commented 1 year ago

That said, since Obsidian is basically a web page, other <iframe>-based solutions will probably be good enough.

RobertChrist commented 1 year ago

@psygo - I use this for Obsidian: https://github.com/THeK3nger/obsidian-goban

psygo commented 1 year ago

@RobertChrist Pretty cool! Kind of sad that it doesn't support the more common SGF format.

I guess another idea for Sabaki would be a way to export SGF into Sensei's Library's format?

apetresc commented 7 months ago

I think I understand what you'd be looking for in an Obsidian extension (to embed a Goban view, right?), but that wouldn't be part of Sabaki. If anything it would be a separate Obsidian project that embeds Shudan which is the Goban component Sabaki uses.

I guess another idea for Sabaki would be a way to export SGF into Sensei's Library's format?

It can already do that! See File>Clipboard>Copy ASCII Diagram, which produces something like:

$$ 
$$ +---------------------------------------+
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . O X X . . . |
$$ | . . . , . . . . . , . . . O O , X . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ +---------------------------------------+

Which should be compatible with SL and the extension that @RobertChrist linked! 🙂

psygo commented 7 months ago

What I meant is for an extension like that to be part of the Sabaki ecosystem.

StinsonZhao commented 7 months ago

Hey, I got it. I have just finished developing it and submitted it to Obsidian. Repo:https://github.com/StinsonZhao/obsidian-plugin-goban-sgf

But I haven't done exhaustive testing under multiple systems

psygo commented 7 months ago

Damn, that looks dope, @StinsonZhao !

I think you've also found a more up to date solution to this issue (Use in a React project? #1), which deals with how to embed Sabaki in a webpage. If you could help create a minimal template for it, I would greatly appreciate it! (Maybe what you have in that project is already minimal enough, I don't know.)

And you've also managed to pretty much update the game graph component, which is something I wish Sabaki published as a separate package at some point, or at least together with Shudan.

Anyways, let us know when it's available on Obsidian!