Please turn on javascript in your browser to play chess.
Help Forum

Help Forum

  1. Standard member gregoftheweb
    The Great Gonzo
    11 Feb '04 00:26
    http://www7.brinkster.com/obyrne/rhp_pgn_fixer.htm

    Thanks to RolandYoung for the regex script to clean the PGN output from RHP for use in some chess programs. All I had to do was put a couple of links on the page. My kind of work, get someone else to do the hard stuff. 😀

    I also linked it up to the other little tools I created. If anyone else has any other ideas about tools they would like built please let me know and we'll see what I can do.

    g
  2. 11 Feb '04 07:19
    Excellent. Thank you!
  3. 11 Feb '04 13:21
    The PGN cleaner tool that Greg has been kind enough to host can only process one game at a time. If anyone has a need to clean up a batch of games in RHP's PGN format, they may be interested in a Perl script that can do the job.

    If you would like the script, please send me a personal message including an email address. If there is sufficient interest, I might go on to write something that could do one or more of the following:

    1. Tell you how many days ago the newest of the games in the batch ended, so that you can enter that number in the "send PGN email" form.
    2. Parse a dump of the "My archives" page to work out any game or tournament names associated with game ids and use these to supply better text for the "Event" and "Round" tags.

    cheers

    Roland
  4. Standard member Phlabibit
    Mystic Meg
    11 Feb '04 14:23
    Originally posted by RolandYoung
    The PGN cleaner tool that Greg has been kind enough to host can only process one game at a time. If anyone has a need to clean up a batch of games in RHP's PGN format, they may be interested in a Perl script that can do the job.

    If you would like the script, please send me a personal message including an email address. If there is sufficient interest ...[text shortened]... ds and use these to supply better text for the "Event" and "Round" tags.

    cheers

    Roland
    I thought gregoftheweb did the code, but I guess you did?

    Why won't this page work for me? I get an error, and nothing has ever showed up in the PGN output box.

    error on page... done

    Help!?

    P-

    [Site "Red Hot Pawn"]
    [EventId "389313"]
    [GameId "389313"]
    [White "Phlabibit"]
    [Black "chaswray"]
    [Result "*"]

    1. c4 ... Ng8f6 2. e3 ... e6 3. Nb1c3 ... Bf8b4
    4. Qd1c2 ... o-o 5. Ng1f3 ... Nb8c6 6. Bf1e2 ... a6
    7. o-o ... b5 8. cxb5 ... axb5
  5. 11 Feb '04 18:44
    Nope, it don't work with me either. Same 'error on page'. I suggest Roland go and debug his JavaScript!
  6. Standard member gregoftheweb
    The Great Gonzo
    11 Feb '04 19:09
    hmmm. Let's get some questions answered for Roland.

    Where did you guys pull those PGN strings from?

    Is there more than one place and one routine that returns PGN strings to users at RHP?
  7. Standard member Phlabibit
    Mystic Meg
    11 Feb '04 21:01 / 1 edit
    I went to game info and got pgn direct... didn't work.

    I went to game, history, PGN and that didn't work either!

    can you paste the pgn I used and get a return from it? I don't think it is a problem with the PGN text, but just wondering.

    I use XP... Security's up.... Cookies blocked (but I didn't see any)

    I even went to my Archives to try another PGN and No Go!

    P-

  8. 11 Feb '04 23:09 / 1 edit
    OK, what happened is I wrote a Perl script first and tested it on the text you get if you ask for an email of your games. I then converted the Perl to Javascript and tested it on a couple of my sample games.

    What I didn't do was
    1) test it on the "get PGN of this game" text 😳
    2) test the Javascript version on game text that doesn't have move times 😳😳

    I've found several bugs that only show up on test (1) and I'm stuck on a bug that affects test (2). The problem is that Javascript is not my normal programming language and I'm not used to its approach to error handling.

    Please bear with me on this one.

    [Edit: I've mailed a fixed version to Greg; it should work a lot better 😕]
  9. Standard member gregoftheweb
    The Great Gonzo
    12 Feb '04 00:32
    Thanks Roland, I have posted the latest version. Go test please.

    g
  10. Standard member Phlabibit
    Mystic Meg
    12 Feb '04 03:29 / 1 edit
    Originally posted by gregoftheweb
    Thanks Roland, I have posted the latest version. Go test please.

    g
    Will go test now!

    Edit! Works just fine now. Crisp clean PGN in a pastable form. I shoved it into CM9K and it worked fine.

  11. Standard member thire
    Xebite
    16 Feb '04 08:42
    There were big changes on RHP-pgn, read more at
    http://www.redhotpawn.com/board/showthread.php?id=8867
    th