Copy / past diagrams

Everything about Sudoku that doesn't fit in one of the other sections

Copy / past diagrams

Postby Pupp » Thu Aug 27, 2020 2:58 pm

How does everybody paste diagrams into a forum post? When I "copy" something, it's usually just a string of numbers. Is there a particular program that allows that?
Pupp
 
Posts: 246
Joined: 18 October 2019

Re: Copy / past diagrams

Postby SpAce » Thu Aug 27, 2020 3:17 pm

Pupp wrote:How does everybody paste diagrams into a forum post? When I "copy" something, it's usually just a string of numbers. Is there a particular program that allows that?

In Hodoku the menu item Edit::Copy Candidates copies the current pencil mark diagram. In SudokuWiki you get it by clicking "Email This Board". I don't know about others.

Btw, I'd like to know what people use to copy the givens (or values) as a grid instead of just a string. I haven't found that option in Hodoku. Edit::Copy Givens/Values only copy the puzzle string, but no diagram.
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Copy / past diagrams

Postby mith » Thu Aug 27, 2020 6:30 pm

I use a monstrous excel formula, for whatever that's worth. :)

Code: Select all
="+-------+-------+-------+
| "&B2&" "&C2&" "&D2&" | "&E2&" "&F2&" "&G2&" | "&H2&" "&I2&" "&J2&" |
| "&B3&" "&C3&" "&D3&" | "&E3&" "&F3&" "&G3&" | "&H3&" "&I3&" "&J3&" |
| "&B4&" "&C4&" "&D4&" | "&E4&" "&F4&" "&G4&" | "&H4&" "&I4&" "&J4&" |
+-------+-------+-------+
| "&B5&" "&C5&" "&D5&" | "&E5&" "&F5&" "&G5&" | "&H5&" "&I5&" "&J5&" |
| "&B6&" "&C6&" "&D6&" | "&E6&" "&F6&" "&G6&" | "&H6&" "&I6&" "&J6&" |
| "&B7&" "&C7&" "&D7&" | "&E7&" "&F7&" "&G7&" | "&H7&" "&I7&" "&J7&" |
+-------+-------+-------+
| "&B8&" "&C8&" "&D8&" | "&E8&" "&F8&" "&G8&" | "&H8&" "&I8&" "&J8&" |
| "&B9&" "&C9&" "&D9&" | "&E9&" "&F9&" "&G9&" | "&H9&" "&I9&" "&J9&" |
| "&B10&" "&C10&" "&D10&" | "&E10&" "&F10&" "&G10&" | "&H10&" "&I10&" "&J10&" |
+-------+-------+-------+"
mith
 
Posts: 950
Joined: 14 July 2020

Re: Copy / past diagrams

Postby Pupp » Fri Aug 28, 2020 2:22 am

SpAce wrote:
Pupp wrote:How does everybody paste diagrams into a forum post? When I "copy" something, it's usually just a string of numbers. Is there a particular program that allows that?

In Hodoku the menu item Edit::Copy Candidates copies the current pencil mark diagram. In SudokuWiki you get it by clicking "Email This Board". I don't know about others.

Btw, I'd like to know what people use to copy the givens (or values) as a grid instead of just a string. I haven't found that option in Hodoku. Edit::Copy Givens/Values only copy the puzzle string, but no diagram.


Thanks

Code: Select all
.-------------------.-----------------------.-------------------.
| 3457  4568  34578 | 24567   45679  25679  | 2679   1     259  |
| 9     2     1     | 3       567    567    | 8      4     5    |
| 457   456   457   | 124567  8      125679 | 2679   5679  3    |
:-------------------+-----------------------+-------------------:
| 8     145   3457  | 1457    1457   157    | 3479   2     6    |
| 147   14    6     | 9       2      3      | 5      7     48   |
| 2     9     3457  | 45678   4567   5678   | 347    37    1    |
:-------------------+-----------------------+-------------------:
| 6     1458  2458  | 12578   3      125789 | 249    59    2459 |
| 5     3     9     | 256     56     4      | 1      8     7    |
| 145   7     2458  | 12568   1569   125689 | 23469  3569  2459 |
'-------------------'-----------------------'-------------------'
Pupp
 
Posts: 246
Joined: 18 October 2019

Re: Copy / past diagrams

Postby Pupp » Fri Aug 28, 2020 2:31 pm

TEST

