Skip to content

Commit

Permalink
Be more precise about character sets. (#23)
Browse files Browse the repository at this point in the history
* Be more precise about character sets.

Specifically, replace "ASCII" with "Unicode".

* ASCII -> UNICODE

Co-authored-by: Lefteris Garyfalakis <[email protected]>
  • Loading branch information
neilmoore and lefterisgar authored Sep 22, 2022
1 parent 13489e2 commit c77276f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
ignore_names: ascii
ignore_names: unicode
env:
SHELLCHECK_OPTS: -x
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
╚══════╝╚═╝╚═╝ ╚═╝ ╚═════╝ ╚════╝ ╚═╝
|==========================================|</pre>
<p>
Turning your favorite emojis into the world of ASCII
Turning your favorite emojis into the world of Unicode
</p>
<a href="https://github.com/GEROGIANNIS/Limoji/releases/latest">
<img alt="Releases" src="https://flat.badgen.net/github/release/GEROGIANNIS/Limoji/stable?color=green">
Expand All @@ -31,7 +31,7 @@

# 📖 Introduction

Limoji is an open source tool that makes it easy to choose between hundreds of cool ASCII emoticons and share them with your friends, all done using the terminal!
Limoji is an open source tool that makes it easy to choose between hundreds of cool Unicode emoticons and share them with your friends, all done using the terminal!

All you have to do is pick the right one or let Limoji choose it for you!

Expand Down
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Rules-Requires-Root: no
Package: limoji
Architecture: all
Depends: xclip, wl-clipboard
Description: Turning your favorite emojis into the world of ASCII
Turning your favorite emojis into the world of ASCII
Description: Turning your favorite emojis into the world of Unicode
Turning your favorite emojis into the world of Unicode
2 changes: 1 addition & 1 deletion debian/install
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
limoji usr/bin
ascii etc/limoji
unicode etc/limoji
16 changes: 8 additions & 8 deletions limoji
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ EOF
printCmdInfo() {
printInfo \
"Limoji is an open source tool that makes it easy to choose between
hundreds of cool ASCII emoticons and share them with your friends,
hundreds of cool Unicode emoticons and share them with your friends,
all done using the terminal!
All you have to do is pick the right one or let Limoji choose it for you!
Expand Down Expand Up @@ -93,11 +93,11 @@ fetchLatestRelease() {

# Function that picks a random emoticon name
fetchRandomName() {
# Generate a random number between 1 and ascii line count
randomLine=$(( 2 + RANDOM % (ASCII_LINES - 1) ))
# Generate a random number between 1 and unicode line count
randomLine=$(( 2 + RANDOM % (UNICODE_LINES - 1) ))

# Fetch emoticon's name from the selected line
randomName=$(sed "${randomLine}q;d" "${config_path}"/ascii | cut -d= -f1)
randomName=$(sed "${randomLine}q;d" "${config_path}"/unicode | cut -d= -f1)
}

# Function that picks a random emoticon
Expand All @@ -122,9 +122,9 @@ randomEmoticon() {
# Function that creates a list of the available emoticons
listEmoticons() {
# Repeat for every single line
for (( c=2; c<=ASCII_LINES; c++ )); do
for (( c=2; c<=UNICODE_LINES; c++ )); do
# Read emoticon's name
name=$(sed "${c}q;d" "${config_path}"/ascii | cut -d= -f1)
name=$(sed "${c}q;d" "${config_path}"/unicode | cut -d= -f1)

# Print the name followed by the emoticon itself
printf -- '%b:\n%b\n\n' "${name}" "${!name}"
Expand Down Expand Up @@ -199,10 +199,10 @@ main() {
setupClipboard

# Fetch all emoticons from the file
source "${config_path}"/ascii
source "${config_path}"/unicode

# Store the number of emoticons in a variable
ASCII_LINES=$(wc -l < "${config_path}"/ascii)
UNICODE_LINES=$(wc -l < "${config_path}"/unicode)

case "${1}" in
(--emoticons|-e) listEmoticons ;;
Expand Down
File renamed without changes.

0 comments on commit c77276f

Please sign in to comment.