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
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
Originally posted by RolandYoungI thought gregoftheweb did the code, but I guess you did?
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
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
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-
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 😕]