3

Is it possible to import a game into XBoard from the command line? I am unable to find anything on it on the XBoard website or the XBoard man page, although I may have missed something.

1
  • 1
    At least for me on Linux simply xboard game.pgn does it. Is this not what you want?
    – Ian Bush
    Commented Jan 20, 2022 at 16:26

1 Answer 1

3

The manual seems to suggest you can use -lgf followed by the name of a PGN file:

4.5 Load and Save options
=========================

-lgf or -loadGameFile file
-lgi or -loadGameIndex index
     If the `loadGameFile' option is set, XBoard loads the specified
     game file at startup. The file name `-' specifies the standard
     input. If there is more than one game in the file, XBoard pops up
     a menu of the available games, with entries based on their PGN
     (Portable Game Notation) tags.  If the `loadGameIndex' option is
     set to `N', the menu is suppressed and the N th game found in the
     file is loaded immediately.  The menu is also suppressed if
     `matchMode' is enabled or if the game file is a pipe; in these
     cases the first game in the file is loaded immediately.  Use the
     `pxboard' shell script provided with XBoard if you want to pipe in
     files containing multiple games and still see the menu.  If the
     loadGameIndex specifies an index -1, this triggers auto-increment
     of the index in `matchMode', which means that after every game the
     index is incremented by one, causing each game of the match to be
     played from the next game in the file. Similarly, specifying an
     index value of -2 causes the index to be incremented every two
     games, so that each game in the file is used twice (with reversed
     colors).  The `rewindIndex' option causes the index to be reset to
     the first game of the file when it has reached a specified value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.