3.0.0 • Published 11 months ago

@ezpaarse-project/ezpaarse v3.0.0

Weekly downloads
7
License
CeCILL
Repository
github
Last release
11 months ago

node-ezpaarse

Node wrapper for the ezPAARSE API

Installation

npm install -g @ezpaarse-project/ezpaarse

Usage

ezp --help

Environnement variables

You can use environnement variables to set command options. Use the prefix "EZPAARSE_" followed by the option you want to set.

export EZPAARSE_SETTINGS=00-fr-bibcnrs
export EZPAARSE_VERBOSE=true

Global options

NameTypeDescription
-h, --hostStringezPAARSE server hostname (ex: demo.ezpaarse.org)
-p, --proxyStringa proxy server to use
--versionBooleanPrint the version number
--helpBooleanShow some help

You can get help for any command by typing ezp <command> help.

Commands

ezp process files..

Let you process one or more files with an instance of ezPAARSE. If no files are provided, the command will listen to stdin. The results are printed to stdout, unless you set an output file with --out.

Options

NameTypeDescription
-o, --out, --outputStringOutput file
-H, --header, --headersStringAdd a header to the request (ex: "Reject-Files: all")
-d, --downloadStringDownload a file from the job directory
-v, --verboseBooleanShows detailed operations
-s, --settingsStringSet a predefined setting

Examples

  # Simple case, process ezproxy.log and write results to result.csv
  ezp process ezproxy.log --out result.csv
  
  # Same as above, and download the report file
  ezp process ezproxy.log --out result.csv --download job-report.html
  
  # Download the report file with a custom path
  ezp process ezproxy.log --out result.csv --download job-report.html:./reports/report.html
  
  # Reading from stdin and redirecting stdout to file
  cat ezproxy.log | ezp process > result.csv

ezp bulk \<sourceDir> destDir

Process files in sourceDir and save results in destDir. If destDir is not provided, results will be stored in sourceDir, aside the source files. When processing files recursively with the -r option, destDir will mimic the structure of sourceDir. Files will use the same or Files with existing results are skipped, unless the --force flag is set. By default, the result file and the job report are downloaded, but you can get additionnal files from the job directory by using the --download option.

Options

NameTypeDescription
-H, --header, --headersStringAdd a header to the request
-s, --settingsStringSet a predefined setting
-r, --recursiveBooleanLook for log files into subdirectories
-d, --downloadStringDownload a file from the job directory
-f, --force, --overwriteBooleanOverwrite existing files
-v, --verboseBooleanShows detailed operations
-l, --listBooleanOnly list log files in the directory

Examples

  # Simple case, processing files recursively from ezproxy-logs and storing results in ezproxy-results
  ezp bulk -r ezproxy-logs/ ezproxy-results/
  
  # Activating reject files and downloading unqualified log lines along results
  ezp bulk -r ezproxy-logs/ ezproxy-results/ -H "Reject-Files: all" --download lines-unqualified-ecs.log

ezp download \<id> <files..>

Download one or more files from the directory of the job with the given id.

Options

No options

Examples

  # Downloading job-report.json into the current directory
  ezp download 897efb30-f96e-11e9-9997-cd438c1e39d2 job-report.json
  
  # Downloading job-traces.log with a custom name
  ezp download 897efb30-f96e-11e9-9997-cd438c1e39d2 job-traces.log:897efb30-traces.log
3.0.0

11 months ago

2.0.4

2 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago