• Resolved teodorcat

    (@teodorcat)


    When PGN is downloaded (using link in metadata) it is saved with its tags and solution written in one line.
    That’s why such chessprograns as Chessbase or Fritz don’t open it.
    How to make PGN tags be saved in columns:
    [Event “World Cup”]
    [Data “2021”]
    [Site “?”]
    and so on.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi teodorcat,
    Sorry for the slow reply.

    There is a commit now in gitlab that should take care of this.
    https://gitlab.com/toomanybicycles/chessgame-shizzle/-/commit/67b66a3b9bbfe449f49c81fa5081debdc25a3ff6
    I don’t have Chessbase or Fritz. Is it possible for you to test this?

    Thread Starter teodorcat

    (@teodorcat)

    Thank you. Now it works. Please, insert an empty line between the head of the PGN and the solution.

    When I click on the link ‘Download PGN file’ it downloads the game. But when I click on the same link with the right button to choose “Save as …” it downloads the source code of the page, not the game.

    Plugin Author Marcel Pol

    (@mpol)

    Okay, good to hear.

    What exactly do you mean with “Please, insert an empty line between the head of the PGN and the solution.”?
    Should the PGN have an empty line at the top, is that what you mean? Or should the first move be on a new line?

    The “Save as” link uses JavaScript to generate a text file. There is no real file and no right-click action.
    I can imagine changing the text to ‘Download PGN data to a file’ would communicate this better. Or maybe it should be a button, not a text link, to communicate it is an action.

    Thread Starter teodorcat

    (@teodorcat)

    Between PGN tags and the 1st move it’s normal to have an empty line. Like this

    [Event “World Cup”]
    [Data “2021”]
    [PlyCount “30”]

    1. d4 d5 2. Nf3
    1-0

    I understood about the link. I’ll make it a button. Thanks.

    Thread Starter teodorcat

    (@teodorcat)

    Marcel, thank you for an extra space between meta data and moves. Successfully tested. All chess programs on my computer open this PGN.

    To download the game as PGN I changed the file extension in cs-content-filters.php (line 205) to .pgn instead of .txt

    Plugin Author Marcel Pol

    (@mpol)

    You’re welcome ??
    I don’t know why it is .txt.
    It is now changed to .pgn.

    I remember from an earlier time that it didn’t work with the .txt extension, but maybe that was during development when things were not complete yet.

    I will change the download link to a button. The same thing for generating an image. It won’t be today.

    Plugin Author Marcel Pol

    (@mpol)

    The downoad link is now a button.

    There was a reason the newlines lingered on a bit.
    There is a regular expression that changes ] 1 to ]\n\n1. But I don’t know if all games start with move 1. Do you have moves in your database that start at a different move than 1, would you happen to know?
    If not, I will push it as an update I think.

    Thread Starter teodorcat

    (@teodorcat)

    All games in my database start with move 1. So, everything is fine for me. Thank you.

    Plugin Author Marcel Pol

    (@mpol)

    Thank you, that is good to hear ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PGN tags in column’ is closed to new replies.