fgardt/factorio-scanner

Command line COMMAND does not recognize a blueprint string as a valid COMMAND

Closed this issue · 2 comments

I'm trying to render a blueprint. The help lists the following three COMMAND arguments: string, file, help. When providing a blueprint, it exits with: error: unrecognized subcommand

PS C:\Games\Factorio (Scanner)> .\scanner.exe --factorio .\Factorio_1.1.104\ render
Render a blueprint string                                                                                                                                                                                                                                                                                                       Usage: scanner.exe --factorio <FACTORIO> render [OPTIONS] --out <OUT> <COMMAND>                                                                                 
Commands:
  string
  file
  help    Print this message or the help of the given subcommand(s)

Options:
      --prototype-dump <PROTOTYPE_DUMP>
          Path to the data dump json file. If not set, the data will be dumped automatically
      --preset <PRESET>
          Preset to use [possible values: K2, SE, K2SE, IR3, PyAE, FF, FFK2, Nullius, SeaBlock, EI, Ultracube]
      --mods <MODS>
          List of additional mods to use
  -o, --out <OUT>
          Path to the output file
      --res <TARGET_RES>
          Target resolution (1 side of a square) in pixels [default: 2048]
      --min-scale <MIN_SCALE>
          Minimum scale to use (below 0.5 makes not much sense, vanilla HR mode is 0.5) [default: 0.5]
  -h, --help
          Print help
PS C:\Games\Factorio (Scanner)> .\scanner.exe --factorio .\Factorio_1.1.104 render --out bp.png "0eNq9llGOmzAQhu9iqU+F1YZAsuEqVYUMTJKRwEa2SYtWHKC36Nl6ks5AkiUJ2YWs2pdIDp7P4/+fGXgVaVFDZVA5Eb8Kq2TlO+3vDOa8/initScaEUetJ2RqdVE78HlXhWonYmdq8ARmWlkRf6N43ClZcKRrKhCxQAel8ISSJa+kQbcvwWHmZ7pMUUmnjSA0qhzorEXrfcjIIcMczDggaL97ApRDh9Bn1C2aRNVlCoZOOHM4ZyeVG4I8UWlLsVodLx88Rd31n59YgBwNZP3TwGOAM7pIUtjLA1I0hWyxcGDuaHFA42r655xCv4PEhobvkOmaXVgM5KDboE34wK0sLHSblOqTsIxe8A8BQA1vy+YtaS+arEbXLYnVtizvlSDBPEGej4IE14KEDwhyaSwUxDJacXH0iQ9ECWbViMwPUmWQvwsKJoCQ8v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3SZoCLMaWI/3EjBu/5E0/yJ5nZdb1F4bdHq33bdqXuOXXdh1LCjvv6PjgqndlA0x7DbMTmN2jvL3wE8w+PB55onDvRm7TvoZRGuN8H6JdwsV5tV2/4FfVVczg=='

Usage: scanner.exe --factorio <FACTORIO> render [OPTIONS] --out <OUT> <COMMAND>

For more information, try '--help'.

The correct usage would be

.\scanner.exe --factorio .\Factorio_1.1.104 render --out bp.png string <BP_STRING>

It does not automatically figure out if its a file or a string which is why you need to specify the command to use.

also note that the usage might change a bit soon since I'll extract the whole server rendering stuff into its own thing to reduce complexity and have this just be a cli tool

Oh, right :) Thank you.