Code: Select all
 *-----------*
 |1..|..2|4.8|
 |...|49.|...|
 |...|..1|63.|
 |---+---+---|
 |2..|...|39.|
 |..9|5.6|2..|
 |.13|...|..4|
 |---+---+---|
 |.74|6..|...|
 |...|.28|...|
 |9.1|7..|..6|
 *-----------*


 *-----------*
 |1..|..2|4.8|
 |...|49.|...|
 |...|..1|63.|
 |---+---+---|
 |2..|...|39.|
 |..9|5.6|2..|
 |.13|...|..4|
 |---+---+---|
 |.74|6..|...|
 |...|.28|...|
 |9.1|7..|..6|
 *-----------*


 *--------------------------------------------------------------------*
 | 1      3569   567    | 3      3567   2      | 4      57     8      |
 | 35678  23568  25678  | 4      9      357    | 157    1257   1257   |
 | 4578   24589  2578   | 8      578    1      | 6      3      2579   |
 *----------------------+----------------------+----------------------|
 | 2      4568   5678   | 18     1478   47     | 3      9      157    |
 | 478    48     9      | 5      13478  6      | 2      178    17     |
 | 5678   1      3      | 289    78     79     | 578    5678   4      |
 *----------------------+----------------------+----------------------|
 | 358    7      4      | 6      135    359    | 1589   1258   12359  |
 | 356    356    56     | 139    2      8      | 1579   1457   13579  |
 | 9      2358   1      | 7      345    345    | 58     2458   6      |
 *--------------------------------------------------------------------*
Pupp
 
Posts: 246
Joined: 18 October 2019

Re: Copy / past diagrams

Postby Pupp » Fri Aug 28, 2020 2:35 pm

mith wrote:I use a monstrous excel formula, for whatever that's worth. :)

Code: Select all
="+-------+-------+-------+
| "&B2&" "&C2&" "&D2&" | "&E2&" "&F2&" "&G2&" | "&H2&" "&I2&" "&J2&" |
| "&B3&" "&C3&" "&D3&" | "&E3&" "&F3&" "&G3&" | "&H3&" "&I3&" "&J3&" |
| "&B4&" "&C4&" "&D4&" | "&E4&" "&F4&" "&G4&" | "&H4&" "&I4&" "&J4&" |
+-------+-------+-------+
| "&B5&" "&C5&" "&D5&" | "&E5&" "&F5&" "&G5&" | "&H5&" "&I5&" "&J5&" |
| "&B6&" "&C6&" "&D6&" | "&E6&" "&F6&" "&G6&" | "&H6&" "&I6&" "&J6&" |
| "&B7&" "&C7&" "&D7&" | "&E7&" "&F7&" "&G7&" | "&H7&" "&I7&" "&J7&" |
+-------+-------+-------+
| "&B8&" "&C8&" "&D8&" | "&E8&" "&F8&" "&G8&" | "&H8&" "&I8&" "&J8&" |
| "&B9&" "&C9&" "&D9&" | "&E9&" "&F9&" "&G9&" | "&H9&" "&I9&" "&J9&" |
| "&B10&" "&C10&" "&D10&" | "&E10&" "&F10&" "&G10&" | "&H10&" "&I10&" "&J10&" |
+-------+-------+-------+"


I'd recommend using Hoduko, it's easier.
Pupp
 
Posts: 246
Joined: 18 October 2019

Re: Copy / past diagrams

Postby mith » Fri Aug 28, 2020 4:46 pm

For posting individual grids, I use Hodoku or SE. But I have a bunch of grids in a spreadsheet to view and manipulate, so having it also spit out a grid for posting is natural.
mith
 
Posts: 950
Joined: 14 July 2020

Re: Copy / past diagrams

Postby Pupp » Fri Aug 28, 2020 5:15 pm

I got it, the "nice" diagrams come from SudoCue: You have to bracket the stuff with "code" button.
Code: Select all
9 . .|1 . .|. . 4
. . 8|. 9 .|. . .
. . .|. . 6|. 2 .
-----+-----+-----
. . 6|4 3 7|. . 1
. 9 .|6 . 8|. 3 .
3 . .|2 5 9|7 . .
-----+-----+-----
. 5 .|3 . .|. . .
. . .|. 2 .|3 . .
7 . .|. . 5|. . 9



Without using the "code" button:
9 . .|1 . .|. . 4
. . 8|. 9 .|. . .
. . .|. . 6|. 2 .
-----+-----+-----
. . 6|4 3 7|. . 1
. 9 .|6 . 8|. 3 .
3 . .|2 5 9|7 . .
-----+-----+-----
. 5 .|3 . .|. . .
. . .|. 2 .|3 . .
7 . .|. . 5|. . 9'

