PDA

View Full Version : Chessbase - adding games from Chesslab



Davidflude
20-04-2005, 12:46 PM
This is based on a previous posting on the wrong hread

I have a wee hassle with using Chesslab

I download all the games OK either as HTML or text but am having trouble
converting the output to PGN that Chessbase can read. Can anybody help?

I get a PGN file but Chessbase is totally confused.

Can anyone help?

arosar
20-04-2005, 01:08 PM
This is based on a previous posting on the wrong hread

I have a wee hassle with using Chesslab

I download all the games OK either as HTML or text but am having trouble
converting the output to PGN that Chessbase can read. Can anybody help?

I get a PGN file but Chessbase is totally confused.

Can anyone help?

Can't you just change the .txt extension to .pgn? That's all I do.

AR

Davidflude
20-04-2005, 03:56 PM
I have made some progress in resolving the problem.

1) I made a shiny new database in PGN format in Chessbase.

2) I downloaded from Chesslab and pasted to my PGN file using any of several
word processing programs.

3) The problem I am having with Chessbase relates to the way Chesslab creates PGN files.

It puts spaces between header items instead of carriage returns which Chessbase expects.

Now if I can get a macro to replace ]space[ with ]carriagereturn[ i can fix the problem in seconds. Microsoft Word 6 had a very edffective programming
language for writing macros. Of course Microsoft junked this when they produced Office.

The free office woird processing program has a macro writing procedure. However I need to buy a book to tell me how to do the more sophisticated edits.

Otherwise I am going to have to replace 500 instances of the pattern manually.

Rincewind
20-04-2005, 04:57 PM
Would a functional text editor like WinEdt or Syn make that task easier?

Sounds like you just want to to a global search and replace of

] [

with

]\r\n[

In fact I think this might even be possible to do multiline find/replaces if you cut the multiline component and paste into the replace field. The carriage return will be rendered as an impenetrable black box.

IE. Cut out

]
[

and paste that in the notepad/wordpad replace field.

Spiny Norman
20-04-2005, 07:04 PM
Would a functional text editor like WinEdt or Syn make that task easier?

I had a quick look @ Programmer's File Editor. I don't think it'll do what you need .... but yesterday I was chatting to a guy about 'vim' which is an implementation of the Unix 'vi' editor on Windows. I think the website is:

www.vim.org

It supports use of REGEXs. There is a pretty good FAQ at:

http://vimdoc.sourceforge.net/vimfaq.html

Rincewind
20-04-2005, 07:10 PM
I had a quick look @ Programmer's File Editor. I don't think it'll do what you need .... but yesterday I was chatting to a guy about 'vim' which is an implementation of the Unix 'vi' editor on Windows. I think the website is:

www.vim.org

It supports use of REGEXs. There is a pretty good FAQ at:

http://vimdoc.sourceforge.net/vimfaq.html

Don't get me wrong I use vi a lot through vt100 emulations and have much respect for regular expressions and those that have the knack of manipulating them. However, it isn;t what I'd recommend for a windows users. Emacs ports are about as sadistic as I get. :)

Davidflude
21-04-2005, 04:31 PM
First thanks to Frosty and Rincewind. I shall outline what caused the problem and how I solved it.

Chesslab outputs data into a box on your web page. It puts carriage returns at
the end of lines on the screen but not after each header item.

I downloaded an editor called Textpad.

Fixing the problem - I iuse curly brackets to surround edit items. Do not use
curley brackets in your edit.

1) I replaced all carriage returns {\n} with {^} Ignore how the file shows on screen

2) I replaced {] [} with {[@]}

3) I replaced { [Event} with {@[Event}

4) I replaced {] 1.} with { ]@1.}

5. I replaced {@} with {\n}

6. I deleted all ^ using my Word Processing program

At this stage the only remaining problem is that Chesslab often puts the Black
Players name after the white players name in the white player header.

However when I added the chess lab games to my existing file and removed duplicates most of the bodgie Chesslab games turned out to be duplicates that were flagged for deletion. It is a small task to clean up the remaining games. All in all I downloaded about 300 games of which 100 were ones that
were new to me.