Commit 1a21c466 authored by Michael Jeanson's avatar Michael Jeanson

Import Upstream version 0.1

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

build*/
*.html
*.sublime*
# Copyright (C) 2019 Philippe Proulx <eepp.ca>
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
cmake_minimum_required (VERSION 3.1.0 FATAL_ERROR)
# project and version
project (jome VERSION 0.1.0)
# configure compiler globally for C++14
set (CMAKE_CXX_EXTENSIONS OFF)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
# data build path
set (JOME-DATA-DIR "${CMAKE_CURRENT_BINARY_DIR}/data")
# jome
add_subdirectory (assets)
add_subdirectory (gen-data)
add_subdirectory (jome)
The MIT License (MIT)
Copyright (c) 2019 Philippe Proulx <eepp.ca>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
= jome 😀
Philippe Proulx <eepp.ca>
**jome** (_joh_·_mee_) is a ⌨️ centric emoji picker desktop application.
You can also pick an emoji with the 🖱, don't worry.
jome has most of the interesting emojis of
https://emojipedia.org/emoji-11.0/[Emoji{nbsp}11.0].
I'm not a fan of the usual very broad categories of emojis which do not
intersect so I made my own categories. A given emoji can be found in
more than one category. For example, 🦈 is found in both the _animals (no
faces)_ and _water_ categories. I find that it's easier to visually
search by theme than by very general category. Feel free to suggest more
categories.
jome is currently only tested on 🐧.
== Preview
image::screenshots/all.png[]
image::screenshots/palm.png[]
image::screenshots/wom.png[]
image::screenshots/wom-fact.png[]
image::screenshots/transp-cat.png[]
image::screenshots/transp-cat-car.png[]
image::screenshots/transp-cat-car-lig.png[]
== Build
You need:
* https://cmake.org/[CMake] ≥ 3.1.0
* A pass:[C++14] compiler
* http://www.boost.org/[Boost] ≥ 1.58 (only to build)
* Qt 5 (_Core_, _GUI_, and _Widgets_ modules)
* Python 3
** The `cairo` package
** The `cairosvg` package
** The `yaml` package
.Build and install jome
----
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=release ..
make -j$(nproc)
sudo make install
----
[NOTE]
You need to _install_ jome for it to find the correct data files. If you
don't want to install it on your system, use
`-DCMAKE_INSTALL_PREFIX=path/to/install/directory` when running `cmake`.
== Usage
jome's purpose is to help you pick an emoji.
When you <<accept-emoji,accept>> an emoji (with the ⌨️ or with the 🖱),
jome prints the UTF-8 emoji to the standard output. It can also print
the individual Unicode codepoints.
If you just close the window (you can press **Escape** to do this), jome
prints nothing to the standard output.
=== Interface
image::screenshots/all.png[]
There are four sections:
[[find-box]]Find box (top)::
Input box where you can type a query to <<find-emojis,find emojis>>.
Emojis::
All emojis (with an empty find box) or find results.
+
When there's at least one emoji, there's always a selected emoji with a
red box around it.
+
Click an emoji to accept it and quit.
+
Hover an emoji to update the bottom emoji info text temporarily.
Category list::
List of available categories.
+
When all emojis are shown (the find box is empty), click a category
name to scroll to this emoji category.
Emoji info text (bottom)::
Name and Unicode codepoints of the selected or hovered emoji.
[[find-emojis]]
=== 🔍 emojis
The power of jome is its <<find-box,find box>>.
When you launch jome, the find box is focused, and it should stay
focused unless you're browsing emojis manually with the intention of
accepting one with the 🖱.
The format of a query is one of:
* `_TERMS_`
* `_CAT_/`
* `_CAT_/_TERMS_`
where:
`_CAT_`::
Partial name of categories in which to search.
`_TERMS_`::
Space-separated list of search terms.
+
For an emoji to be part of the results, at least one of its keywords
must contain _all_ the search terms.
=== Select and accept an emoji
To select an emoji, use the following keys:
⬅️, ➡️, ⬆️, ⬇️::
Go left/right/up/down.
**Page ⬆️**, **Page ⬇️**::
Go up/down 10 rows.
**Home**::
Go to the first emoji.
**End**::
Go to the last emoji.
[[accept-emoji]]To accept the selected emoji, press:
**Enter**::
Accept the selected emoji with the default skin tone
(if applicable).
**F1**, **F2**, **F3**, **F4**, **F5**::
If the selected emoji supports skin tones, accept the selected
emoji with a light, medium-light, medium, medium-dark, or dark
skin tone.
Depending on the <<cl-options,command-line options>>, jome prints the
emoji or the Unicode codepoints to the standard output and quits.
[[cl-options]]
=== Command-line options
`-f`::
Set the output format:
+
--
`utf-8` (default)::
UTF-8 emoji.
`cp`::
Space-separated Unicode codepoints (hexadecimal).
+
Example: `1f645 200d 2642 fe0f`
`ucp`::
Space-separated Unicode codepoints (hexadecimal) with a `U+`
prefix.
+
Example: `U+1F93C U+200D U+2642 U+FE0F`
--
`-n`::
Do not print a newline after printing the emoji or codepoints.
== Type the selected emoji
Here's a Bash script which types, using
https://www.semicomplete.com/projects/xdotool/[xdotool], the selected
emoji once jome quits:
[source,bash]
----
#!/usr/bin/bash
codepoints="$(jome -f ucp | tr -d +)"
if [ $? -ne 0 -o -z "$codepoints" ]; then
exit 1
fi
xdotool key --delay 50 $codepoints
----
# Copyright (C) 2019 Philippe Proulx <eepp.ca>
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
install (
FILES
"sel.png"
DESTINATION
share/jome/data
)
# Copyright (C) 2019 Philippe Proulx <eepp.ca>
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
set (
JOME-DATA-FILES
"${JOME-DATA-DIR}/emojis.json"
"${JOME-DATA-DIR}/emojis-png-locations.json"
"${JOME-DATA-DIR}/cats.json"
"${JOME-DATA-DIR}/emojis.png"