From 2e69d828d20cac7ebedcf1f5f5376f3fc838de39 Mon Sep 17 00:00:00 2001 From: Erick Rincones Date: Thu, 13 Oct 2022 18:20:09 -0400 Subject: [PATCH] fix README.md custom cow example and current year for help message --- README.md | 47 +++++++++++++++++++++++------------------------ cli/index.js | 8 +++----- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index c23c5ef..99152d9 100644 --- a/README.md +++ b/README.md @@ -252,7 +252,7 @@ moo({ ```Text __________________________ ( I need to sleep ) -( 2022-10-13T19:18:51.885Z ) +( 2022-10-13T22:22:30.643Z ) -------------------------- o ^__^ o (@@)\_______ @@ -262,42 +262,41 @@ moo({ ``` ```Typescript -// Custom cow -cowsay({ +cowthink({ message: `No way, I don't want the leftovers of your love.`, - eyes: `••`, + eyes: `><`, + wrap: 21, cow: { template: [ - ` \\\\`, - ` \\\\`, - `(\\__/) ||`, - `(oㅅo) ||`, - `/ づ` + ` \\`, + ` \\ (\\__/)`, + ` \\ (•ㅅ•)`, + ` / づ` ], + defEyes: `••`, actionPos: [ - [ 0, 5 ], - [ 0, 6 ], - [ 1, 6 ], - [ 1, 7 ] + [ 0, 3 ], + [ 1, 4 ], + [ 2, 5 ] ], eyesPos: [ - [ 3, 1 ], - [ 3, 3 ] + [ 2, 8 ], + [ 2, 10 ] ] } }); ``` ```Text - _______________________________________ -/ No way, I don't want the leftovers of \ -\ your love. / - --------------------------------------- - \\ - \\ -(\__/) || -(•ㅅ•) || -/ づ + ______________________ +( No way, I don't want ) +( the leftovers of ) +( your love. ) + ---------------------- + o + o (\__/) + o (>ㅅ<) + / づ ``` diff --git a/cli/index.js b/cli/index.js index 5e267ad..4402d35 100644 --- a/cli/index.js +++ b/cli/index.js @@ -42,11 +42,6 @@ var cows = require("../cows"); */ var package_json = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8")); -/** - * Current year - */ -var year = new Date().getFullYear(); - /** * Get all available cow mode data IDs @@ -98,6 +93,9 @@ function getArg(token, j, argv, i) { * @package */ function printHelp() { + // Current year + var year = new Date().getFullYear(); + // Get current script var script = process.argv[1].replace(/\\/g, "/"); script = script.slice(script.lastIndexOf("/") + 1).replace(/\./, "");