Skip to content

Commit

Permalink
jsdoc: refactoring args jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
felixleo22 committed Jun 23, 2021
1 parent 3523a9d commit 8784eec
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
1 change: 1 addition & 0 deletions bin/cmds/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const setConfig = async () => {

/**
* config management command to establish the connection between the command and ezunpaywall
*
* @param {boolean} args.get -g --get - display the configuration
* @param {boolean} args.set -s --set - initialize the configuration file in $HOME/.config
* @param {string} args.ezunpaywallURL --ezunpaywallURL <ezunpaywallURL> - ezunpaywall url
Expand Down
6 changes: 3 additions & 3 deletions bin/cmds/enrich.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const uuid = require('uuid');
const { getConfig } = require('../../lib/config');
/**
* start a csv file enrichment
*
* @param {string} args.file -f --file <file> - file which must be enriched
* @param {string} args.attributes -a --attributes <attributes> - attributes which must be enriched
* in graphql format. By default, all attributes are added
*
* @param {string} args.separator -s --separator <separator> - separator of csv out file
* @param {string} args.out -o --out <out> - name of enriched file
* @param {boolean} args.verbose -v --verbose - logs how much lines are enriched
* @param {boolean} args.use -u --use <use> - use a custom config
* @param {boolean} args.use -u --use <use> - pathfile of custom config
*/
const enrichCSV = async (args) => {
const config = await getConfig(args.use);
Expand Down Expand Up @@ -109,7 +109,7 @@ const enrichCSV = async (args) => {
*
* @param {string} args.out -o --out <out> - name of enriched file
* @param {boolean} args.verbose -v --verbose - logs how much lines are enriched
* @param {boolean} args.use -u --use <use> - use a custom config
* @param {boolean} args.use -u --use <use> - pathfile of custom config
*/
const enrichJSON = async (args) => {
const config = await getConfig(args.use);
Expand Down
4 changes: 2 additions & 2 deletions bin/cmds/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const { getConfig } = require('../../lib/config');

/**
* check if service is available
* @param {*} args commander arguments
* @param -u --use <use> - use a custom config
*
* @param {boolean} args.use -u --use - pathfile of custom config
*/
const ping = async (args) => {
const config = await getConfig(args.use);
Expand Down
13 changes: 7 additions & 6 deletions bin/cmds/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ const getReports = async (ezunpaywall) => {

/**
* get the content of report
* @param {*} args commander arguments
* @param -f --file <file> - report file installed on ezunpaywall
* @param -l --list - list of reports generated by ezunpaywall
* @param -la --latest [latest] - boolean
* @param -s --status <status> - status of report, success and error only accepted
* @param -u --use <use> - use a custom config
*
* @param {string} args.file -f --file - report file installed on ezunpaywall
* @param {boolean} args.list -l --list - list of reports generated by ezunpaywall
* @param {boolean} args.latest -la --latest [latest]
* @param {string} args.status -s --status <status> - status of report,
* success and error only accepted
* @param {boolean} args.use -u --use <use> - pathfile of custom config
*/
const report = async (args) => {
const config = await getConfig(args.use);
Expand Down
4 changes: 2 additions & 2 deletions bin/cmds/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const { getConfig } = require('../../lib/config');

/**
* Indicates if an update process is running
* @param {Object} args commander arguments
* @param -u --use <use> - use a custom config
*
* @param {boolean} args.use -u --use - pathfile of custom config
*/
const getStatus = async (args) => {
const config = await getConfig(args.use);
Expand Down
18 changes: 10 additions & 8 deletions bin/cmds/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ const getFiles = async (ezunpaywall) => {

/**
* Starts an unpaywall data update process
* @param {Object} args commander arguments
* @param -f --file <file> - snapshot\'s file installed on ezunpaywall
* @param -l --list - list of snapshot installed on ezunpaywall
* @param -sd --startDate <starteDate> - start date to download and insert updates from unpaywall
* @param -ed --endDate <endDate> - end date to download and insert updates from unpaywall
* @param -of --offset <offset> - line where processing will start
* @param -li --limit <limit> - line where processing will end
* @param -u --use <use> - use a custom config
*
* @param {string} args.file -f --file <file> - snapshot's file installed on ezunpaywall
* @param {boolean} args.list -l --list - list of snapshot installed on ezunpaywall
* @param {string} args.startDate -sd --startDate <starteDate> - start date to download and insert
* updates from unpaywall
* @param {string} args.endDate -ed --endDate <endDate> - end date to download
* and insert updates from unpaywall
* @param {string} args.offset -of --offset <offset> - line where processing will start
* @param {string} args.limit -li --limit <limit> - line where processing will end
* @param {string} args.use -u --use <use> - pathfile of custom config
*/
const update = async (args) => {
const config = await getConfig(args.use);
Expand Down

0 comments on commit 8784eec

Please sign in to comment.