-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·51 lines (47 loc) · 2.14 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /usr/bin/env node
import Chalk from 'chalk';
import { program } from 'commander';
import { encode } from './commands/encode.js';
import { decode } from './commands/decode.js';
program
.option( '-e, --encode', 'encode to dolphin')
.option('-d, --decode', 'decode from dolphin')
.option('-D, --dolphin', 'see a dolphin')
.argument('[input]')
.action(( input ) => {
if ( program.opts().encode ) {
console.log( Chalk.cyan.bold( encode( input )));
} else if ( program.opts().decode ) {
console.log( Chalk.cyan.bold( decode( input )));
} else if ( program.opts().dolphin ) {
console.log( Chalk.bold(`
__
_.-~ )
_..--~~~~,' ,-/ _
.-' . . . .' ,-',' ,' )
,' . . . _ ,--~,-'__..-' ,'
,' . . . (@)' ---~~~~ ,'
/ . . . . '~~ ,-'
/ . . . . . ,-'
; . . . . - . ,'
: . . . . _ /
. . . . . \`-.:
. . . ./ - . )
. . . | _____..---.._/ ____ Seal _
~---~~~~----~~~~ ~~
Special shout-out to(✿ ͡◕ ᴗ◕)つ━━✫・*。
${Chalk.hex('#CA09BC').bold('EEEEEEEEEeEeEeEE')}${Chalk.hex('#A318BF').bold('EEEEEEEEEeeEeeee')}${Chalk.hex('#7C27C2').bold('EEEEEEEEEeeEEEEe')}${Chalk.hex('#5535C5').bold('EEEEEEEEEeeeEEee')}${Chalk.hex('#2E44C8').bold('EEEEEEEEEeeeEeEE')}${Chalk.hex('#0753CB').bold('EEEEEEEEEeeEEeEe')}${Chalk.hex('#1478e3').bold('EEEEEEEEEeeeEEeE')}`))
} else {
console.log('Uh oh, command not recognized. Check out -h or --help for assistance');
}
})
.version('1.0.0')
.addHelpText('before', `
https://dolphinonkeys.com for ଘ(੭ºัᴗºั)━☆゚*:.
${Chalk.bgBlueBright(' °˖✧ The Dolphinator ✧˖° ')}${Chalk.bgMagentaBright(' online ')}
`)
.addHelpText('after', `
${Chalk('Example usage:')}
${Chalk.cyan.bold('dolphin8 -e "encode this string"')}
${Chalk.cyan.bold('dolphin8 --decode "EEEEEEEEEeeEeEEEEEEEEEEEEeeEeEEe"')}`)
program.parse();