Skip to content

Commit

Permalink
fix(options): 𝓯𝓲𝔁 𝓯𝓪𝓷𝓬𝔂,𝓯𝓵𝓪𝓰𝓼
Browse files Browse the repository at this point in the history
  • Loading branch information
xero committed Jun 7, 2023
1 parent f7d4a17 commit 18a3f3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,18 @@ wide You So Fancy
__ῳɛıཞɖ ųŋıƈơɖɛ ʄƖɛҳıŋɠ? 😜__

```
usage: ./sofancy.js [-f (font) | -t] string
usage: sofancy [-f (font) | -t] string
flags:
-f|--font (font) : output in a single font
-t|--titles : display titles in output
examples:
/sofancy.js -f wide aesthetics
sofancy -f wide aesthetics
aesthetics
/sofancy.js -t some string | fzf | xsel -i
sofancy -tf neon llamas | sed 's/neon.* /txt: /'
txt: ᒪᒪᗩᗰᗩᔕ
sofancy -t some string | fzf | xsel -i
git commit -m "style(docs): $(sofancy -f bolditalic STYLIN)"
```

Expand Down
12 changes: 8 additions & 4 deletions sofancy
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ let argv = require('minimist-lite')(process.argv.slice(2));
let charmap,find,font,str='',titles=false;

function usage() {
console.log(`usage: ./sofancy.js [-f (font) | -t] string
console.log(`usage: sofancy [-f (font) | -t] string
flags:
-f|--font (font) : output in a single font
-t|--titles : display titles in output
examples:
/sofancy.js -f wide aesthetics
sofancy -f wide aesthetics
aesthetics
/sofancy.js -t some string | fzf | xsel -i
sofancy -tf neon llamas | sed 's/neon.* /txt: /'
txt: ᒪᒪᗩᗰᗩᔕ
sofancy -t some string | fzf | xsel -i
git commit -m "style(docs): $(sofancy -f bolditalic STYLIN)"
`)
process.exit();
Expand All @@ -24,7 +26,9 @@ function setArgs() {
(argv.f || argv.font) ? font=argv.f || argv.font : delete font;
find=(font == undefined) ? /.*json$/ : `${font}.json`;
titles=(argv.t || argv.titles) ? true : false;
if (argv.titles) {
if (argv.t && !font) {
str=argv.t+" "+argv._.toString().replace(',', ' ');
} else if (argv.titles && !font) {
str=argv.titles+" "+argv._.toString().replace(',', ' ');
} else {
str=argv._.toString().replace(',', ' ');
Expand Down

0 comments on commit 18a3f3f

Please sign in to comment.