Skip to main content

Look up emojis by text and copy them to the clipboard.

Project description

Emoji Searcher

Automate the boring stuff: I have been googling emojis and manually copying them to my clipboard (it's especially painful when posting to Facebook).

So it was time to write a script to look up emojis by text from the command line and copy them to the clipboard.

By default it takes the first match in case there are multiple matching emojis. However if you append a dot (.) to a word you get to choose which emoji gets copied.

How to install and run it

$ git clone git@github.com:bbelderbos/emojisearcher.git
$ cd emojisearcher
$ python3.10 -m venv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt

# search from cli
(venv) $ python -m emojisearcher.script bicep
Copied 💪 to clipboard

(venv) $ python -m emojisearcher.script snake
Copied 🐍 to clipboard

(venv) $ python -m emojisearcher.script tada
Copied 🎉 to clipboard

# search interactively (specially useful if there are multiple matches, you can choose)

(venv) $ python -m emojisearcher.script


------------------------------------------------------------------------------------
Type one or more emoji related words ...
End a word with a . if you want to select an emoji if there are multiple
matches, otherwise the first match will be picked. Type 'q' to exit.
> snake
Copied 🐍 to clipboard

------------------------------------------------------------------------------------
Type one or more emoji related words ...
End a word with a . if you want to select an emoji if there are multiple
matches, otherwise the first match will be picked. Type 'q' to exit.
> grin
Copied 😺 to clipboard

------------------------------------------------------------------------------------
Type one or more emoji related words ...
End a word with a . if you want to select an emoji if there are multiple
matches, otherwise the first match will be picked. Type 'q' to exit.
> grin.
1 😺
2 😸
3 😀
4 😃
5 😄
6 😅
7 😆
8 😀
9 😁
Select the number of the emoji you want: 4
Copied 😃 to clipboard

------------------------------------------------------------------------------------
Type one or more emoji related words ...
End a word with a . if you want to select an emoji if there are multiple
matches, otherwise the first match will be picked. Type 'q' to exit.
> q
Bye


# running the tests
(venv) $ pip install -r requirements-dev.txt
(venv) $ pytest

Using a shell alias can be really convenient for this (assuming you have the project cloned in ~/code):

# .zshrc
function emo {
    # subshell so you don't stay in the virtual env after running it
    (cd $HOME/code/emojisearcher && source venv/bin/activate && python -m emojisearcher.script "$1")
}

After sourcing your .zshrc you can now get emojis copied to your clipboard fast using emo bicep, emo tada etc.

Rich

Update: I am using rich now to retrieve a list of emojis, it seems a bit more accurate (e.g. our beloved 🎉 emoji). I will be enhancing the cli interface with this awesome library ...

Other ways

While sharing this on social media I learned about some useful OS shortcuts to retrieve emojis, thanks Matt!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emojisearcher-0.5.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

emojisearcher-0.5.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file emojisearcher-0.5.0.tar.gz.

File metadata

  • Download URL: emojisearcher-0.5.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for emojisearcher-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1bf204bb53024c74c95d2054c4911d7768878be32d548b2874e0ccfc63df8fc7
MD5 76dd205317b25726c422c14c5064a6d6
BLAKE2b-256 1c8a8017e3d34f1f6fe45b378ecb3405b949718774a83c9dd96470f97925f150

See more details on using hashes here.

File details

Details for the file emojisearcher-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: emojisearcher-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for emojisearcher-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55741121550562558d8475d664ce82a2c8aa5eb9bfbe81a91a78913e39917c7b
MD5 e94dcb6ffb67da90bd7d27113241a727
BLAKE2b-256 33c882184e6c75ad5ac0e9078890db5c15467a54fef6e9aa65d8ace771017304

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page