julianandrews/sgf-render

Add configuration options for board labels.

Closed this issue · 4 comments

Original issue: julianandrews/sgf-parse#17

It would be good to add an option to draw coordinate labels on all four sides of the board.

Actually, it would be good to generally support more coordinate options, so I should at least figure out what the CLI options will look like. Ideally it would be possible to specify:

  • Which of the four sides to draw coordinate labels on
  • Direction of the coordinates (for horizontal/vertical independently)
    • I think right now, the letters may be going reverse of what you'd expect
  • Maybe an option to specify the labels to use for horizontal/vertical labels
    • This way users could use numbers on both or letters, or could choose not to skip 'I'

This is going to require a bit of a refactor. If I remember right, there's a bit of a mess between the scaling logic and the labeling logic that doesn't make this easy.

Right now, I'm thinking this can be done with two command line options:

--label-sides: Takes a string that's some subset of nesw, default nw that lets you specify which sides get labels

I'll need to think more on how to best handle the horizontal/vertical labels to use.

Side note - it looks as if the way I'm mapping coordinates to letters is the same thing OGS does ([qp] -> R4). So I'm going to keep that as the default, which saves me a breaking change =)

The --label-sides flag was definitely the more useful of the two issues here.

I'm going to leave this bug open, because maybe someday I'll decide to fix it, but if you're wandering in from the internet and actually need the ability to change the labels, let me know and propose a command line argument format because I can't come up with a solution I think is great, and am not even sure I'd ever use it!

I'm closing this in favor of the more specific #17