Go back
PGN Cleaner Tool

PGN Cleaner Tool

Help

g
The Great Gonzo

Seattle

Joined
20 Jun 03
Moves
6115
Clock
11 Feb 04
Vote Up
Vote Down

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

h

e2

Joined
29 Jun 03
Moves
3535
Clock
11 Feb 04
Vote Up
Vote Down

Excellent. Thank you!

R

London

Joined
05 Mar 03
Moves
6047
Clock
11 Feb 04
Vote Up
Vote Down

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

P
Mystic Meg

tinyurl.com/3sbbwd4

Joined
27 Mar 03
Moves
17242
Clock
11 Feb 04
Vote Up
Vote Down

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

piderman

Zeist, Holland

Joined
11 Sep 03
Moves
19384
Clock
11 Feb 04
Vote Up
Vote Down

Nope, it don't work with me either. Same 'error on page'. I suggest Roland go and debug his JavaScript!

g
The Great Gonzo

Seattle

Joined
20 Jun 03
Moves
6115
Clock
11 Feb 04
Vote Up
Vote Down

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?

P
Mystic Meg

tinyurl.com/3sbbwd4

Joined
27 Mar 03
Moves
17242
Clock
11 Feb 04
1 edit
Vote Up
Vote Down

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-

R

London

Joined
05 Mar 03
Moves
6047
Clock
11 Feb 04
1 edit
Vote Up
Vote Down

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 😕]

g
The Great Gonzo

Seattle

Joined
20 Jun 03
Moves
6115
Clock
12 Feb 04
Vote Up
Vote Down

Thanks Roland, I have posted the latest version. Go test please.

g

P
Mystic Meg

tinyurl.com/3sbbwd4

Joined
27 Mar 03
Moves
17242
Clock
12 Feb 04
1 edit
Vote Up
Vote Down

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.

t
Xebite

in front of you

Joined
06 Jan 03
Moves
17464
Clock
16 Feb 04
Vote Up
Vote Down

There were big changes on RHP-pgn, read more at
http://www.redhotpawn.com/board/showthread.php?id=8867
th

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.