Giter VIP home page Giter VIP logo

wsib-clearance-check-csv-cli's Introduction

wsib-clearance-check-csv-cli

Codacy Badge Maintainability GitHub Workflow Status Snyk Vulnerabilities for GitHub Repo

A command line tool to simplify retrieving clearance certificates from the WSIB website.

Looking to tie WSIB clearance certificate lookups into your own project? Check out the wsib-clearance-check project.

Usage

node lookup
     -input [inputFile.txt | inputFile.csv | inputFile.xlsx]
     -output [outputFile.csv]
     -error [errorFile.csv]
     [-real]

Parameters

-input [inputFile.txt | inputFile.csv | inputFile.xlsx] or
-i [inputFile.txt | inputFile.csv | inputFile.xlsx]

  • Specifies the path to the file that should be parsed.

  • The file can be either a simple text file with one WSIB Account Number on each line, a CSV file with the WSIB Account Number in the first column, or an XLSX file with the WSIB Account Number in the first column of the first sheet.

-output [outputFile.csv] or -o [outputFile.csv]

  • Specifies the name of the CSV file that should contain successfully retrieved clearance certificates.

  • This file is only written if there are records to write.

  • The output file includes the following fields. See a sample output file.

    • accountNumber
    • contractorLegalTradeName
    • contractorAddress
    • clearanceCertificateNumber
    • validityPeriodStart
    • validityPeriodEnd
    • principalLegalTradeName
    • principalAddress
    • certificateURL

-error [errorFile.csv] or -e [errorFile.csv]

  • Specifies the name of the CSV file that should contain error messages.

  • This file is only written if there are errors to write.

  • The error file includes the following fields. See a sample error file.

    • accountNumber
    • error
    • errorURL

-real or -r

  • Runs in "real browser" mode, as opposed to "headless browser" mode.

  • Useful for debugging, but not recommended for production use.

Setup

Ensure system has NodeJS 14 or better installed.

Download the latest code from this repository. This can be done from this website, from a git command line, or using GitHub Desktop. Save to the folder of your choice.

Install the dependencies.

npm install

See if it works.

npm test

๐Ÿ™ Thanks

This project was developed in collaboration with FRANCOachat, an organization that provides procurement services to several Ontario school boards.

wsib-clearance-check-csv-cli's People

Contributors

dangowans avatar

Stargazers

 avatar

Watchers

 avatar  avatar

wsib-clearance-check-csv-cli's Issues

CSV input/output file options

At this time, the first column of the input CSV file is assumed to be the WSIB account number. More options for the input file should be included.

  • Option to skip the first row.
  • Option to use another column other than the first column for the WSIB account number.
  • Option to output metadata columns from the input file in the output files.

Output results in the event of a crash

At this time, if the application fails midway through processing, all processed records are lost as the file writing step is skipped.

Write the file with whatever is available.

XLSX input

Request by email

Iโ€™ve tried changing the Node.JS/Powershell code to refer to an input file with .xlsx format. However, the code seems to just pass through without any action, like if it is not finding anything. The code works fine for a .csv file.
Iโ€™m trying to have the input sheet be a file that is connected to other data set to create my input data list. However, it seems to break when saving it as a .csv file vs .xlsx.
Basically, we have to create the input.csv file manually, whereas we would just like to be able to refresh it and move on with our check.

Config file input

Rather than having to include everything at the command line, have the option to instead pass the path to a config file that can contain all of the necessary options.

Sharepoint/Power Automate Integration

Once our input file is saved to a specific location, we can create an app within SharePoint that would start and run this code automatically, then pick up the output files when they are created or when the code is done doing its things, and then have a few other processes to consolidate various reports together and perhaps update a list that is shared.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.