I think it looks way better with the code button. It uses a white background and it looks like a square and not a skinny rectangle.
Pupp
 
Posts: 246
Joined: 18 October 2019

Re: Copy / past diagrams

Postby Pupp » Fri Aug 28, 2020 5:17 pm

Perhaps this thread should be stickied.

I wanted to mention that the large triple diagram comes from Hodoku using the "copy for simplesudoku format"

Code: Select all
 *-----------*
 |..1|6.3|..4|
 |4..|...|...|
 |.73|.82|..1|
 |---+---+---|
 |64.|...|...|
 |..8|.9.|1..|
 |...|...|.76|
 |---+---+---|
 |1..|24.|35.|
 |...|...|..7|
 |5..|8.7|6..|
 *-----------*


 *-----------*
 |..1|6.3|..4|
 |4..|...|...|
 |.73|.82|..1|
 |---+---+---|
 |64.|...|...|
 |..8|.9.|1..|
 |...|...|.76|
 |---+---+---|
 |1..|24.|35.|
 |...|...|..7|
 |5..|8.7|6..|
 *-----------*


 *--------------------------------------------------------------------*
 | 289    2589   1      | 6      57     3      | 25789  289    4      |
 | 4      25689  2569   | 1579   157    159    | 25789  23689  23589  |
 | 9      7      3      | 459    8      2      | 59     69     1      |
 *----------------------+----------------------+----------------------|
 | 6      4      2579   | 1357   12357  158    | 2589   2389   23589  |
 | 237    235    8      | 3457   9      456    | 1      234    235    |
 | 239    12359  259    | 1345   1235   1458   | 24589  7      6      |
 *----------------------+----------------------+----------------------|
 | 1      689    679    | 2      4      69     | 3      5      89     |
 | 2389   23689  2469   | 1359   1356   1569   | 2489   12489  7      |
 | 5      239    249    | 8      13     7      | 6      1249   29     |
 *--------------------------------------------------------------------*
Pupp
 
Posts: 246
Joined: 18 October 2019

Re: Copy / past diagrams

Postby SpAce » Fri Aug 28, 2020 6:45 pm

Pupp wrote:I wanted to mention that the large triple diagram comes from Hodoku using the "copy for simplesudoku format"

Thanks! Looks like I never tried that option. Too bad the givens/values diagrams are so narrow. Better than nothing anyway.
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Copy / past diagrams

Postby SpAce » Fri Aug 28, 2020 11:36 pm

mith wrote:I use a monstrous excel formula, for whatever that's worth. :)

Interesting. I don't have Excel or much experience with spreadsheets anyway, which is why I was happily surprised that I got it to work in (Mac) Numbers without any tweaking. Is there a way to drop a puzzle string into that or do you fill it manually?
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Copy / past diagrams

Postby mith » Fri Aug 28, 2020 11:52 pm

Usually when I generate puzzles I output them minlex form; I'll copy the grid line from whatever source, manually break the line into 9 rows, and then do a simple regex in a text editor to insert tabs everywhere. (Replace '.' with '\0\t' with regular expressions on.) Then just copy directly into the spreadsheet - I have nicely formatted borders because it makes me happy.

Once it's in the spreadsheet tool of choice (I usually use Google Sheets, but occasionally LibreOffice Calc since I'm on linux - formulas are pretty compatible across the board), it's easy to manipulate the puzzle into whatever morph looks nicest. I have an empty scratch grid below to copy rows/columns to temporarily to swap things around. (Ctrl+Shift+V to paste without messing up the formatting.)

I like to solve problems in a spreadsheet when I can, even if a few lines of code might ultimately be faster; just fun for me. (In this case though, it makes it easier to visualize a set of puzzles vs. swapping between them in Hoduku/SE/whatever.)

My posted puzzles are in a tab here if anyone is interested in what that looks like.
Last edited by mith on Sat Aug 29, 2020 12:00 am, edited 1 time in total.
mith
 
Posts: 950
Joined: 14 July 2020

Re: Copy / past diagrams

Postby SpAce » Fri Aug 28, 2020 11:55 pm

Ok, thanks for the tips!
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Copy / past diagrams

Postby mith » Sat Aug 29, 2020 12:01 am

You're welcome. :) I added a link above if you want to see what it looks like.
mith
 
Posts: 950
Joined: 14 July 2020

Re: Copy / past diagrams

Postby SpAce » Sat Aug 29, 2020 12:10 am

mith wrote:You're welcome. :) I added a link above if you want to see what it looks like.

Looks nice! Thanks for that too!
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Next

Return to General