en cs

Nochetopgn command line options

This page describes nochetopgn command line options.

Help

Use --help to show command line options help.

$ nochetopgn --help
nochetopgn 3.1.0 Author: Petr Bilek
USAGE: nochetopgn [-h|--help]  [-o|--owner] [-d|--debug] [--pgn |--json |--json-full|--jtree|--jtree-full|--counter]
	--help      - show this help
	--owner     - show owner information
	--pgn       - output as PGN file
	--json      - output every game as one json; games are separated by "\t   \t\n"
	--json-full - output all games as one json
	--jtree     - as json, but moves are in a tree structure
	--jtree-full - as json-full, but moves are in a tree structure
	--counter   - output number of games

        
$ nochetopgn --help
nochetopgn 2.7.1 Author: Petr Bilek
USAGE: nochetopgn [-h|--help]  [-o|--owner] [-d|--debug] [--pgn |--json |--json-full|--counter]
	--help      - show this help
	--owner     - show owner information
	--pgn       - output as PGN file
	--json      - output every game as one json; games are separated by "\t   \t\n"
	--json-full - output all games as one json
	--counter   - output number of games

        

PGN output

Use --pgn to convert the standard input in the PGN format to the PGN format.
This can be used to test the validity of an PGN input.

Output example

[Event ""]
[Date "2025.02.10"]
[Round "-"]
[White "?"]
[Black "?"]
[Result "*"]
[CreatedBy "Nocheto (Noidea Chess Tool) 3.1.0"]
[NochetoTreeNumber "3.0x5"]

1.e4 e5 2.Nf3 Nc6 3.Bb5 { Ruy Lopez } 3...a6 4.Ba4 ! ( 4.Bxc6 bxc6 ) b5 5.Bb3 Bb7 ( 5...Be7 6.O-O Nf6 ) *

JSON output

Use --json to convert the standard input in the PGN format to the JSON format, where every game is printed as a separate JSON object. These are separated by a \t   \t\n string (where \t represents a tabulator and \n a new line).

Output example

{
"tags" : {
        "Event" : "", 
        "Date" : "2025.02.10", 
        "Round" : "-", 
        "White" : "?", 
        "Black" : "?", 
        "Result" : "*", 
        "CreatedBy" : "Nocheto (Noidea Chess Tool) 3.1.0", 
        "NochetoTreeNumber" : "3.0x5"
 },
"result": "*", 
 "moves" : [ 
        { "move" : "e4", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "e5", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Nf3", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Nc6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Bb5", "nags" : [], "cb" : "", "ca" : " Ruy Lopez ", "alternatives": []}, 
        { "move" : "a6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Ba4", "nags" : ["!"], "cb" : "", "ca" : "", "alternatives": [
         { 
         "moves" : [ 
                { "move" : "Bxc6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
                { "move" : "bxc6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}
         ]
         }
        ]
        }, 
        { "move" : "b5", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Bb3", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Bb7", "nags" : [], "cb" : "", "ca" : "", "alternatives": [
         { 
         "moves" : [ 
                { "move" : "Be7", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
                { "move" : "O-O", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
                { "move" : "Nf6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}
         ]
         }
        ]
        }
 ]
}

json-full option

Use --json-full to output all games as a part of one JSON object (array).

Output example

[
{
"tags" : {
        "Event" : "", 
        "Date" : "2025.02.10", 
        "Round" : "-", 
        "White" : "?", 
        "Black" : "?", 
        "Result" : "*", 
        "CreatedBy" : "Nocheto (Noidea Chess Tool) 3.1.0", 
        "NochetoTreeNumber" : "3.0x5"
 },
"result": "*", 
 "moves" : [ 
        { "move" : "e4", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "e5", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Nf3", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Nc6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Bb5", "nags" : [], "cb" : "", "ca" : " Ruy Lopez ", "alternatives": []}, 
        { "move" : "a6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Ba4", "nags" : ["!"], "cb" : "", "ca" : "", "alternatives": [
         { 
         "moves" : [ 
                { "move" : "Bxc6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
                { "move" : "bxc6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}
         ]
         }
        ]
        }, 
        { "move" : "b5", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Bb3", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
        { "move" : "Bb7", "nags" : [], "cb" : "", "ca" : "", "alternatives": [
         { 
         "moves" : [ 
                { "move" : "Be7", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
                { "move" : "O-O", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}, 
                { "move" : "Nf6", "nags" : [], "cb" : "", "ca" : "", "alternatives": []}
         ]
         }
        ]
        }
 ]
}
]

jtree3.0.0 option

Use --jtree to convert standard input in PGN format to JSON format, where every game is printed as a separate JSON object. These are separated by a \t   \t\n string (where \t represents a tabulator and \n a new line).

This option prints the same JSON format as the printjtree command in nocheto.

Output example

{
"tags" : {
        "Event" : "", 
        "Date" : "2025.02.10", 
        "Round" : "-", 
        "White" : "?", 
        "Black" : "?", 
        "Result" : "*", 
        "CreatedBy" : "Nocheto (Noidea Chess Tool) 3.1.0", 
        "NochetoTreeNumber" : "3.0x5"
 },
"result": "*", 
"moves" : [
 { "move" : "e4", "nags" : "", "cb" : "", "ca" : "", "moves" : [
  { "move" : "e5", "nags" : "", "cb" : "", "ca" : "", "moves" : [
   { "move" : "Nf3", "nags" : "", "cb" : "", "ca" : "", "moves" : [
    { "move" : "Nc6", "nags" : "", "cb" : "", "ca" : "", "moves" : [
     { "move" : "Bb5", "nags" : "", "cb" : "", "ca" : " Ruy Lopez ", "moves" : [
      { "move" : "a6", "nags" : "", "cb" : "", "ca" : "", "moves" : [
       { "move" : "Ba4", "nags" : "!", "cb" : "", "ca" : "", "moves" : [
        { "move" : "b5", "nags" : "", "cb" : "", "ca" : "", "moves" : [
         { "move" : "Bb3", "nags" : "", "cb" : "", "ca" : "", "moves" : [
          { "move" : "Bb7", "nags" : "", "cb" : "", "ca" : "", "moves" : [
          ]},
          { "move" : "Be7", "nags" : "", "cb" : "", "ca" : "", "moves" : [
           { "move" : "O-O", "nags" : "", "cb" : "", "ca" : "", "moves" : [
            { "move" : "Nf6", "nags" : "", "cb" : "", "ca" : "", "moves" : [
            ]}
           ]}
          ]}
         ]}
        ]}
       ]},
       { "move" : "Bxc6", "nags" : "", "cb" : "", "ca" : "", "moves" : [
        { "move" : "bxc6", "nags" : "", "cb" : "", "ca" : "", "moves" : [
        ]}
       ]}
      ]}
     ]}
    ]}
   ]}
  ]}
 ]}
]
}

jtree-full3.0.0 option

Use --jtree-full to output all games with the same format as with the -jtree option, but in one JSON object (array).

Counter

Use --counter to count games in a PGN file.

Output example

1
res = 0; c = 1

The res should be always 0 (unless a parse error occures). The numbers on the first line and after the c letter are the same - it is the amount of the games.

Owner2.1.0

Use --owner to show owners credentials.