🦊 Change download option to work multiple times (#16)

Changed `-D` option to always download the lists supplied, regardless of
the database directory being empty or not.

This means you can download additional lists after the first program
run, or re-download lists later on. It *will* overwrite your custom
changes however if your files are called the same as the default list
names.

Additionally removed dependency on GNU version of cut and added some
simple tests for the download functionality.

Fixes #16.
This commit is contained in:
Marty Oehme 2022-11-04 17:22:47 +01:00
parent dc68887091
commit 7f5c3772e2
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9
6 changed files with 76 additions and 20 deletions

View file

@ -174,11 +174,11 @@ The path can also be a weblink which bemoji will download and use:
bemoji -f "https://raw.githubusercontent.com/jchook/emoji-menu/master/data/emojis.txt"
```
### Change the default emoji set
### Download additional emoji set
bemoji downloads emoji for you to use on first invocation.
bemoji automatically downloads an emoji list for you to use on first invocation.
By default, it only downloads emoji, though you can have it download math symbols as well.
To change this setting, execute bemoji like the following:
To download additional sets, execute bemoji like the following:
```bash
bemoji -D all
@ -187,8 +187,14 @@ bemoji -D all
This will download *all* default sets bemoji knows - which is currently the default emoji list and a long list of math symbols.
Other valid options for this setting are `emoji`, `math`, `none`.
```bash
bemoji -D "math emoji"
```
The above command is equivalent as you can mention multiple sets you want downloaded.
If set to `none` and no files are in the emoji directory,
bemoji will simply complain and not show anything.
bemoji will complain and not show anything.
### Do not skip to new line after output