Emoji searcher for use with fzf
Project description
emoji fzf
Small utility for manipulating emojis via
fzf's --preview
hook!
Depends on fzf being installed to the system (integrates via bash alias/ function rather than using fzf bindings or whatnot).
Use it
To use with fzf's preview browser, you'll need to install fzf, see instructions: https://github.com/junegunn/fzf#installation
pip install emoji-fzf
# if you aren't installing to a virtual env, you may need to add this to path
# (if it wasn't already) to access the tool
export PATH=$PATH:~/.local/bin
# add me to your ~/.bashrc or ~/.zshrc or whatnot
alias emoj="emoji-fzf preview | fzf --preview 'emoji-fzf get --name {1}' | cut -d \" \" -f 1 | emoji-fzf get"
# to copy to xclip system keyboard (on mac use pbcopy) after selecting
emoj | xclip -selection c
Alternative setup
If you prefer not to use fzf's preview feature and have the emojis appear before their aliases you can use the following alias instead:
alias emoj="emoji-fzf preview --prepend | fzf | awk '{ print \$1 }'"
Custom aliases
emoji-fzf uses a pre-defined set of aliases for every emoji. If you want to
define your own, ie add custom aliases for some emojis you can do this via the
--custom-aliases
flag.
Please note that these aliases will be appended to the list of pre-defined aliases and not replace them.
- First you need to create a JSON file with the following structure:
[
{
"👍": [
"my-custom-alias",
"good-boy"
]
},
{
"💯": [
"epic-victory-royale"
]
}
]
- Now you can call
emoji-fzf
like so:
emoji-fzf --custom-aliases /path/to/your-custom-aliases.json preview
Development/testing
This uses a Dockerfile to keep the test build environment relatively clean and locked. The full test infrastructure is:
- Docker container, based on buildpack Debian jessie image
- tox-conda, which enables us to install any python version available on conda channels (here just a few since the supported list is relatively small)
- tox to run the tests + build checks
- black formatting check
- check-wheel-contents and isort for more styling/idiomatic usage checks
To run the test suite in docker just as CI does:
# build the image and tag it as 'emoji-fzf'
docker build -t emoji-fzf --build-arg "UID=$(id -u)" -f Dockerfile
# from this repo root, mount the cwd into the container and run tox
docker run -v $(pwd):/mnt/workspace -t emoji-fzf bash -c "cd /mnt/workspace && tox"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for emoji_fzf-0.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 593a5ded2815c9f847332def20cd6ad6a162681cf0571a4c1bef7343dea238b2 |
|
MD5 | 9e89ffa30299bebb32150b118967d4cd |
|
BLAKE2b-256 | 031c3b38d814e68d13ed088a128071e7f74e1612f015c157c48642b315480bae |