teebot 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/teebot.js +13 -15
- package/package.json +1 -1
package/bin/teebot.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { execFile } from 'node:child_process'
|
|
4
4
|
|
|
5
|
-
export const VERSION = '1.0.
|
|
5
|
+
export const VERSION = '1.0.2'
|
|
6
6
|
|
|
7
7
|
const VALID_COLORS = ['black', 'white', 'navy', 'grey', 'red', 'asphalt', 'forest', 'gold', 'mauve', 'royal']
|
|
8
8
|
const VALID_FONTS = ['mono', 'sans', 'serif', 'slab', 'hand']
|
|
@@ -65,9 +65,9 @@ export function parseArgs(args) {
|
|
|
65
65
|
return result
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
const BODY_WIDTH =
|
|
68
|
+
const BODY_WIDTH = 24
|
|
69
69
|
const BODY_ROWS = 5
|
|
70
|
-
const WRAP_WIDTH =
|
|
70
|
+
const WRAP_WIDTH = 21
|
|
71
71
|
|
|
72
72
|
export function wrapText(text, maxWidth) {
|
|
73
73
|
const lines = []
|
|
@@ -111,15 +111,15 @@ export function renderShirt(text) {
|
|
|
111
111
|
while (textLines.length < BODY_ROWS) textLines.push('')
|
|
112
112
|
|
|
113
113
|
const shirt = [
|
|
114
|
-
'
|
|
115
|
-
'
|
|
116
|
-
' ╱
|
|
117
|
-
' ╱
|
|
118
|
-
' ╱
|
|
119
|
-
' │
|
|
120
|
-
' ╰──╮
|
|
114
|
+
' ┌──────┐',
|
|
115
|
+
' ╭────────┤ ├────────╮',
|
|
116
|
+
' ╱ ╲ ╱ ╲',
|
|
117
|
+
' ╱ ╲ ╱ ╲',
|
|
118
|
+
' ╱ ╲╱ ╲',
|
|
119
|
+
' │ │',
|
|
120
|
+
' ╰──╮ ╭──╯',
|
|
121
121
|
...textLines.map(line => ' │' + centerPad(line, BODY_WIDTH) + '│'),
|
|
122
|
-
'
|
|
122
|
+
' ╰────────────────────────╯',
|
|
123
123
|
]
|
|
124
124
|
|
|
125
125
|
return shirt.join('\n')
|
|
@@ -144,8 +144,7 @@ function openBrowser(url) {
|
|
|
144
144
|
|
|
145
145
|
function printHelp() {
|
|
146
146
|
console.log(`
|
|
147
|
-
teebot.dev - text on tees
|
|
148
|
-
|
|
147
|
+
teebot.dev - text on tees
|
|
149
148
|
Usage:
|
|
150
149
|
npx teebot "YOUR TEXT HERE" [options]
|
|
151
150
|
|
|
@@ -167,8 +166,7 @@ function printHelp() {
|
|
|
167
166
|
|
|
168
167
|
function printUsage() {
|
|
169
168
|
console.log(`
|
|
170
|
-
teebot.dev - text on tees
|
|
171
|
-
|
|
169
|
+
teebot.dev - text on tees
|
|
172
170
|
Usage: npx teebot "YOUR TEXT HERE" [options]
|
|
173
171
|
Run npx teebot --help for more info.
|
|
174
172
|
`)
|