1.1.2 • Published 2 years ago

fc-game-cli v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

fc-game client

Hello! this is a command line tool to get info, stats on funcraft server. This CLI tool is based on the funcraft-api npm package.

Prerequisite

This CLI require nodejs to be installed on the target machine.

This CLI has been tested with node 15.14.0.

Install

npm i -g fc-game-cli

Usage

fc-game-cli <command> <options>

examples:
    fc-game-cli ranking2csv -p always -g survival -f survival-ranking.csv

Available commands are :

  • ranking2csv : generate csv file containing ranking for a game and a period options :

    • -p, --period : the period for the ranking (format YYYY-MM).
    • -g, --game : the game for the ranking
    • -f, --filename : the output csv filename.
  • ranking2json : generate json file containing ranking for a game and a period options :

    • -p, --period : the period for the ranking (format YYYY-MM).
    • -g, --game : the game for the ranking
    • -f, --filename : the output json filename.
  • stats2csv : generate csv file containing ranking for a pseudo eventually filtered by period and/or game :

    • -n, --pseudo : the pseudo to get the stats for.
    • -p, --period period : the period to get the stats for (the month).
    • -g, --game game : the game to get the stats for
    • -f, --filename : the output csv filename.
  • stats2json : generate json file containing ranking for a pseudo eventually filtered by period and/or game :

    • -n, --pseudo : the pseudo to get the stats for.
    • -p, --period period : the period to get the stats for (the month).
    • -g, --game game : the game to get the stats for
    • -f, --filename : the output json filename.

    more commands to come !

note : The CLI return json formatted output to be more easily integrated within other command line batch tools:

> fc-game-cli ranking2csv -f out.csv -p '2022-01' -g survival
{ code: 0, info: 'file out.csv generated.'}
> fc-game-cli stats2json -f out.json -p january -g survival
{ code: 0, info: 'file out.json generated.'}
> fc-game-cli ranking2csv -f out.csv -p '2022-01' -g fakegame
{ code: 1, error: 'Specified game is incorrect.'}
1.1.1

2 years ago

1.1.2

2 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago