Skip to content
Stefano Balietti edited this page Oct 22, 2021 · 9 revisions

Export

This is a preview of a feature that will be available in v7.

Command-line

Executable is nodegame-vX/bin/nodegame (same file to create a new game).

  • export-data: Exports data from a game.
Usage: nodegame export-data [options] <game>

Options:
      --games-dir <dir>               log directory (default log)
      --export-dir <dir>              export directory (default export)
      --create-export-sub-dir         create sub-directory inside export directory
  -r, --recursive                     recursively search for files
      --files <files>                 comma separated list of files/patterns
      --files-add <files>             comma separated list of files/patterns to add to defaults
      --out-format <format>           the export format (json,ndjson,csv)
      --in-format <format>            the import format (json,ndjson,csv)
      --on-duplicated-names <action>  action to take if a file with same name exists in export directory (rename|append|err)
  -t, --throw                         throws errors (default continues to next file)
      --rooms <rooms>                 room/s to export
      --from-room <room>              export from room (included)
      --to-room <room>                export up to room (included)
      --out-csv-flatten [group]       merges all items [by group] before export
      --out-csv-header <header>       header for export csv files (comma separeted values)
      --out-csv-no-header             no header in export csv files
      --out-csv-obj-level <level>     level of nested objects to expand before export
      --in-csv-header <header>        header for import csv files (comma separeted values)
      --in-csv-no-header              no header in import csv files
  -v, --verbose                       verbose output
  -h, --help                          display help for command
  • export-logs: Exports logs from nodeGame server
Usage: nodegame export-logs [options]

Exports logs from nodeGame server

Options:
      --games-dir <dir>               log directory (default log)
      --export-dir <dir>              export directory (default export)
      --create-export-sub-dir         create sub-directory inside export directory
  -r, --recursive                     recursively search for files
      --files <files>                 comma separated list of files/patterns
      --files-add <files>             comma separated list of files/patterns to add to defaults
      --out-format <format>           the export format (json,ndjson,csv)
      --in-format <format>            the import format (json,ndjson,csv)
      --on-duplicated-names <action>  action to take if a file with same name exists in export directory (rename|append|err)
  -t, --throw                         throws errors (default continues to next file)
      --game <game>                   export logs only for this game
      --set-msg-only                  exports only "set" messages (e.g., "done" msgs)
      --clean-up                      cleanup logs before export
      --msg-type <type>               messages to export (incoming|outgoing|all)
      --out-csv-flatten [group]       merges all items [by group] before export
      --out-csv-header <header>       header for export csv files (comma separeted values)
      --out-csv-no-header             no header in export csv files
      --out-csv-obj-level <level>     level of nested objects to expand before export
      --in-csv-header <header>        header for import csv files (comma separeted values)
      --in-csv-no-header              no header in import csv files
  -v, --verbose                       verbose output
  -h, --help                          display help for command

Monitor interface

The Server tab offers an "Export" tile to trigger the export routine (in a child process). The same options of the command-line commands can be specified in the textarea under the Export button.

For data exports, a game must be selected from the interface.

Clone this wiki locally