Change pgn header command line option?

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Change pgn header command line option?

Postby Richard Allbert » 31 Jul 2008, 21:53

Is there a way to define the saved pgn event header as a command line option? I see it in the .ini file, I was wondering if it was an option.. it's not in the FAQ

Thanks

Richard
Richard Allbert
 
Posts: 105
Joined: 27 Sep 2004, 11:56
Location: Aschaffenburg, Germany

Re: Change pgn header command line option?

Postby Marc Lacrosse » 01 Aug 2008, 00:55

Every parameter that you may include in the winboard.ini file is supposedly prone to be modified from the command line (command line parameters have priority over winboard.ini).
Regarding /pgnEventHeader="Computer Chess Game", it is one of those parameters that have been introduced by A Scotti in his winboardX enhanced version of winboard (and that's why it is not described in winboard.hlp or in the FAQ).
I did not check for this one, but i suppose that it will follow the same rule as any other wb parameter.

Marc
Marc Lacrosse
 
Posts: 116
Joined: 29 Jan 2005, 09:04
Location: Belgium

Re: Change pgn header command line option?

Postby Richard Allbert » 01 Aug 2008, 07:44

Hi Marc,

I tried that yesterday evening, and it didn't work.

tried again today after reading your reply, and of course, it did :). I should learn to type... :)

Thanks!

/pgnEventHeader="Whatever you want"
Richard Allbert
 
Posts: 105
Joined: 27 Sep 2004, 11:56
Location: Aschaffenburg, Germany

Re: Change pgn header command line option?

Postby H.G.Muller » 01 Aug 2008, 17:10

WinBoard uses exactly the same routine to process the command line as it does to process the winboard.ini file. So any option that works in obnne case, also works in the other. But it processes the command-line options after the winboard.ini.

As it is not considered a mistake to set the same option twice (or more times), even to different values, that means that comment-line arguments prevail over the winboard.ini content. And as we usually save the options that are in force when we exit WinBoard, this means that most options, once used on the command line, will from then on be recorded in the winboard.ini. (Not all; some options are not saved, and they disappear all the time from the winboard.ini, even if they were there before, unless you suppress the saving-on-exit alltogether.)

Now I added yet another level to that, namely options that are on the engine command-line. They again are processed by the same routine. So in order of processing, WinBoard uses as option value:

1) the programmed default value
2) the options in winboard.ini
3) the options on the command line
4) the winboard options on the engine startup command line

As the value last seen is the one that sticks, the priotrity increases from 1 to 4. In practice the programmed default values are used only if there is no winboard.ini, and ensure the winboard.ini you make after the first run contains sensible values. Except for options that are not saved (like /variant=...), they usually use the default.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Change pgn header command line option?

Postby Richard Allbert » 03 Aug 2008, 21:14

Thanks for the answer... and for the development!

:D
Richard Allbert
 
Posts: 105
Joined: 27 Sep 2004, 11:56
Location: Aschaffenburg, Germany


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 30 guests