|
Main
Date: 17 Jan 2007 23:57:42
From: Dave (from the UK)
Subject: Save history on ICC to PGN file
|
Does anyone know how one can save a game in someone history on ICC to a PGN file by telnetting to the server, rather than using Blitzin? I can log in and see the history of user 'foo' (yes, there is a foo, but not a foobar!) aics% his foo Recent games of foo: Opponent Type ECO End Date 14: + 1170 W 1267 wohl [ bu 5 8] B20 Res Aug 19 05 16:55 13: + 1170 W 1373 WimpC [ bu 2 8] B50 Mat Feb 15 05 08:31 12: a 1170 B 1161 wohl [ bu 3 2] A00 Sho Aug 25 02 06:29 11: a 1170 B 1161 wohl [ bu 5 0] A00 Sho Aug 25 02 05:49 10: a 1170 B 1202 wohl [ br 5 0] B00 Sho Aug 12 02 07:08 9: a 1170 W 1202 wohl [ br 2 12] A00 Sho Aug 12 02 06:43 8: + 1170 B 1202 wohl [ bu 7 6] A00 Res Aug 09 02 10:48 7: - 1170 B 1223 WimpD [ br 2 8] B53 Fla Feb 09 02 21:31 6: + 1237 B 1072 WimpE [ br 2 8] B32 Mat Feb 09 02 21:27 5: - 1174 W 1059 WimpE [ br 2 8] C45 Res Feb 09 02 21:25 4: a 1343 W 1721 Simpleman [ bu 5 0] B01 Sho Feb 09 02 21:02 3: + 1343 W 1032 WimpE [ br 2 8] C45 Mat Jan 15 02 18:37 2: + 1293 B 1027 WimpE [ br 2 8] B54 Mat Jan 15 02 18:36 1: a 1152 W 1067 wohl [ bu 5 5] A00 Sho Jul 05 01 13:25 0: a 1152 W 1067 wohl [ bu 5 3] B20 Sho Jul 05 01 13:16 But can I save his Nth game to a pgn file on my disk? -- Dave (from the UK) Please note my email address changes periodically to avoid spam. It is always of the form: [email protected] Hitting reply will work for a few months only - later set it manually. http://chessdb.sourceforge.net/ - a Free open-source Chess Database
|
|
|
Date: 18 Jan 2007 12:01:51
From: David Richerby
Subject: Re: Save history on ICC to PGN file
|
Dave (from the UK) <[email protected] > wrote: > Does anyone know how one can save a game in someone history on ICC > to a PGN file by telnetting to the server, rather than using > Blitzin? There's nothing in the telnet program to write to local disc. If you're asking for the benefit of your updates to SCID, you could try `moves [username] [history number]' which (if ICC does this the same way as FICS) will give you a list of the moves, which your program can then parse and write to disc. Note that the game won't be given in PGN but, rather, as some non-PGN headers followed by a table giving the moves (in short algebraic notation) and the time each move took. It's trivial to parse this information and convert it to PGN. Dave. -- David Richerby Transparent Pants (TM): it's like a www.chiark.greenend.org.uk/~davidr/ well-tailored pair of trousers but you can see right through it!
|
| |
Date: 18 Jan 2007 13:08:33
From: Dave (from the UK)
Subject: Re: Save history on ICC to PGN file
|
David Richerby wrote: > Dave (from the UK) <[email protected]> wrote: > >>Does anyone know how one can save a game in someone history on ICC >>to a PGN file by telnetting to the server, rather than using >>Blitzin? > > > There's nothing in the telnet program to write to local disc. > Sorry, I guess I should have made that clear. I did know that, but was looking to parse them. It should not be too hard. > If you're asking for the benefit of your updates to SCID, I was looking to see it was possible to create a database of someone elses games on ICC, such as someone you might expect to play in a competition. Save them before they overwrite them in their history. Get to know their favorite openings etc. > you could > try `moves [username] [history number]' which (if ICC does this the > same way as FICS) will give you a list of the moves, which your > program can then parse and write to disc. That does not seem to work. aics% moves You can say "moves" while playing. You can say "moves" while examining a game. You may use "moves" if you follow it with a game number or player name. so: aics% moves foo 5 Too many parameters supplied to "moves Interesting you say this can be done on FICS, although to be honest, doing it on FICS is not my highest priority. -- Dave (from the UK) Please note my email address changes periodically to avoid spam. It is always of the form: [email protected] Hitting reply will work for a few months only - later set it manually. http://chessdb.sourceforge.net/ - a Free open-source Chess Database
|
| | |
Date: 18 Jan 2007 14:32:21
From: David Richerby
Subject: Re: Save history on ICC to PGN file
|
Dave (from the UK) <[email protected] > wrote: > David Richerby wrote: >> Dave (from the UK) <[email protected]> wrote: >>> Does anyone know how one can save a game in someone history on ICC >>> to a PGN file by telnetting to the server, rather than using >>> Blitzin? >> >> There's nothing in the telnet program to write to local disc. > > Sorry, I guess I should have made that clear. I did know that, but was > looking to parse them. I thought you'd probably know. :-) >> you could >> try `moves [username] [history number]' which (if ICC does this the >> same way as FICS) will give you a list of the moves, which your >> program can then parse and write to disc. > > That does not seem to work. A quick look at the help on ICC suggests that you need ``smoves playername gamenum''. Dave. -- David Richerby Hungry Devil Tool (TM): it's like a www.chiark.greenend.org.uk/~davidr/ screwdriver that's possessed by Satan but it'll eat you!
|
| | | |
Date: 18 Jan 2007 15:16:35
From: Dave (from the UK)
Subject: Re: Save history on ICC to PGN file
|
David Richerby wrote: > A quick look at the help on ICC suggests that you need ``smoves > playername gamenum''. > > > Dave. > Cheers, that does work. See example below. I suspect that 'expect' could be used to sort that out, although I've never used it before. If you have any thoughts on what would be the best way to do it, I'd be interested. Ideally it would be nice if it could be done on Windows too, but I'm sure it would be harder than on UNIX - as everything seems to be to me!!! aics% his dougmo Recent games of dougmo: Opponent Type ECO End Date 28: + 1207 W 1014 fue [ br 2 12] B23 Res Jan 18 07 09:31 27: - 1199 B 1137 rizocca [ br 10 0] C02 Fla Jan 18 07 09:11 26: - 1220 B 1097 Pasway [ br 3 12] C02 Res Jan 14 07 09:20 25: + 1243 W 1178 Arthos [ br 5 12] B12 Res Jan 14 07 09:10 24: + 1229 W 1196 gtserb [ br 5 12] B06 Res Jan 12 07 11:16 23: + 1576 W 1429 Txcash [ sr 30 10] B23 Mat Jan 10 07 11:03 22: - 1213 B 1089 pokerplayer [ br 5 12] E30 Res Jan 10 07 09:25 21: + 1236 W 1142 spoonyspence [ br 10 5] C55 Mat Jan 09 07 09:33 20: + 1223 B 1005 Carian [ br 2 12] C00 Fla Jan 08 07 09:15 19: + 1566 B 1456 alfrido [ sr 10 10] A40 Res Jan 04 07 10:28 18: + 1215 W 1078 evespanned [ br 10 0] C44 Mat Jan 02 07 20:08 17: + 1204 W 955 leapso [ br 5 12] B00 Res Dec 27 06 20:38 16: + 1197 B 1056 latonka [ br 4 12] A20 Mat Dec 23 06 13:16 15: + 1186 W 1074 peddler [ br 2 12] C11 Res Dec 22 06 10:29 14: + 1174 B 1023 fgray [ br 5 12] C00 Res Dec 20 06 11:40 13: + 1164 B 1010 iamthewalrus [ br 9 0] C02 Res Dec 20 06 06:30 12: + 1554 W 1355 BLAHOG604 [ sr 15 0] B23 Res Dec 19 06 10:10 11: + 1546 B 1418 pauldavid [ sr 10 20] C01 Fla Dec 18 06 11:58 10: + 1154 W 1029 WEBSTERATTAC [ br 5 12] C47 Res Dec 18 06 08:57 9: + 1143 B 1072 Pasway [ br 3 12] C02 Res Dec 16 06 13:16 aics% smoves dougmo 28 dougmo (1207) vs. fue (1014) --- 2007.01.18 09:31:36 Rated Blitz match, initial time: 2 minutes, increment: 12 seconds Move dougmo fue ---- ---------------- ---------------- 1. e4 (0:03) c5 (0:02) 2. Nc3 (0:02) e5 (0:02) 3. Bc4 (0:26) Nc6 (0:04) 4. Nf3 (0:06) h6 (0:02) 5. d3 (0:14) d6 (0:01) 6. O-O (0:07) a6 (0:02) 7. a4 (0:13) Bg4 (0:06) 8. h3 (0:18) Bh5 (0:01) 9. g4 (0:11) Bg6 (0:03) 10. Be3 (0:10) Be7 (0:08) 11. Qd2 (0:11) Qd7 (0:03) 12. Nd5 (0:10) Nf6 (0:05) 13. Nb6 (0:04) Qd8 (0:10) 14. Nxa8 (0:03) Qxa8 (0:02) 15. c3 (0:39) Qc8 (0:03) 16. Nh2 (0:26) h5 (0:02) 17. g5 (0:15) Nh7 (0:11) 18. Kg2 (0:27) Bxg5 (0:03) 19. Bxg5 (0:11) Ne7 (0:14) 20. Bxe7 (0:09) Kxe7 (0:03) 21. f4 (0:21) exf4 (0:15) 22. Qxf4 (0:04) Nf6 (0:08) 23. Rf3 (0:21) Qc7 (0:07) 24. Raf1 (0:16) Qb6 (0:05) 25. Qd2 (0:08) Rh6 (0:07) 26. R3f2 (0:23) Qc7 (1:22) 27. Nf3 (0:10) Qd7 (0:05) 28. Ng5 (0:08) Bh7 (0:15) 29. Nxh7 (0:12) Rg6+ (0:04) 30. Kh2 (0:24) Nxh7 (0:05) 31. Rxf7+ (0:09) {Black resigns} 1-0 -- Dave (from the UK) Please note my email address changes periodically to avoid spam. It is always of the form: [email protected] Hitting reply will work for a few months only - later set it manually. http://chessdb.sourceforge.net/ - a Free open-source Chess Database
|
| | | | |
Date: 18 Jan 2007 16:25:53
From: David Richerby
Subject: Re: Save history on ICC to PGN file
|
Dave (from the UK) <[email protected] > wrote: > David Richerby wrote: >> A quick look at the help on ICC suggests that you need ``smoves >> playername gamenum''. > > Cheers, that does work. See example below. OK -- apart from the slightly different command, that's exactly the same as what FICS does. > I suspect that 'expect' could be used to sort that out, although > I've never used it before. If you have any thoughts on what would be > the best way to do it, I'd be interested. I'd use expect to extract the data from ICC and perl to parse it to PGN. I've not used expect for nearly ten years but ISTR it was pretty straightforward to do that kind of thing. There's an O'Reilly book; perhaps you have access to their online editions? http://www.oreilly.com/catalog/expect/ I've written a Perl script to translate from FICS/ICC format to PGN. I can probably dig that out for you if it would be useful. > ideally it would be nice if it could be done on Windows too, but I'm > sure it would be harder than on UNIX - as everything seems to be to > me!!! I believe there's a Windows port of expect. For everything else, there's Maste^H^H^H^H^HCygwin. Dave. -- David Richerby Adult Tree (TM): it's like a tree that www.chiark.greenend.org.uk/~davidr/ you won't want the children to see!
|
| | | | | |
Date: 18 Jan 2007 18:14:43
From: Dave (from the UK)
Subject: Re: Save history on ICC to PGN file
|
David Richerby wrote: > Dave (from the UK) <[email protected]> wrote: > >>David Richerby wrote: >> >>>A quick look at the help on ICC suggests that you need ``smoves >>>playername gamenum''. >> >>Cheers, that does work. See example below. > > > OK -- apart from the slightly different command, that's exactly the > same as what FICS does. > > OK. Interesting if I did do this, sounds like it would work for ICC and FICS with too many changes. >>I suspect that 'expect' could be used to sort that out, although >>I've never used it before. If you have any thoughts on what would be >>the best way to do it, I'd be interested. > > > I'd use expect to extract the data from ICC and perl to parse it to > PGN. I've not used expect for nearly ten years but ISTR it was pretty > straightforward to do that kind of thing. There's an O'Reilly book; > perhaps you have access to their online editions? > http://www.oreilly.com/catalog/expect/ I'll have to play with expcet a bit. I guessed it was the right tool. > I've written a Perl script to translate from FICS/ICC format to PGN. > I can probably dig that out for you if it would be useful. I would be interested in that. > >>ideally it would be nice if it could be done on Windows too, but I'm >>sure it would be harder than on UNIX - as everything seems to be to >>me!!! > > > I believe there's a Windows port of expect. For everything else, > there's Maste^H^H^H^H^HCygwin. I'd have to look at that. I'd rather avoid having dependances on expect and perl, as these are not typical on windows sysatems. But it might be a lot of work any other way - i.e wriing it all in C. > > Dave. > -- Dave (from the UK) Please note my email address changes periodically to avoid spam. It is always of the form: [email protected] Hitting reply will work for a few months only - later set it manually. http://chessdb.sourceforge.net/ - a Free open-source Chess Database
|
|