giv 0.2.3

A CLI for generating useful values.
Documentation
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# Characters and Emoji Reference

This document lists commonly used character patterns and emoji shortcodes for the `giv chars` command.

The `giv chars` command uses the [penmanship](https://github.com/theroyalwhee0/penmanship) crate for Unicode character lookup, which provides comprehensive support for:

- **Character patterns**: Punctuation, math symbols, Greek letters, fractions, currency, and more
- **HTML entities**: 2200+ named character references (e.g., ` `, `©`, `α`)
- **Emoji shortcodes**: 1800+ GitHub-compatible emoji (e.g., `:smile:`, `:rocket:`)

For a complete list of all supported patterns, see:

- [penmanship character mappings]https://github.com/theroyalwhee0/penmanship/blob/main/docs/mappings.md
- [penmanship HTML entities]https://github.com/theroyalwhee0/penmanship/blob/main/docs/html-entities.md

## Usage

```bash
giv chars <pattern1> <pattern2> ...
giv --json chars <pattern1> <pattern2> ...
```

**Important Note**: Patterns starting with `-` (like `--` or `->`) require quoting or using the `--` separator to prevent them being interpreted as command-line flags:

```bash
# Using quotes
giv chars "--" "->"

# Using -- separator
giv chars -- "--" "->"

# Or use the "em" alias for em-dash
giv chars em
```

## Fractions

| Pattern | Result | Description |
|---------|--------|-------------|
| `1/4`   | ¼      | fraction one quarter |
| `1/2`   | ½      | fraction one half |
| `3/4`   | ¾      | fraction three quarters |
| `1/3`   || fraction one third |
| `2/3`   || fraction two thirds |
| `1/8`   || fraction one eighth |
| `3/8`   || fraction three eighths |
| `5/8`   || fraction five eighths |
| `7/8`   || fraction seven eighths |

**Example:**

```bash
$ giv chars 1/4 1/2 3/4
¼ ½ ¾
```

## Symbols

| Pattern | Result | Description |
|---------|--------|-------------|
| `(c)`, `(C)` | © | copyright sign |
| `(r)`, `(R)` | ® | registered sign |
| `(tm)`, `(TM)`, `(t)`, `(T)` || trade mark sign |
| `(p)`, `(P)` || sound recording copyright |

**Example:**

```bash
$ giv chars "(c)" "(r)" "(tm)"
© ® ™
```

## Punctuation

| Pattern | Result | Description |
|---------|--------|-------------|
| `...`   || horizontal ellipsis |
| `--`, `em` || em dash |

**Example:**

```bash
$ giv chars "..." em
… —

# Or use the pattern (requires -- separator or quotes)
$ giv chars -- "..." "--"
… —
```

## Arrows

| Pattern | Result | Description |
|---------|--------|-------------|
| `->`    || rightwards arrow |
| `<-`    || leftwards arrow |
| `=>`    || rightwards double arrow |
| `<=`    || leftwards double arrow |
| `<->`   || left right arrow |
| `<=>`   || left right double arrow |
| `^^`, `up` || upwards arrow |
| `vv`, `down` || downwards arrow |

**Example:**

```bash
$ giv chars -- "->" "<-" "=>" "<="
→ ← ⇒ ⇐
```

Note: Use `--` before arrow patterns to prevent them being interpreted as flags.

## Currency

| Pattern | Result | Description |
|---------|--------|-------------|
| `cent`  | ¢      | cent sign |
| `pound` | £      | pound sign |
| `euro`  || euro sign |
| `yen`   | ¥      | yen sign |
| `rupee` || rupee sign |
| `won`   || won sign |
| `bitcoin`, `btc` || bitcoin sign |

**Example:**

```bash
$ giv chars cent pound euro yen rupee won bitcoin
¢ £ € ¥ ₹ ₩ ₿
```

## Math Symbols

| Pattern | Result | Description |
|---------|--------|-------------|
| `degree`, `deg` | °      | degree sign |
| `+-`    | ±      | plus-minus sign |
| `x`, `*`   | ×      | multiplication sign |
| `divide`, `div` | ÷      | division sign |
| `!=`, `ne`  || not equal to |
| `lte`   || less-than or equal to |
| `gte`   || greater-than or equal to |
| `~=`    || almost equal to |
| `infinity`, `inf` || infinity |
| `sqrt`  || square root |
| `sum`   || n-ary summation |
| `prod`, `product` || n-ary product |
| `int`   || integral |
| `partial` || partial differential |
| `nabla` || nabla |
| `in`    || element of |
| `notin` || not an element of |
| `subset` || subset of |
| `superset` || superset of |
| `union` || union |
| `intersect` || intersection |
| `forall` || for all |
| `exists` || there exists |
| `emptyset` || empty set |
| `propto` || proportional to |

**Example:**

```bash
$ giv chars sqrt sum int partial nabla in subset union forall exists
√ ∑ ∫ ∂ ∇ ∈ ⊂ ∪ ∀ ∃
```

## Greek Letters (Lowercase)

| Pattern | Result | Description |
|---------|--------|-------------|
| `alpha`   | α    | greek small letter alpha |
| `beta`    | β    | greek small letter beta |
| `gamma`   | γ    | greek small letter gamma |
| `delta`   | δ    | greek small letter delta |
| `epsilon` | ε    | greek small letter epsilon |
| `zeta`    | ζ    | greek small letter zeta |
| `eta`     | η    | greek small letter eta |
| `theta`   | θ    | greek small letter theta |
| `iota`    | ι    | greek small letter iota |
| `kappa`   | κ    | greek small letter kappa |
| `lambda`, `lamda` | λ | greek small letter lambda |
| `mu`      | μ    | greek small letter mu |
| `nu`      | ν    | greek small letter nu |
| `xi`      | ξ    | greek small letter xi |
| `omicron` | ο    | greek small letter omicron |
| `pi`      | π    | greek small letter pi |
| `rho`     | ρ    | greek small letter rho |
| `sigma`   | σ    | greek small letter sigma |
| `tau`     | τ    | greek small letter tau |
| `upsilon` | υ    | greek small letter upsilon |
| `phi`     | φ    | greek small letter phi |
| `chi`     | χ    | greek small letter chi |
| `psi`     | ψ    | greek small letter psi |
| `omega`   | ω    | greek small letter omega |

**Example:**

```bash
$ giv chars alpha beta gamma delta lambda mu pi omega
α β γ δ λ μ π ω
```

## Greek Letters (Uppercase)

| Pattern | Result | Description |
|---------|--------|-------------|
| `Alpha`   | Α    | greek capital letter alpha |
| `Beta`    | Β    | greek capital letter beta |
| `Gamma`   | Γ    | greek capital letter gamma |
| `Delta`   | Δ    | greek capital letter delta |
| `Theta`   | Θ    | greek capital letter theta |
| `Lambda`, `Lamda` | Λ | greek capital letter lambda |
| `Pi`      | Π    | greek capital letter pi |
| `Sigma`   | Σ    | greek capital letter sigma |
| `Phi`     | Φ    | greek capital letter phi |
| `Psi`     | Ψ    | greek capital letter psi |
| `Omega`   | Ω    | greek capital letter omega |

**Example:**

```bash
$ giv chars Alpha Beta Gamma Delta Sigma Omega
Α Β Γ Δ Σ Ω
```

## Punctuation and Symbols

| Pattern | Result | Description |
|---------|--------|-------------|
| `section`, `sect` | § | section sign |
| `para`, `paragraph` || pilcrow sign |
| `dag`, `dagger` || dagger |
| `ddag` || double dagger |
| `bullet` || bullet |
| `middot` | · | middle dot |

**Example:**

```bash
$ giv chars section para dag ddag bullet middot
§ ¶ † ‡ • ·
```

## Superscripts

| Pattern | Result | Description |
|---------|--------|-------------|
| `^0` || superscript zero |
| `^1` | ¹ | superscript one |
| `^2` | ² | superscript two |
| `^3` | ³ | superscript three |
| `^4` || superscript four |
| `^5` || superscript five |
| `^6` || superscript six |
| `^7` || superscript seven |
| `^8` || superscript eight |
| `^9` || superscript nine |
| `^n` || superscript n |

**Example:**

```bash
$ giv chars "^2" "^3" "^n"
² ³ ⁿ
```

## Subscripts

| Pattern | Result | Description |
|---------|--------|-------------|
| `_0` || subscript zero |
| `_1` || subscript one |
| `_2` || subscript two |
| `_3` || subscript three |
| `_4` || subscript four |
| `_5` || subscript five |
| `_6` || subscript six |
| `_7` || subscript seven |
| `_8` || subscript eight |
| `_9` || subscript nine |

**Example:**

```bash
$ giv chars "_0" "_1" "_2"
₀ ₁ ₂
```

## Miscellaneous

| Pattern | Result | Description |
|---------|--------|-------------|
| `star` || black star |

**Example:**

```bash
$ giv chars star
★
```

## HTML Entities

The `chars` command supports 2200+ HTML named character references. Here are some commonly used ones:

| Pattern | Result | Description |
|---------|--------|-------------|
| `&nbsp;` | (non-breaking space) | html named character reference |
| `&lt;` | < | html named character reference |
| `&gt;` | > | html named character reference |
| `&amp;` | & | html named character reference |
| `&copy;` | © | html named character reference |
| `&reg;` | ® | html named character reference |
| `&alpha;` | α | html named character reference |
| `&beta;` | β | html named character reference |
| `&rarr;` || html named character reference |

**Example:**

```bash
$ giv chars "&lt;" "&gt;" "&amp;" "&copy;"
< > & ©
```

For a complete list of HTML entities, see:

- [penmanship HTML entities documentation]https://github.com/theroyalwhee0/penmanship/blob/main/docs/html-entities.md

## Common Emoji Shortcodes

The `chars` command supports all emoji shortcodes from the GitHub emoji set. Here are some commonly used ones:

### Smileys & Emotion

| Shortcode | Result | Name |
|-----------|--------|------|
| `:smile:` | 😄 | grinning face with smiling eyes |
| `:grin:` | 😁 | beaming face with smiling eyes |
| `:joy:` | 😂 | face with tears of joy |
| `:heart_eyes:` | 😍 | smiling face with heart-eyes |
| `:thinking:` | 🤔 | thinking face |
| `:thumbsup:` | 👍 | thumbs up |
| `:thumbsdown:` | 👎 | thumbs down |
| `:clap:` | 👏 | clapping hands |
| `:wave:` | 👋 | waving hand |
| `:heart:` | ❤️ | red heart |
| `:fire:` | 🔥 | fire |
| `:star:` || star |

### Common Symbols

| Shortcode | Result | Name |
|-----------|--------|------|
| `:rocket:` | 🚀 | rocket |
| `:tada:` | 🎉 | party popper |
| `:sparkles:` || sparkles |
| `:zap:` || high voltage |
| `:boom:` | 💥 | collision |
| `:bulb:` | 💡 | light bulb |
| `:warning:` | ⚠️ | warning |
| `:check:` || check mark button |
| `:x:` || cross mark |
| `:question:` || red question mark |

### Technology

| Shortcode | Result | Name |
|-----------|--------|------|
| `:computer:` | 💻 | laptop |
| `:keyboard:` | ⌨️ | keyboard |
| `:phone:` | 📱 | mobile phone |
| `:email:` | 📧 | e-mail |
| `:gear:` | ⚙️ | gear |
| `:wrench:` | 🔧 | wrench |
| `:hammer:` | 🔨 | hammer |
| `:lock:` | 🔒 | locked |
| `:unlock:` | 🔓 | unlocked |
| `:key:` | 🔑 | key |

**Example:**

```bash
$ giv chars :smile: :rocket: :thumbsup: :fire:
😄 🚀 👍 🔥
```

## Mixed Examples

You can combine emoji and character patterns in a single command:

```bash
$ giv chars 1/4 :smile: "(c)" alpha lambda
¼ 😄 © α λ
```

```bash
$ giv chars :rocket: "->" :star: "+" :sparkles:
🚀 → ⭐ + ✨
```

## JSON Output

All conversions can be output as JSON with metadata. The `type` field indicates whether the input was a pattern, HTML entity, or emoji:

```bash
$ giv --json chars alpha "&nbsp;" :smile:
[
  {
    "input": "alpha",
    "output": "α",
    "type": "pattern",
    "name": "greek small letter alpha"
  },
  {
    "input": "&nbsp;",
    "output": " ",
    "type": "html",
    "name": "html named character reference"
  },
  {
    "input": ":smile:",
    "output": "😄",
    "type": "emoji",
    "name": "grinning face with smiling eyes"
  }
]
```

## Error Handling

If an unknown pattern or emoji shortcode is provided, the command will exit with an error:

```bash
$ giv chars unknown
Error: Unknown character pattern or emoji shortcode: 'unknown'
```

## Finding More Patterns

### Character Patterns

For the complete list of supported character patterns (punctuation, math symbols, Greek letters, fractions, currency, etc.), see:

- [penmanship character mappings]https://github.com/theroyalwhee0/penmanship/blob/main/docs/mappings.md

### HTML Entities

For the complete list of 2200+ HTML named character references, see:

- [penmanship HTML entities]https://github.com/theroyalwhee0/penmanship/blob/main/docs/html-entities.md

### Emoji Shortcodes

GitHub-compatible emoji shortcodes are supported. The full list of supported emoji shortcodes can be found at:

- <https://github.com/ikatyang/emoji-cheat-sheet>

## Implementation Details

Character lookup is provided by:

- [penmanship]https://github.com/theroyalwhee0/penmanship - Unicode character lookup library

Emoji support is provided by:

- <https://github.com/rossmacarthur/emojis>