Skip to content
shakty edited this page Aug 26, 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:
  -g, --games-dir <dir>               log directory (default log)
  -e, --export-dir <dir>              export directory (default export)
  -E, --create-export-sub-dir         create sub-directory inside export directory
  -r, --recursive                     recursively search for files
  -f, --files <files>                 comma separated list of files/patterns
  -F, --files-add <files>             comma separated list of files/patterns to add to defaults
  -o, --out-format <format>           the export format (json,ndjson,csv)
  -i, --in-format <format>            the import format (json,ndjson,csv)
  -d, --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)
  -r, --rooms <rooms>                 room/s to export
  -f, --from-room <room>              export from room (included)
  -t, --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
    , --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]

Options:
  -g, --games-dir <dir>               log directory (default log)
  -e, --export-dir <dir>              export directory (default export)
  -E, --create-export-sub-dir         create sub-directory inside export directory
  -r, --recursive                     recursively search for files
  -f, --files <files>                 comma separated list of files/patterns
  -F, --files-add <files>             comma separated list of files/patterns to add to defaults
  -o, --out-format <format>           the export format (json,ndjson,csv)
  -i, --in-format <format>            the import format (json,ndjson,csv)
  -d, --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)
  -g, --game <game>                   export logs only for this game
  -d, --done-only                     exports only "done" messages
  -c, --clean-up                      cleanup logs before export
  -m , --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
     , --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.

Clone this wiki locally