diff --git a/.gitignore b/.gitignore index 6e6d7a1..5be8612 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,7 @@ dist .* openrefine_client.egg-info refine.spec +openrefine-2.* openrefine-3.* +openrefine-client_* tests.log diff --git a/tests.sh b/tests.sh index cd7047f..34b6491 100755 --- a/tests.sh +++ b/tests.sh @@ -20,14 +20,22 @@ cd "${BASH_SOURCE%/*}/" || exit 1 +port=3334 + if [[ ${1} ]]; then version="${1}" else version="3.2" fi - refine="openrefine-${version}/refine" +if [[ ${2} ]]; then + client="$(readlink -e "${2}")" +else + client="python3 $(readlink -e refine.py)" +fi +cmd="${client} -H localhost -P ${port}" + # =============================== REQUIREMENTS =============================== # # check existence of java and cURL @@ -66,7 +74,7 @@ mkdir -p "${dir}" rm -f tests.log echo "start OpenRefine server..." -${refine} -v warn -p 3334 -d "${dir}" &>> tests.log & +${refine} -v warn -p ${port} -d "${dir}" &>> tests.log & pid_server=${!} timeout 30s bash -c "until curl -s 'http://localhost:3334' \ | cat | grep -q -o 'OpenRefine' ; do sleep 1; done" \ @@ -81,16 +89,23 @@ results=() for t in tests/*.sh; do tests+=("${t}") echo "========================= ${t} =========================" &>> tests.log - ${t} ${version} >> tests.log + ${t} "${cmd}" "${version}" &>> tests.log results+=(${?}) done echo +# ================================= TEARDOWN ================================= # + +echo "cleanup..." +{ kill -9 "${pid_server}" && wait "${pid_server}"; } 2>/dev/null +rm -rf "${dir}" +echo + # ================================= SUMMARY ================================== # +printf "%s\t%s\n" "code" "test" +printf "%s\t%s\n" "----" "----------------" for i in "${!tests[@]}"; do - printf "%s\t%s\n" "code" "test" - printf "%s\t%s\n" "----" "----------------" printf "%s\t%s\n" "${results[$i]}" "${tests[$i]}" done echo @@ -99,9 +114,3 @@ if [[ " ${results[*]} " =~ [1-9] ]]; then else echo "all tests passed!"; echo fi - -# ================================= TEARDOWN ================================= # - -echo "cleanup..." -{ kill -9 "${pid_server}" && wait "${pid_server}"; } 2>/dev/null -rm -rf "${dir}" diff --git a/tests/apply-utf8.sh b/tests/apply-utf8.sh new file mode 100755 index 0000000..750dff9 --- /dev/null +++ b/tests/apply-utf8.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +a,b,c +1,2,3 +0,0,0 +$,\,' +DATA + +cat << "DATA" > "tmp/${t}/${t}.transform" +[ + { + "op": "core/column-addition", + "engineConfig": { + "mode": "row-based" + }, + "newColumnName": "apply", + "columnInsertIndex": 2, + "baseColumnName": "b", + "expression": "grel:value.replace('2','٩(͡๏̯͡๏)۶')", + "onError": "set-to-blank" + } +] +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +a b apply c +1 2 ٩(͡๏̯͡๏)۶ 3 +0 0 0 0 +$ \ \ ' +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --apply "tmp/${t}/${t}.transform" "${t}" +${cmd} --export "${t}" --output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/apply.sh b/tests/apply.sh new file mode 100755 index 0000000..dfdb73a --- /dev/null +++ b/tests/apply.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +a,b,c +1,2,3 +0,0,0 +$,\,' +DATA + +cat << "DATA" > "tmp/${t}/${t}.transform" +[ + { + "op": "core/column-addition", + "engineConfig": { + "mode": "row-based" + }, + "newColumnName": "apply", + "columnInsertIndex": 2, + "baseColumnName": "b", + "expression": "grel:value.replace('2','TEST')", + "onError": "set-to-blank" + } +] +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +a b apply c +1 2 TEST 3 +0 0 0 0 +$ \ \ ' +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --apply "tmp/${t}/${t}.transform" "${t}" +${cmd} --export "${t}" --output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/cli_bash.ipynb b/tests/cli_bash.ipynb deleted file mode 100644 index 5e4ca86..0000000 --- a/tests/cli_bash.ipynb +++ /dev/null @@ -1,819 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Test executable in a Linux Bash environment" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install\n", - "\n", - "This notebook requires a [Bash kernel](https://github.com/takluyver/bash_kernel) environment and an OpenRefine server running at http://127.0.0.1:3333." - ] - }, - { - "cell_type": "code", - "execution_count": 49, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/tmp/20190822_013937\n" - ] - } - ], - "source": [ - "workspace=$(date +%Y%m%d_%H%M%S)\n", - "mkdir -p /tmp/$workspace\n", - "cp -r data /tmp/$workspace\n", - "cd /tmp/$workspace && pwd" - ] - }, - { - "cell_type": "code", - "execution_count": 50, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://github.com/opencultureconsulting/openrefine-client/releases/download/v0.3.8/openrefine-client_0-3-8_linux:\n", - "2019-08-22 01:39:40 ERROR 404: Not Found.\n" - ] - } - ], - "source": [ - "wget -nv https://github.com/opencultureconsulting/openrefine-client/releases/download/v0.3.8/openrefine-client_0-3-8_linux -O openrefine-client\n", - "chmod +x openrefine-client" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## README.MD" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Download" - ] - }, - { - "cell_type": "code", - "execution_count": 51, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Download to file duplicates.csv complete\n" - ] - } - ], - "source": [ - "./openrefine-client --download \"https://git.io/fj5hF\" --output=duplicates.csv" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Create" - ] - }, - { - "cell_type": "code", - "execution_count": 52, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2334935475634\n", - "rows: 10\n" - ] - } - ], - "source": [ - "./openrefine-client --create duplicates.csv" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### List" - ] - }, - { - "cell_type": "code", - "execution_count": 53, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " 2334935475634: duplicates\n" - ] - } - ], - "source": [ - "./openrefine-client --list" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Info" - ] - }, - { - "cell_type": "code", - "execution_count": 54, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " id: 2334935475634\n", - " url: http://127.0.0.1:3333/project?project=2334935475634\n", - " name: duplicates\n", - " modified: 2019-08-21T23:40:30Z\n", - " created: 2019-08-21T23:40:30Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'duplicates.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n" - ] - } - ], - "source": [ - "./openrefine-client --info \"duplicates\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Export" - ] - }, - { - "cell_type": "code", - "execution_count": 55, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "email\tname\tstate\tgender\tpurchase\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\tiPhone\n", - "danny.baron@example1.com\tD. Baron\tCA\tM\tWinter jacket\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\n", - "danny.baron@example1.com\tDaniel Baron\tCA\tM\tBike\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\tiPad\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\n" - ] - } - ], - "source": [ - "./openrefine-client --export \"duplicates\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Apply" - ] - }, - { - "cell_type": "code", - "execution_count": 56, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Download to file duplicates-deletion.json complete\n" - ] - } - ], - "source": [ - "./openrefine-client --download \"https://git.io/fj5ju\" --output=duplicates-deletion.json" - ] - }, - { - "cell_type": "code", - "execution_count": 57, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "File duplicates-deletion.json has been successfully applied to project 2334935475634\n" - ] - } - ], - "source": [ - "./openrefine-client --apply duplicates-deletion.json \"duplicates\"" - ] - }, - { - "cell_type": "code", - "execution_count": 58, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "email\tcount\tname\tstate\tgender\tpurchase\n", - "arthur.duff@example4.com\t2\tArthur Duff\tOR\tM\tDining table\n", - "ben.morisson@example6.org\t1\tBen Morisson\tFL\tM\tAmplifier\n", - "ben.tyler@example3.org\t1\tBen Tyler\tNV\tM\tFlashlight\n", - "danny.baron@example1.com\t3\tDanny Baron\tCA\tM\tTV\n", - "jean.griffith@example5.org\t1\tJean Griffith\tWA\tF\tPower drill\n", - "melanie.white@example2.edu\t2\tMelanie White\tNC\tF\tiPhone\n" - ] - } - ], - "source": [ - "./openrefine-client --export \"duplicates\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Export XLS" - ] - }, - { - "cell_type": "code", - "execution_count": 59, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to file deduped.xls complete\n" - ] - } - ], - "source": [ - "./openrefine-client --export \"duplicates\" --output deduped.xls" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Delete" - ] - }, - { - "cell_type": "code", - "execution_count": 60, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 2334935475634 has been successfully deleted\n" - ] - } - ], - "source": [ - "./openrefine-client --delete \"duplicates\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Templating" - ] - }, - { - "cell_type": "code", - "execution_count": 61, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1633409429491\n", - "rows: 10\n" - ] - } - ], - "source": [ - "./openrefine-client --create duplicates.csv --projectName=advanced" - ] - }, - { - "cell_type": "code", - "execution_count": 62, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ \"events\" : [\n", - " { \"name\" : \"Melanie White\", \"purchase\" : \"iPhone\" },\n", - " { \"name\" : \"Jean Griffith\", \"purchase\" : \"Power drill\" },\n", - " { \"name\" : \"Melanie White\", \"purchase\" : \"iPad\" }\n", - "] }" - ] - } - ], - "source": [ - "./openrefine-client --export \"advanced\" \\\n", - "--prefix='{ \"events\" : [\n", - "' \\\n", - "--template=' { \"name\" : {{jsonize(cells[\"name\"].value)}}, \"purchase\" : {{jsonize(cells[\"purchase\"].value)}} }' \\\n", - "--rowSeparator=',\n", - "' \\\n", - "--suffix='\n", - "] }' \\\n", - "--filterQuery='^F$' \\\n", - "--filterColumn='gender'" - ] - }, - { - "cell_type": "code", - "execution_count": 63, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to files complete. Last file: advanced_3.json\n" - ] - } - ], - "source": [ - "./openrefine-client --export \"advanced\" \\\n", - "--prefix='{ \"events\" : [\n", - "' \\\n", - "--template=' { \"name\" : {{jsonize(cells[\"name\"].value)}}, \"purchase\" : {{jsonize(cells[\"purchase\"].value)}} }' \\\n", - "--rowSeparator=',\n", - "' \\\n", - "--suffix='\n", - "] }' \\\n", - "--filterQuery='^F$' \\\n", - "--filterColumn='gender' \\\n", - "--output=advanced.json \\\n", - "--splitToFiles=true" - ] - }, - { - "cell_type": "code", - "execution_count": 64, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to files complete. Last file: advanced_melanie.white@example2.edu.json\n" - ] - } - ], - "source": [ - "./openrefine-client --export \"advanced\" \\\n", - "--prefix='{ \"events\" : [\n", - "' \\\n", - "--template=' { \"name\" : {{jsonize(cells[\"name\"].value)}}, \"purchase\" : {{jsonize(cells[\"purchase\"].value)}} }' \\\n", - "--rowSeparator=',\n", - "' \\\n", - "--suffix='\n", - "] }' \\\n", - "--filterQuery='^F$' \\\n", - "--filterColumn='gender' \\\n", - "--output=advanced.json \\\n", - "--splitToFiles=true \\\n", - "--suffixById=true" - ] - }, - { - "cell_type": "code", - "execution_count": 65, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "advanced_1.json \u001b[0m\u001b[38;5;33mdata\u001b[0m\n", - "advanced_2.json deduped.xls\n", - "advanced_3.json duplicates.csv\n", - "advanced_jean.griffith@example5.org.json duplicates-deletion.json\n", - "advanced_melanie.white@example2.edu.json \u001b[38;5;40mopenrefine-client\u001b[0m\n" - ] - } - ], - "source": [ - "ls" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Delete" - ] - }, - { - "cell_type": "code", - "execution_count": 66, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 1633409429491 has been successfully deleted\n" - ] - } - ], - "source": [ - "./openrefine-client --delete \"advanced\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Unicode" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### fruits" - ] - }, - { - "cell_type": "code", - "execution_count": 67, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2280962953279\n", - "rows: 5\n", - " id: 2280962953279\n", - " url: http://127.0.0.1:3333/project?project=2280962953279\n", - " name: evil-fruits\n", - " modified: 2019-08-21T23:40:43Z\n", - " created: 2019-08-21T23:40:43Z\n", - " rowCount: 5\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/evil-fruits.tsv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'evil-fruits', u'processQuotes': True, u'limit': -1, u'trimStrings': False, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: 🔣\n", - " column 002: code\n", - " column 003: meaning\n", - "🔣\tcode\tmeaning\n", - "🍇\t1F347\tGRAPES\n", - "🍉\t1F349\tWATERMELON\n", - "🍒\t1F352\tCHERRIES\n", - "🍓\t1F353\tSTRAWBERRY\n", - "🍍\t1F34D\tPINEAPPLE\n" - ] - } - ], - "source": [ - "./openrefine-client --create data/cli/evil-fruits.tsv\n", - "./openrefine-client --info \"evil-fruits\"\n", - "./openrefine-client --export \"evil-fruits\"" - ] - }, - { - "cell_type": "code", - "execution_count": 68, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to file emojis.csv complete\n", - "🔣,code,meaning\n", - "🍇,1F347,GRAPES\n", - "🍉,1F349,WATERMELON\n", - "🍒,1F352,CHERRIES\n", - "🍓,1F353,STRAWBERRY\n", - "🍍,1F34D,PINEAPPLE\n" - ] - } - ], - "source": [ - "./openrefine-client --export \"evil-fruits\" --output emojis.csv\n", - "cat emojis.csv" - ] - }, - { - "cell_type": "code", - "execution_count": 69, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ \"emojis\" : [\n", - " { \"symbol\" : \"🍇\", \"meaning\" : \"GRAPES\" },\n", - " { \"symbol\" : \"🍉\", \"meaning\" : \"WATERMELON\" },\n", - " { \"symbol\" : \"🍍\", \"meaning\" : \"PINEAPPLE\" }\n", - "] }" - ] - } - ], - "source": [ - "./openrefine-client --export \"evil-fruits\" \\\n", - "--prefix='{ \"emojis\" : [\n", - "' \\\n", - "--template=' { \"symbol\" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, \"meaning\" : {{jsonize(cells[\"meaning\"].value)}} }' \\\n", - "--rowSeparator=',\n", - "' \\\n", - "--suffix='\n", - "] }' \\\n", - "--filterQuery='^1F34' \\\n", - "--filterColumn='code'" - ] - }, - { - "cell_type": "code", - "execution_count": 70, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to files complete. Last file: trái cây_3.json\n" - ] - } - ], - "source": [ - "./openrefine-client --export \"evil-fruits\" \\\n", - "--prefix='{ \"emojis\" : [\n", - "' \\\n", - "--template=' { \"symbol\" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, \"meaning\" : {{jsonize(cells[\"meaning\"].value)}} }' \\\n", - "--rowSeparator=',\n", - "' \\\n", - "--suffix='\n", - "] }' \\\n", - "--filterQuery='^1F34' \\\n", - "--filterColumn='code' \\\n", - "--output='trái cây.json' \\\n", - "--splitToFiles=true" - ] - }, - { - "cell_type": "code", - "execution_count": 71, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to files complete. Last file: trái cây_🍍.json\n" - ] - } - ], - "source": [ - "./openrefine-client --export \"evil-fruits\" \\\n", - "--prefix='{ \"emojis\" : [\n", - "' \\\n", - "--template=' { \"symbol\" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, \"meaning\" : {{jsonize(cells[\"meaning\"].value)}} }' \\\n", - "--rowSeparator=',\n", - "' \\\n", - "--suffix='\n", - "] }' \\\n", - "--filterQuery='^1F34' \\\n", - "--filterColumn='code' \\\n", - "--output='trái cây.json' \\\n", - "--splitToFiles=true \\\n", - "--suffixById=true" - ] - }, - { - "cell_type": "code", - "execution_count": 72, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " advanced_1.json emojis.csv\n", - " advanced_2.json \u001b[0m\u001b[38;5;40mopenrefine-client\u001b[0m\n", - " advanced_3.json 'trái cây_1.json'\n", - " advanced_jean.griffith@example5.org.json 'trái cây_2.json'\n", - " advanced_melanie.white@example2.edu.json 'trái cây_3.json'\n", - " \u001b[38;5;33mdata\u001b[0m 'trái cây_🍇.json'\n", - " deduped.xls 'trái cây_🍉.json'\n", - " duplicates.csv 'trái cây_🍍.json'\n", - " duplicates-deletion.json\n" - ] - } - ], - "source": [ - "ls" - ] - }, - { - "cell_type": "code", - "execution_count": 73, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 2280962953279 has been successfully deleted\n" - ] - } - ], - "source": [ - "./openrefine-client --delete \"evil-fruits\"" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### emoji-data" - ] - }, - { - "cell_type": "code", - "execution_count": 74, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2019865211741\n", - "rows: 20\n", - " id: 2019865211741\n", - " url: http://127.0.0.1:3333/project?project=2019865211741\n", - " name: dữ liệu biểu tượng cảm xúc\n", - " modified: 2019-08-21T23:41:06Z\n", - " created: 2019-08-21T23:41:06Z\n", - " rowCount: 20\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/d\\u1eef li\\u1ec7u bi\\u1ec3u t\\u01b0\\u1ee3ng c\\u1ea3m x\\xfac.txt', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'd\\u1eef li\\u1ec7u bi\\u1ec3u t\\u01b0\\u1ee3ng c\\u1ea3m x\\xfac', u'processQuotes': True, u'skipDataLines': 34, u'limit': 20, u'trimStrings': False, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False, u'headerLines': 0}]\n", - " column 001: Column 1\n", - " column 002: Column 2\n", - " column 003: Column 3\n", - " column 004: Column 4\n", - " column 005: Column 5\n", - " column 006: Column 6\n", - "Column 1\tColumn 2\tColumn 3\tColumn 4\tColumn 5\tColumn 6\n", - "00A9 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (©) COPYRIGHT SIGN\n", - "00AE ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (®) REGISTERED SIGN\n", - "203C ;\ttext ;\tL1 ;\tnone ;\ta j\t# V1.1 (‼) DOUBLE EXCLAMATION MARK\n", - "2049 ;\ttext ;\tL1 ;\tnone ;\ta j\t# V3.0 (⁉) EXCLAMATION QUESTION MARK\n", - "2122 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (™) TRADE MARK SIGN\n", - "2139 ;\ttext ;\tL1 ;\tnone ;\tj\t# V3.0 (ℹ) INFORMATION SOURCE\n", - "2194 ;\ttext ;\tL1 ;\tnone ;\tz j\t# V1.1 (↔) LEFT RIGHT ARROW\n", - "2195 ;\ttext ;\tL1 ;\tnone ;\tz j\t# V1.1 (↕) UP DOWN ARROW\n", - "2196 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↖) NORTH WEST ARROW\n", - "2197 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↗) NORTH EAST ARROW\n", - "2198 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↘) SOUTH EAST ARROW\n", - "2199 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↙) SOUTH WEST ARROW\n", - "21A9 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↩) LEFTWARDS ARROW WITH HOOK\n", - "21AA ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↪) RIGHTWARDS ARROW WITH HOOK\n", - "231A ;\temoji ;\tL1 ;\tnone ;\tj\t# V1.1 (⌚) WATCH\n", - "231B ;\temoji ;\tL1 ;\tnone ;\tj\t# V1.1 (⌛) HOURGLASS\n", - "2328 ;\ttext ;\tL2 ;\tnone ;\tx\t# V1.1 (⌨) KEYBOARD\n", - "23CF ;\ttext ;\tL2 ;\tnone ;\tx\t# V4.0 (⏏) EJECT SYMBOL\n", - "23E9 ;\temoji ;\tL1 ;\tnone ;\tj w\t# V6.0 (⏩) BLACK RIGHT-POINTING DOUBLE TRIANGLE\n", - "23EA ;\temoji ;\tL1 ;\tnone ;\tj w\t# V6.0 (⏪) BLACK LEFT-POINTING DOUBLE TRIANGLE\n" - ] - } - ], - "source": [ - "./openrefine-client --create \"data/cli/dữ liệu biểu tượng cảm xúc.txt\" \\\n", - "--format=tsv \\\n", - "--headerLines=0 \\\n", - "--skipDataLines=34 \\\n", - "--limit=20\n", - "./openrefine-client --info \"dữ liệu biểu tượng cảm xúc\"\n", - "./openrefine-client --export \"dữ liệu biểu tượng cảm xúc\"" - ] - }, - { - "cell_type": "code", - "execution_count": 75, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " 2019865211741: dữ liệu biểu tượng cảm xúc\n" - ] - } - ], - "source": [ - "./openrefine-client --list" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Delete" - ] - }, - { - "cell_type": "code", - "execution_count": 76, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 2019865211741 has been successfully deleted\n" - ] - } - ], - "source": [ - "./openrefine-client --delete \"dữ liệu biểu tượng cảm xúc\"" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Bash", - "language": "bash", - "name": "bash" - }, - "language_info": { - "codemirror_mode": "shell", - "file_extension": ".sh", - "mimetype": "text/x-sh", - "name": "bash" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/tests/cli_python2.ipynb b/tests/cli_python2.ipynb deleted file mode 100644 index 933ea3c..0000000 --- a/tests/cli_python2.ipynb +++ /dev/null @@ -1,2824 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Test module cli in a Python 2 environment" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Install\n", - "\n", - "This notebook requires a Python 2.7 environment and an OpenRefine server running at http://127.0.0.1:3333." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[33mDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support\u001b[0m\n", - "Processing /home/felix/git/openrefine-client\n", - "Requirement already satisfied, skipping upgrade: urllib2_file in /home/felix/.local/lib/python2.7/site-packages (from openrefine-client==0.3.7) (0.2.1)\n", - "Installing collected packages: openrefine-client\n", - " Found existing installation: openrefine-client 0.3.7\n", - " Uninstalling openrefine-client-0.3.7:\n", - " Successfully uninstalled openrefine-client-0.3.7\n", - " Running setup.py install for openrefine-client ... \u001b[?25ldone\n", - "\u001b[?25hSuccessfully installed openrefine-client-0.3.7\n" - ] - } - ], - "source": [ - "import sys\n", - "!{sys.executable} -m pip install .. --user --upgrade" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/tmp/tmp24HyYg\n" - ] - } - ], - "source": [ - "import tempfile\n", - "import shutil\n", - "import os\n", - "dirpath = tempfile.mkdtemp()\n", - "shutil.copytree('data',dirpath + '/data')\n", - "print(dirpath)\n", - "os.chdir(dirpath)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "from google.refine import cli" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## README.md" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Download" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Download to file duplicates.csv complete\n" - ] - } - ], - "source": [ - "cli.download('https://git.io/fj5hF','duplicates.csv')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Create" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2019539621291\n", - "rows: 10\n" - ] - } - ], - "source": [ - "p1 = cli.create('duplicates.csv')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### List" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " 2019539621291: duplicates\n" - ] - } - ], - "source": [ - "cli.ls()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Info" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " id: 2019539621291\n", - " url: http://127.0.0.1:3333/project?project=2019539621291\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:03Z\n", - " created: 2019-08-21T23:31:02Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'duplicates.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n" - ] - } - ], - "source": [ - "cli.info(p1.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Export" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "email\tname\tstate\tgender\tpurchase\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\tiPhone\n", - "danny.baron@example1.com\tD. Baron\tCA\tM\tWinter jacket\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\n", - "danny.baron@example1.com\tDaniel Baron\tCA\tM\tBike\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\tiPad\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\n" - ] - } - ], - "source": [ - "cli.export(p1.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Apply" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Download to file duplicates-deletion.json complete\n" - ] - } - ], - "source": [ - "cli.download('https://git.io/fj5ju','duplicates-deletion.json')" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "File duplicates-deletion.json has been successfully applied to project 2019539621291\n" - ] - } - ], - "source": [ - "cli.apply(p1.project_id, 'duplicates-deletion.json')" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "email\tcount\tname\tstate\tgender\tpurchase\n", - "arthur.duff@example4.com\t2\tArthur Duff\tOR\tM\tDining table\n", - "ben.morisson@example6.org\t1\tBen Morisson\tFL\tM\tAmplifier\n", - "ben.tyler@example3.org\t1\tBen Tyler\tNV\tM\tFlashlight\n", - "danny.baron@example1.com\t3\tDanny Baron\tCA\tM\tTV\n", - "jean.griffith@example5.org\t1\tJean Griffith\tWA\tF\tPower drill\n", - "melanie.white@example2.edu\t2\tMelanie White\tNC\tF\tiPhone\n" - ] - } - ], - "source": [ - "cli.export(p1.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Export XLS" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "email\tcount\tname\tstate\tgender\tpurchase\n", - "arthur.duff@example4.com\t2\tArthur Duff\tOR\tM\tDining table\n", - "ben.morisson@example6.org\t1\tBen Morisson\tFL\tM\tAmplifier\n", - "ben.tyler@example3.org\t1\tBen Tyler\tNV\tM\tFlashlight\n", - "danny.baron@example1.com\t3\tDanny Baron\tCA\tM\tTV\n", - "jean.griffith@example5.org\t1\tJean Griffith\tWA\tF\tPower drill\n", - "melanie.white@example2.edu\t2\tMelanie White\tNC\tF\tiPhone\n" - ] - } - ], - "source": [ - "cli.export(p1.project_id, 'deduped.xls')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Delete" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 2019539621291 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p1.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Templating" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1716843473792\n", - "rows: 10\n" - ] - } - ], - "source": [ - "p2 = cli.create('duplicates.csv')" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ \"events\" : [\n", - " { \"name\" : \"Melanie White\", \"purchase\" : \"iPhone\" },\n", - " { \"name\" : \"Jean Griffith\", \"purchase\" : \"Power drill\" },\n", - " { \"name\" : \"Melanie White\", \"purchase\" : \"iPad\" }\n", - "] }" - ] - } - ], - "source": [ - "cli.templating(p2.project_id,\n", - "prefix='''{ \"events\" : [\n", - "''',\n", - "template=' { \"name\" : {{jsonize(cells[\"name\"].value)}}, \"purchase\" : {{jsonize(cells[\"purchase\"].value)}} }',\n", - "rowSeparator=''',\n", - "''',\n", - "suffix='''\n", - "] }''',\n", - "filterQuery='^F$',\n", - "filterColumn='gender')" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to files complete. Last file: advanced_3.json\n" - ] - } - ], - "source": [ - "cli.templating(p2.project_id,\n", - "prefix='''{ \"events\" : [\n", - "''',\n", - "template=' { \"name\" : {{jsonize(cells[\"name\"].value)}}, \"purchase\" : {{jsonize(cells[\"purchase\"].value)}} }',\n", - "rowSeparator=''',\n", - "''',\n", - "suffix='''\n", - "] }''',\n", - "filterQuery='^F$',\n", - "filterColumn='gender',\n", - "output_file='advanced.json',\n", - "splitToFiles=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to files complete. Last file: advanced_melanie.white@example2.edu.json\n" - ] - } - ], - "source": [ - "cli.templating(p2.project_id,\n", - "prefix='''{ \"events\" : [\n", - "''',\n", - "template=' { \"name\" : {{jsonize(cells[\"name\"].value)}}, \"purchase\" : {{jsonize(cells[\"purchase\"].value)}} }',\n", - "rowSeparator=''',\n", - "''',\n", - "suffix='''\n", - "] }''',\n", - "filterQuery='^F$',\n", - "filterColumn='gender',\n", - "output_file='advanced.json',\n", - "splitToFiles=True,\n", - "suffixById=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['advanced_jean.griffith@example5.org.json',\n", - " 'advanced_melanie.white@example2.edu.json',\n", - " 'advanced_3.json',\n", - " 'advanced_2.json',\n", - " 'advanced_1.json',\n", - " 'duplicates-deletion.json',\n", - " 'duplicates.csv',\n", - " 'data']" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "os.listdir(os.getcwd())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Delete" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 1716843473792 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p2.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Unicode" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### fruits" - ] - }, - { - "cell_type": "code", - "execution_count": 62, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1929957235590\n", - "rows: 5\n", - " id: 1929957235590\n", - " url: http://127.0.0.1:3333/project?project=1929957235590\n", - " name: evil-fruits\n", - " modified: 2019-08-21T23:35:47Z\n", - " created: 2019-08-21T23:35:47Z\n", - " rowCount: 5\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/evil-fruits.tsv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'evil-fruits', u'processQuotes': True, u'limit': -1, u'trimStrings': False, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: 🔣\n", - " column 002: code\n", - " column 003: meaning\n", - "🔣\tcode\tmeaning\n", - "🍇\t1F347\tGRAPES\n", - "🍉\t1F349\tWATERMELON\n", - "🍒\t1F352\tCHERRIES\n", - "🍓\t1F353\tSTRAWBERRY\n", - "🍍\t1F34D\tPINEAPPLE\n" - ] - } - ], - "source": [ - "p1 = cli.create('data/cli/evil-fruits.tsv')\n", - "cli.info(p1.project_id)\n", - "cli.export(p1.project_id)" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to file emojis.csv complete\n", - "🔣,code,meaning\n", - "🍇,1F347,GRAPES\n", - "🍉,1F349,WATERMELON\n", - "🍒,1F352,CHERRIES\n", - "🍓,1F353,STRAWBERRY\n", - "🍍,1F34D,PINEAPPLE\n", - "\n" - ] - } - ], - "source": [ - "cli.export(p1.project_id, output_file='emojis.csv')\n", - "with open('emojis.csv', 'r') as f:\n", - " print(f.read())" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{ \"emojis\" : [\n", - " { \"symbol\" : \"🍇\", \"meaning\" : \"GRAPES\" },\n", - " { \"symbol\" : \"🍉\", \"meaning\" : \"WATERMELON\" },\n", - " { \"symbol\" : \"🍍\", \"meaning\" : \"PINEAPPLE\" }\n", - "] }" - ] - } - ], - "source": [ - "cli.templating(p1.project_id,\n", - "prefix='''{ \"emojis\" : [\n", - "''',\n", - "template=' { \"symbol\" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, \"meaning\" : {{jsonize(cells[\"meaning\"].value)}} }',\n", - "rowSeparator=''',\n", - "''',\n", - "suffix='''\n", - "] }''',\n", - "filterQuery='^1F34',\n", - "filterColumn='code')" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to files complete. Last file: trái cây_3.json\n" - ] - } - ], - "source": [ - "cli.templating(p1.project_id,\n", - "prefix='''{ \"emojis\" : [\n", - "''',\n", - "template=' { \"symbol\" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, \"meaning\" : {{jsonize(cells[\"meaning\"].value)}} }',\n", - "rowSeparator=''',\n", - "''',\n", - "suffix='''\n", - "] }''',\n", - "filterQuery='^1F34',\n", - "filterColumn='code',\n", - "output_file='trái cây.json',\n", - "splitToFiles=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Export to files complete. Last file: trái cây_🍍.json\n" - ] - } - ], - "source": [ - "cli.templating(p1.project_id,\n", - "prefix='''{ \"emojis\" : [\n", - "''',\n", - "template=' { \"symbol\" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, \"meaning\" : {{jsonize(cells[\"meaning\"].value)}} }',\n", - "rowSeparator=''',\n", - "''',\n", - "suffix='''\n", - "] }''',\n", - "filterQuery='^1F34',\n", - "filterColumn='code',\n", - "output_file='trái cây.json',\n", - "splitToFiles=True,\n", - "suffixById=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['tr\\xc3\\xa1i c\\xc3\\xa2y_\\xf0\\x9f\\x8d\\x8d.json',\n", - " 'tr\\xc3\\xa1i c\\xc3\\xa2y_\\xf0\\x9f\\x8d\\x89.json',\n", - " 'tr\\xc3\\xa1i c\\xc3\\xa2y_\\xf0\\x9f\\x8d\\x87.json',\n", - " 'tr\\xc3\\xa1i c\\xc3\\xa2y_3.json',\n", - " 'tr\\xc3\\xa1i c\\xc3\\xa2y_2.json',\n", - " 'tr\\xc3\\xa1i c\\xc3\\xa2y_1.json',\n", - " 'emojis.csv',\n", - " 'advanced_jean.griffith@example5.org.json',\n", - " 'advanced_melanie.white@example2.edu.json',\n", - " 'advanced_3.json',\n", - " 'advanced_2.json',\n", - " 'advanced_1.json',\n", - " 'duplicates-deletion.json',\n", - " 'duplicates.csv',\n", - " 'data']" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "os.listdir(os.getcwd())" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 2401578251107 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p1.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### emoji data" - ] - }, - { - "cell_type": "code", - "execution_count": 63, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2314250240290\n", - "rows: 20\n", - " id: 2314250240290\n", - " url: http://127.0.0.1:3333/project?project=2314250240290\n", - " name: dữ liệu biểu tượng cảm xúc\n", - " modified: 2019-08-21T23:36:05Z\n", - " created: 2019-08-21T23:36:05Z\n", - " rowCount: 20\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/d\\u1eef li\\u1ec7u bi\\u1ec3u t\\u01b0\\u1ee3ng c\\u1ea3m x\\xfac.txt', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'd\\u1eef li\\u1ec7u bi\\u1ec3u t\\u01b0\\u1ee3ng c\\u1ea3m x\\xfac', u'processQuotes': True, u'skipDataLines': 34, u'limit': 20, u'trimStrings': False, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False, u'headerLines': 0}]\n", - " column 001: Column 1\n", - " column 002: Column 2\n", - " column 003: Column 3\n", - " column 004: Column 4\n", - " column 005: Column 5\n", - " column 006: Column 6\n", - "Column 1\tColumn 2\tColumn 3\tColumn 4\tColumn 5\tColumn 6\n", - "00A9 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (©) COPYRIGHT SIGN\n", - "00AE ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (®) REGISTERED SIGN\n", - "203C ;\ttext ;\tL1 ;\tnone ;\ta j\t# V1.1 (‼) DOUBLE EXCLAMATION MARK\n", - "2049 ;\ttext ;\tL1 ;\tnone ;\ta j\t# V3.0 (⁉) EXCLAMATION QUESTION MARK\n", - "2122 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (™) TRADE MARK SIGN\n", - "2139 ;\ttext ;\tL1 ;\tnone ;\tj\t# V3.0 (ℹ) INFORMATION SOURCE\n", - "2194 ;\ttext ;\tL1 ;\tnone ;\tz j\t# V1.1 (↔) LEFT RIGHT ARROW\n", - "2195 ;\ttext ;\tL1 ;\tnone ;\tz j\t# V1.1 (↕) UP DOWN ARROW\n", - "2196 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↖) NORTH WEST ARROW\n", - "2197 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↗) NORTH EAST ARROW\n", - "2198 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↘) SOUTH EAST ARROW\n", - "2199 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↙) SOUTH WEST ARROW\n", - "21A9 ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↩) LEFTWARDS ARROW WITH HOOK\n", - "21AA ;\ttext ;\tL1 ;\tnone ;\tj\t# V1.1 (↪) RIGHTWARDS ARROW WITH HOOK\n", - "231A ;\temoji ;\tL1 ;\tnone ;\tj\t# V1.1 (⌚) WATCH\n", - "231B ;\temoji ;\tL1 ;\tnone ;\tj\t# V1.1 (⌛) HOURGLASS\n", - "2328 ;\ttext ;\tL2 ;\tnone ;\tx\t# V1.1 (⌨) KEYBOARD\n", - "23CF ;\ttext ;\tL2 ;\tnone ;\tx\t# V4.0 (⏏) EJECT SYMBOL\n", - "23E9 ;\temoji ;\tL1 ;\tnone ;\tj w\t# V6.0 (⏩) BLACK RIGHT-POINTING DOUBLE TRIANGLE\n", - "23EA ;\temoji ;\tL1 ;\tnone ;\tj w\t# V6.0 (⏪) BLACK LEFT-POINTING DOUBLE TRIANGLE\n" - ] - } - ], - "source": [ - "p1 = cli.create('data/cli/dữ liệu biểu tượng cảm xúc.txt',\n", - " project_format='tsv',\n", - " headerLines=0,\n", - " skipDataLines=34,\n", - " limit=20)\n", - "cli.info(p1.project_id)\n", - "cli.export(p1.project_id)" - ] - }, - { - "cell_type": "code", - "execution_count": 64, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " 2314250240290: dữ liệu biểu tượng cảm xúc\n", - " 1929957235590: evil-fruits\n" - ] - } - ], - "source": [ - "cli.ls()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Delete" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 1602939526221 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p1.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## CSV" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1675776970201\n", - "rows: 10\n", - " id: 1675776970201\n", - " url: http://127.0.0.1:3333/project?project=1675776970201\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:05Z\n", - " created: 2019-08-21T23:31:05Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺)\t1\tWed, 4 Jul 2001\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t\t1\t2001-07-04T12:08:56\n", - "danny.baron@example1.com\t\" D.\t(\"\"Tab\"\") Baron\"\tCA\tM\tWinter jacket\t1\t2001-07-04\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "danny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "Project 1675776970201 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### encoding\n", - "\n", - "check TV symbol in line 1" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2268199900543\n", - "rows: 10\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺)\t1\tWed, 4 Jul 2001\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t\t1\t2001-07-04T12:08:56\n", - "danny.baron@example1.com\t\" D.\t(\"\"Tab\"\") Baron\"\tCA\tM\tWinter jacket\t1\t2001-07-04\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "danny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "Project 2268199900543 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', encoding='ISO-8859-1')\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1798292162864\n", - "rows: 10\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺)\t1\tWed, 4 Jul 2001\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t\t1\t2001-07-04T12:08:56\n", - "danny.baron@example1.com\t\" D.\t(\"\"Tab\"\") Baron\"\tCA\tM\tWinter jacket\t1\t2001-07-04\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "danny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "Project 1798292162864 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', encoding='UTF-8')\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### guessCellValueTypes\n", - "\n", - "check OpenRefine GUI at url below: numbers should be green" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2351526371150\n", - "rows: 10\n", - " id: 2351526371150\n", - " url: http://127.0.0.1:3333/project?project=2351526371150\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:05Z\n", - " created: 2019-08-21T23:31:05Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': True, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', guessCellValueTypes=True)\n", - "cli.info(p.project_id)" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 2351526371150 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### headerLines\n", - "\n", - "check column names, should be Column 1..." - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1753036694840\n", - "rows: 11\n", - "Column 1\tColumn 2\tColumn 3\tColumn 4\tColumn 5\tColumn 6\tColumn 7\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺)\t1\tWed, 4 Jul 2001\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t\t1\t2001-07-04T12:08:56\n", - "danny.baron@example1.com\t\" D.\t(\"\"Tab\"\") Baron\"\tCA\tM\tWinter jacket\t1\t2001-07-04\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "danny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "Project 1753036694840 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', headerLines=0)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### ignoreLines\n", - "\n", - "check column names, should start with arthur.duff as header" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1567779238383\n", - "rows: 5\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "danny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "Project 1567779238383 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', ignoreLines=5)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### limit\n", - "\n", - "should contain 5 rows" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2236287775552\n", - "rows: 5\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺)\t1\tWed, 4 Jul 2001\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t\t1\t2001-07-04T12:08:56\n", - "danny.baron@example1.com\t\" D.\t(\"\"Tab\"\") Baron\"\tCA\tM\tWinter jacket\t1\t2001-07-04\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "Project 2236287775552 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', limit=5)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### separator and processQuotes\n", - "\n", - "should contain 10 rows and 2 columns (Column 2)" - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2493837924937\n", - "rows: 10\n", - "email,name,state,gender,purchase,count,date\tColumn 2\n", - "\"danny.baron@example1.com,Danny Baron,CA,M,TV (UTF-8: 📺),1,\"\"Wed, 4 Jul 2001\"\t\n", - "melanie.white@example2.edu,Melanie White,NC,F,,1,2001-07-04T12:08:56\t\n", - "danny.baron@example1.com, D.\t\"(\"\"Tab\"\") Baron,CA,M,Winter jacket,1,2001-07-04\"\n", - "ben.tyler@example3.org,Ben Tyler,NV,M,Flashlight,1,2001/07/04\t\n", - "arthur.duff@example4.com,Arthur Duff,OR,M,Dining table,1,2001-07\t\n", - "danny.baron@example1.com,Daniel Baron,,,Bike,1,2001\t\n", - "jean.griffith@example5.org,Jean Griffith,WA,F,Power drill,1,2000\t\n", - "melanie.white@example2.edu,Melanie White,NC,F,'iPad',1,1999\t\n", - "ben.morisson@example6.org,Ben Morisson,FL,M,Amplifier,1,1998\t\n", - "arthur.duff@example4.com,Arthur Duff,OR,M,Night table,1,1997\t\n", - "Project 2493837924937 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', separator=' ', processQuotes=False)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### projectName" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1568868311685\n", - "rows: 10\n", - " id: 1568868311685\n", - " url: http://127.0.0.1:3333/project?project=1568868311685\n", - " name: foo\n", - " modified: 2019-08-21T23:31:06Z\n", - " created: 2019-08-21T23:31:06Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'foo', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n", - "Project 1568868311685 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', projectName='foo')\n", - "cli.info(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### projectTags (introduced in OpenRefine 2.8)\n", - "\n", - "check manually at http://127.0.0.1:3333 > Open Project if tags where stored" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1889306695897\n", - "rows: 10\n", - " id: 1889306695897\n", - " url: http://127.0.0.1:3333/project?project=1889306695897\n", - " name: duplicates\n", - " tags: [u'client1', u'beta']\n", - " modified: 2019-08-21T23:31:06Z\n", - " created: 2019-08-21T23:31:06Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'projectTags': [u'client1', u'beta'], u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', projectTags=['client1', 'beta'])\n", - "cli.info(p.project_id)" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 1889306695897 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### skipDataLines\n", - "\n", - "should contain 5 rows" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1906416549071\n", - "rows: 5\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "Project 1906416549071 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', skipDataLines=5)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### storeBlankCellsAsNulls\n", - "\n", - "check OpenRefine GUI at url below:\n", - "* All > View > Show/Hide 'null' values in cells\n", - "* row 6 should contain null values in columns state and gender" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1641203332364\n", - "rows: 10\n", - " id: 1641203332364\n", - " url: http://127.0.0.1:3333/project?project=1641203332364\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:06Z\n", - " created: 2019-08-21T23:31:06Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': True, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', guessCellValueTypes=True)\n", - "cli.info(p.project_id)" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 1641203332364 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## TSV" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2332414205165\n", - "rows: 10\n", - " id: 2332414205165\n", - " url: http://127.0.0.1:3333/project?project=2332414205165\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:06Z\n", - " created: 2019-08-21T23:31:06Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.tsv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'limit': -1, u'trimStrings': False, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺)\t1\tWed, 4 Jul 2001\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t\t1\t2001-07-04T12:08:56\n", - "danny.baron@example1.com\t\"D.\t(\"\"Tab\"\") Baron\"\tCA\tM\tWinter jacket\t1\t2001-07-04\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "danny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "Project 2332414205165 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.tsv')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## JSON" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1978993820770\n", - "rows: 10\n", - " id: 1978993820770\n", - " url: http://127.0.0.1:3333/project?project=1978993820770\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:06Z\n", - " created: 2019-08-21T23:31:06Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.json', u'storeBlankRows': True, u'encoding': u'', u'recordPath': [u'_', u'_'], u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: _ - name\n", - " column 002: _ - date\n", - " column 003: _ - email\n", - " column 004: _ - state\n", - " column 005: _ - count\n", - " column 006: _ - gender\n", - " column 007: _ - purchase\n", - "_ - name\t_ - date\t_ - email\t_ - state\t_ - count\t_ - gender\t_ - purchase\n", - "Danny Baron\tWed, 4 Jul 2001\tdanny.baron@example1.com\tCA\t1\tM\tTV (UTF-8: 📺)\n", - "Melanie White\t2001-07-04T12:08:56\tmelanie.white@example2.edu\tNC\t1\tF\t\n", - "\" D.\t(\"\"Tab\"\") Baron\"\t2001-07-04\tdanny.baron@example1.com\tCA\t1\tM\tWinter jacket\n", - "Ben Tyler\t2001/07/04\tben.tyler@example3.org\tNV\t1\tM\tFlashlight\n", - "Arthur Duff\t2001-07\tarthur.duff@example4.com\tOR\t1\tM\tDining table\n", - "Daniel Baron\t2001\tdanny.baron@example1.com\t\t1\t\tBike\n", - "Jean Griffith\t2000\tjean.griffith@example5.org\tWA\t1\tF\tPower drill\n", - "Melanie White\t1999\tmelanie.white@example2.edu\tNC\t1\tF\t'iPad'\n", - "Ben Morisson\t1998\tben.morisson@example6.org\tFL\t1\tM\tAmplifier\n", - "Arthur Duff\t1997\tarthur.duff@example4.com\tOR\t1\tM\tNight table\n", - "Project 1978993820770 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.json')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### trimStrings (broken, does not work in the GUI either)\n", - "\n", - "check row 3 if spaces before `D.` are deleted" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1892692171021\n", - "rows: 10\n", - " id: 1892692171021\n", - " url: http://127.0.0.1:3333/project?project=1892692171021\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:07Z\n", - " created: 2019-08-21T23:31:06Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.json', u'storeBlankRows': True, u'encoding': u'', u'recordPath': [u'_', u'_'], u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': True, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: _ - name\n", - " column 002: _ - date\n", - " column 003: _ - email\n", - " column 004: _ - state\n", - " column 005: _ - count\n", - " column 006: _ - gender\n", - " column 007: _ - purchase\n", - "_ - name\t_ - date\t_ - email\t_ - state\t_ - count\t_ - gender\t_ - purchase\n", - "Danny Baron\tWed, 4 Jul 2001\tdanny.baron@example1.com\tCA\t1\tM\tTV (UTF-8: 📺)\n", - "Melanie White\t2001-07-04T12:08:56\tmelanie.white@example2.edu\tNC\t1\tF\t\n", - "\" D.\t(\"\"Tab\"\") Baron\"\t2001-07-04\tdanny.baron@example1.com\tCA\t1\tM\tWinter jacket\n", - "Ben Tyler\t2001/07/04\tben.tyler@example3.org\tNV\t1\tM\tFlashlight\n", - "Arthur Duff\t2001-07\tarthur.duff@example4.com\tOR\t1\tM\tDining table\n", - "Daniel Baron\t2001\tdanny.baron@example1.com\t\t1\t\tBike\n", - "Jean Griffith\t2000\tjean.griffith@example5.org\tWA\t1\tF\tPower drill\n", - "Melanie White\t1999\tmelanie.white@example2.edu\tNC\t1\tF\t'iPad'\n", - "Ben Morisson\t1998\tben.morisson@example6.org\tFL\t1\tM\tAmplifier\n", - "Arthur Duff\t1997\tarthur.duff@example4.com\tOR\t1\tM\tNight table\n", - "Project 1892692171021 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.json', trimStrings=True)\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### recordPath" - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1945894618034\n", - "rows: 10\n", - " id: 1945894618034\n", - " url: http://127.0.0.1:3333/project?project=1945894618034\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:07Z\n", - " created: 2019-08-21T23:31:07Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.json', u'storeBlankRows': True, u'encoding': u'', u'recordPath': [u'_', u'_', u'purchase'], u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: purchase\n", - "purchase\n", - "TV (UTF-8: 📺)\n", - "\n", - "Winter jacket\n", - "Flashlight\n", - "Dining table\n", - "Bike\n", - "Power drill\n", - "'iPad'\n", - "Amplifier\n", - "Night table\n", - "Project 1945894618034 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.json', recordPath=['_', '_', 'purchase'])\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### storeEmptyStrings\n", - "\n", - "default: True; set to False for null values\n", - "\n", - "check OpenRefine GUI at url below:\n", - "* All > View > Show/Hide 'null' values in cells\n", - "* row 6 should contain null values in columns state and gender" - ] - }, - { - "cell_type": "code", - "execution_count": 49, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2551263767214\n", - "rows: 10\n", - " id: 2551263767214\n", - " url: http://127.0.0.1:3333/project?project=2551263767214\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:07Z\n", - " created: 2019-08-21T23:31:07Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': False, u'fileSource': u'data/cli/duplicates.json', u'storeBlankRows': True, u'encoding': u'', u'recordPath': [u'_', u'_'], u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: _ - name\n", - " column 002: _ - date\n", - " column 003: _ - email\n", - " column 004: _ - count\n", - " column 005: _ - purchase\n", - " column 006: _ - state\n", - " column 007: _ - gender\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.json', storeEmptyStrings=False)\n", - "cli.info(p.project_id)" - ] - }, - { - "cell_type": "code", - "execution_count": 50, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 2551263767214 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## XML" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default" - ] - }, - { - "cell_type": "code", - "execution_count": 51, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1926835461545\n", - "rows: 80\n", - " id: 1926835461545\n", - " url: http://127.0.0.1:3333/project?project=1926835461545\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:07Z\n", - " created: 2019-08-21T23:31:07Z\n", - " rowCount: 80\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.xml', u'storeBlankRows': True, u'encoding': u'', u'recordPath': [u'root'], u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: root\n", - " column 002: root - record\n", - " column 003: root - record - name\n", - " column 004: root - record - date\n", - " column 005: root - record - email\n", - " column 006: root - record - count\n", - " column 007: root - record - purchase\n", - " column 008: root - record - state\n", - " column 009: root - record - gender\n", - "root\troot - record\troot - record - name\troot - record - date\troot - record - email\troot - record - count\troot - record - purchase\troot - record - state\troot - record - gender\n", - "\"\n", - " \"\t\"\n", - " \"\tDanny Baron\tWed, 4 Jul 2001\tdanny.baron@example1.com\t1\tTV (UTF-8: 📺)\tCA\tM\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\tMelanie White\t2001-07-04T12:08:56\tmelanie.white@example2.edu\t1\t\tNC\tF\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - "\"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\" D.\t(\"\"Tab\"\") Baron\"\t2001-07-04\tdanny.baron@example1.com\t1\tWinter jacket\tCA\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tBen Tyler\t2001/07/04\tben.tyler@example3.org\t1\tFlashlight\tNV\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tArthur Duff\t2001-07\tarthur.duff@example4.com\t1\tDining table\tOR\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tDaniel Baron\t2001\tdanny.baron@example1.com\t1\tBike\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tJean Griffith\t2000\tjean.griffith@example5.org\t1\tPower drill\tWA\tF\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tMelanie White\t1999\tmelanie.white@example2.edu\t1\t'iPad'\tNC\tF\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tBen Morisson\t1998\tben.morisson@example6.org\t1\tAmplifier\tFL\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tArthur Duff\t1997\tarthur.duff@example4.com\t1\tNight table\tOR\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "Project 1926835461545 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.xml')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### trimStrings (broken, does not work in the GUI either)\n", - "\n", - "check if spaces before `D.` are deleted" - ] - }, - { - "cell_type": "code", - "execution_count": 52, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1615744471501\n", - "rows: 80\n", - " id: 1615744471501\n", - " url: http://127.0.0.1:3333/project?project=1615744471501\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:07Z\n", - " created: 2019-08-21T23:31:07Z\n", - " rowCount: 80\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.xml', u'storeBlankRows': True, u'encoding': u'', u'recordPath': [u'root'], u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': True, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: root\n", - " column 002: root - record\n", - " column 003: root - record - name\n", - " column 004: root - record - date\n", - " column 005: root - record - email\n", - " column 006: root - record - count\n", - " column 007: root - record - purchase\n", - " column 008: root - record - state\n", - " column 009: root - record - gender\n", - "root\troot - record\troot - record - name\troot - record - date\troot - record - email\troot - record - count\troot - record - purchase\troot - record - state\troot - record - gender\n", - "\"\n", - " \"\t\"\n", - " \"\tDanny Baron\tWed, 4 Jul 2001\tdanny.baron@example1.com\t1\tTV (UTF-8: 📺)\tCA\tM\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - " \"\t\"\n", - " \"\tMelanie White\t2001-07-04T12:08:56\tmelanie.white@example2.edu\t1\t\tNC\tF\n", - "\"\n", - " \"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\"\n", - "\"\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\" D.\t(\"\"Tab\"\") Baron\"\t2001-07-04\tdanny.baron@example1.com\t1\tWinter jacket\tCA\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tBen Tyler\t2001/07/04\tben.tyler@example3.org\t1\tFlashlight\tNV\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tArthur Duff\t2001-07\tarthur.duff@example4.com\t1\tDining table\tOR\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tDaniel Baron\t2001\tdanny.baron@example1.com\t1\tBike\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tJean Griffith\t2000\tjean.griffith@example5.org\t1\tPower drill\tWA\tF\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tMelanie White\t1999\tmelanie.white@example2.edu\t1\t'iPad'\tNC\tF\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tBen Morisson\t1998\tben.morisson@example6.org\t1\tAmplifier\tFL\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\tArthur Duff\t1997\tarthur.duff@example4.com\t1\tNight table\tOR\tM\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "\t\"\n", - " \"\t\t\t\t\t\t\t\n", - "Project 1615744471501 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.xml', trimStrings=True)\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### recordPath" - ] - }, - { - "cell_type": "code", - "execution_count": 53, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1843370951454\n", - "rows: 10\n", - " id: 1843370951454\n", - " url: http://127.0.0.1:3333/project?project=1843370951454\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:07Z\n", - " created: 2019-08-21T23:31:07Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.xml', u'storeBlankRows': True, u'encoding': u'', u'recordPath': [u'root', u'record', u'purchase'], u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: purchase\n", - "purchase\n", - "TV (UTF-8: 📺)\n", - "\n", - "Winter jacket\n", - "Flashlight\n", - "Dining table\n", - "Bike\n", - "Power drill\n", - "'iPad'\n", - "Amplifier\n", - "Night table\n", - "Project 1843370951454 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.xml', recordPath=['root', 'record', 'purchase'])\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### storeEmptyStrings\n", - "\n", - "default: True; set to False for null values\n", - "\n", - "check OpenRefine GUI at url below:\n", - "* All > View > Show/Hide 'null' values in cells\n", - "* row 6 should contain null values in columns state and gender" - ] - }, - { - "cell_type": "code", - "execution_count": 54, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2549624481101\n", - "rows: 10\n", - " id: 2549624481101\n", - " url: http://127.0.0.1:3333/project?project=2549624481101\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:07Z\n", - " created: 2019-08-21T23:31:07Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': False, u'fileSource': u'data/cli/duplicates.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.csv', storeEmptyStrings=False)\n", - "cli.info(p.project_id)" - ] - }, - { - "cell_type": "code", - "execution_count": 55, - "metadata": { - "scrolled": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project 2549624481101 has been successfully deleted\n" - ] - } - ], - "source": [ - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## TXT" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default (line-based)" - ] - }, - { - "cell_type": "code", - "execution_count": 56, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2029778313736\n", - "rows: 11\n", - " id: 2029778313736\n", - " url: http://127.0.0.1:3333/project?project=2029778313736\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:07Z\n", - " created: 2019-08-21T23:31:07Z\n", - " rowCount: 11\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.txt', u'storeBlankRows': True, u'encoding': u'', u'ignoreLines': -1, u'projectName': u'duplicates', u'processQuotes': True, u'skipDataLines': -1, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False, u'headerLines': 0}]\n", - " column 001: Column 1\n", - "Column 1\n", - "email name state gender purchase count date \n", - "danny.baron@example1.com Danny Baron CA M TV (UTF-8: 📺) 1 Wed, 4 Jul 2001 \n", - "melanie.white@example2.edu Melanie White NC F 1 2001-07-04T12:08:5\n", - "\"danny.baron@example1.com D.\t(\"\"Tab\"\") Baron CA M Winter jacket 1 2001-07-04 \"\n", - "ben.tyler@example3.org Ben Tyler NV M Flashlight 1 2001/07/04 \n", - "arthur.duff@example4.com Arthur Duff OR M Dining table 1 2001-07 \n", - "danny.baron@example1.com Daniel Baron Bike 1 2001 \n", - "jean.griffith@example5.org Jean Griffith WA F Power drill 1 2000 \n", - "melanie.white@example2.edu Melanie White NC F 'iPad' 1 1999 \n", - "ben.morisson@example6.org Ben Morisson FL M Amplifier 1 1998 \n", - "arthur.duff@example4.com Arthur Duff OR M Night table 1 1997 \n", - "Project 2029778313736 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.txt')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### linesPerRow\n", - "\n", - "should return 6 rows in 2 columns" - ] - }, - { - "cell_type": "code", - "execution_count": 57, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1614710460265\n", - "rows: 6\n", - " id: 1614710460265\n", - " url: http://127.0.0.1:3333/project?project=1614710460265\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:08Z\n", - " created: 2019-08-21T23:31:08Z\n", - " rowCount: 6\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.txt', u'storeBlankRows': True, u'encoding': u'', u'ignoreLines': -1, u'projectName': u'duplicates', u'processQuotes': True, u'limit': -1, u'skipDataLines': -1, u'separator': u',', u'trimStrings': False, u'linesPerRow': 2, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False, u'headerLines': 0}]\n", - " column 001: Column 1\n", - " column 002: Column 2\n", - "Column 1\tColumn 2\n", - "email name state gender purchase count date \tdanny.baron@example1.com Danny Baron CA M TV (UTF-8: 📺) 1 Wed, 4 Jul 2001 \n", - "melanie.white@example2.edu Melanie White NC F 1 2001-07-04T12:08:5\t\"danny.baron@example1.com D.\t(\"\"Tab\"\") Baron CA M Winter jacket 1 2001-07-04 \"\n", - "ben.tyler@example3.org Ben Tyler NV M Flashlight 1 2001/07/04 \tarthur.duff@example4.com Arthur Duff OR M Dining table 1 2001-07 \n", - "danny.baron@example1.com Daniel Baron Bike 1 2001 \tjean.griffith@example5.org Jean Griffith WA F Power drill 1 2000 \n", - "melanie.white@example2.edu Melanie White NC F 'iPad' 1 1999 \tben.morisson@example6.org Ben Morisson FL M Amplifier 1 1998 \n", - "arthur.duff@example4.com Arthur Duff OR M Night table 1 1997 \t\n", - "Project 1614710460265 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.txt', linesPerRow=2)\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### fixed-width: columnWidths and headerLines" - ] - }, - { - "cell_type": "code", - "execution_count": 58, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 1729341878534\n", - "rows: 10\n", - " id: 1729341878534\n", - " url: http://127.0.0.1:3333/project?project=1729341878534\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:08Z\n", - " created: 2019-08-21T23:31:08Z\n", - " rowCount: 10\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'data/cli/duplicates.txt', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'limit': -1, u'separator': u',', u'trimStrings': False, u'columnWidths': [27, 21, 6, 7, 15, 6, 1000], u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False, u'headerLines': 1}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com \tDanny Baron \tCA \tM \tTV (UTF-8: 📺) \t1 \tWed, 4 Jul 2001 \n", - "melanie.white@example2.edu \tMelanie White \tNC \tF \t \t1 \t2001-07-04T12:08:5\n", - "danny.baron@example1.com \t\" D.\t(\"\"Tab\"\") Baron \"\tCA \tM \tWinter jacket \t1 \t2001-07-04 \n", - "ben.tyler@example3.org \tBen Tyler \tNV \tM \tFlashlight \t1 \t2001/07/04 \n", - "arthur.duff@example4.com \tArthur Duff \tOR \tM \tDining table \t1 \t2001-07 \n", - "danny.baron@example1.com \tDaniel Baron \t \t \tBike \t1 \t2001 \n", - "jean.griffith@example5.org \tJean Griffith \tWA \tF \tPower drill \t1 \t2000 \n", - "melanie.white@example2.edu \tMelanie White \tNC \tF \t'iPad' \t1 \t1999 \n", - "ben.morisson@example6.org \tBen Morisson \tFL \tM \tAmplifier \t1 \t1998 \n", - "arthur.duff@example4.com \tArthur Duff \tOR \tM \tNight table \t1 \t1997 \n", - "Project 1729341878534 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.txt', columnWidths=[27, 21, 6, 7, 15, 6, 1000], headerLines=1)\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## ZIP" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default\n", - "\n", - "should contain 16 rows" - ] - }, - { - "cell_type": "code", - "execution_count": 59, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2279718038457\n", - "rows: 16\n", - " id: 2279718038457\n", - " url: http://127.0.0.1:3333/project?project=2279718038457\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:08Z\n", - " created: 2019-08-21T23:31:08Z\n", - " rowCount: 16\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'duplicates2.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}, {u'storeEmptyStrings': True, u'fileSource': u'duplicates2.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': False}]\n", - " column 001: email\n", - " column 002: name\n", - " column 003: state\n", - " column 004: gender\n", - " column 005: purchase\n", - " column 006: count\n", - " column 007: date\n", - "email\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺)\t1\tWed, 4 Jul 2001\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t\t1\t2001-07-04T12:08:56\n", - "danny.baron@example1.com\t\" D.\t(\"\"Tab\"\") Baron\"\tCA\tM\tWinter jacket\t1\t2001-07-04\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "danny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "danny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺), Winter jacket, bike\t3\tWed, 4 Jul 2001, 2001-07-04, 2001\n", - "melanie.white@example2.edu\tMelanie White\tNC\tF\t, 'iPad'\t2\t2001-07-04T12:08:56, 1999\n", - "ben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "arthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table, Night table\t2\t2001-07, 1997\n", - "jean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "ben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "Project 2279718038457 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.zip')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### includeFileSources\n", - "\n", - "should contain column File" - ] - }, - { - "cell_type": "code", - "execution_count": 60, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "id: 2100283089198\n", - "rows: 16\n", - " id: 2100283089198\n", - " url: http://127.0.0.1:3333/project?project=2100283089198\n", - " name: duplicates\n", - " modified: 2019-08-21T23:31:08Z\n", - " created: 2019-08-21T23:31:08Z\n", - " rowCount: 16\n", - "importOptionMetadata: [{u'storeEmptyStrings': True, u'fileSource': u'duplicates2.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': True}, {u'storeEmptyStrings': True, u'fileSource': u'duplicates2.csv', u'storeBlankRows': True, u'encoding': u'', u'projectName': u'duplicates', u'processQuotes': True, u'separator': u',', u'trimStrings': False, u'limit': -1, u'storeBlankCellsAsNulls': True, u'guessCellValueTypes': False, u'includeFileSources': True}]\n", - " column 001: File\n", - " column 002: email\n", - " column 003: name\n", - " column 004: state\n", - " column 005: gender\n", - " column 006: purchase\n", - " column 007: count\n", - " column 008: date\n", - "File\temail\tname\tstate\tgender\tpurchase\tcount\tdate\n", - "duplicates.csv\tdanny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺)\t1\tWed, 4 Jul 2001\n", - "duplicates.csv\tmelanie.white@example2.edu\tMelanie White\tNC\tF\t\t1\t2001-07-04T12:08:56\n", - "duplicates.csv\tdanny.baron@example1.com\t\" D.\t(\"\"Tab\"\") Baron\"\tCA\tM\tWinter jacket\t1\t2001-07-04\n", - "duplicates.csv\tben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "duplicates.csv\tarthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table\t1\t2001-07\n", - "duplicates.csv\tdanny.baron@example1.com\tDaniel Baron\t\t\tBike\t1\t2001\n", - "duplicates.csv\tjean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "duplicates.csv\tmelanie.white@example2.edu\tMelanie White\tNC\tF\t'iPad'\t1\t1999\n", - "duplicates.csv\tben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "duplicates.csv\tarthur.duff@example4.com\tArthur Duff\tOR\tM\tNight table\t1\t1997\n", - "duplicates2.csv\tdanny.baron@example1.com\tDanny Baron\tCA\tM\tTV (UTF-8: 📺), Winter jacket, bike\t3\tWed, 4 Jul 2001, 2001-07-04, 2001\n", - "duplicates2.csv\tmelanie.white@example2.edu\tMelanie White\tNC\tF\t, 'iPad'\t2\t2001-07-04T12:08:56, 1999\n", - "duplicates2.csv\tben.tyler@example3.org\tBen Tyler\tNV\tM\tFlashlight\t1\t2001/07/04\n", - "duplicates2.csv\tarthur.duff@example4.com\tArthur Duff\tOR\tM\tDining table, Night table\t2\t2001-07, 1997\n", - "duplicates2.csv\tjean.griffith@example5.org\tJean Griffith\tWA\tF\tPower drill\t1\t2000\n", - "duplicates2.csv\tben.morisson@example6.org\tBen Morisson\tFL\tM\tAmplifier\t1\t1998\n", - "Project 2100283089198 has been successfully deleted\n" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.zip', includeFileSources=True)\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## ODS (broken in OpenRefine >=2.8)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default\n", - "\n", - "many blank columns and rows in OpenRefine <=2.7 (also with manual import via GUI)" - ] - }, - { - "cell_type": "code", - "execution_count": 61, - "metadata": {}, - "outputs": [ - { - "ename": "Exception", - "evalue": "Project not created", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mException\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcli\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'data/cli/duplicates.ods'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mcli\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minfo\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mproject_id\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mcli\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexport\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mproject_id\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mcli\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdelete\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mproject_id\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/home/felix/.local/lib/python2.7/site-packages/google/refine/cli.pyc\u001b[0m in \u001b[0;36mcreate\u001b[0;34m(project_file, project_format, columnWidths, encoding, guessCellValueTypes, headerLines, ignoreLines, includeFileSources, limit, linesPerRow, processQuotes, projectName, projectTags, recordPath, separator, sheets, skipDataLines, storeBlankCellsAsNulls, storeBlankRows, storeEmptyStrings, trimStrings)\u001b[0m\n\u001b[1;32m 125\u001b[0m \u001b[0mstore_blank_cells_as_nulls\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mstoreBlankCellsAsNulls\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0minclude_file_sources\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mincludeFileSources\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 127\u001b[0;31m **kwargs)\n\u001b[0m\u001b[1;32m 128\u001b[0m \u001b[0mrows\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mproject\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdo_json\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'get-rows'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'total'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 129\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrows\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/home/felix/.local/lib/python2.7/site-packages/google/refine/refine.pyc\u001b[0m in \u001b[0;36mnew_project\u001b[0;34m(self, project_file, project_url, project_name, project_format, encoding, separator, ignore_lines, header_lines, skip_data_lines, limit, store_blank_rows, guess_cell_value_types, process_quotes, store_blank_cells_as_nulls, include_file_sources, **opts)\u001b[0m\n\u001b[1;32m 279\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mRefineProject\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mserver\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mproject_id\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 280\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 281\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Project not created'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 282\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 283\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mException\u001b[0m: Project not created" - ] - } - ], - "source": [ - "p = cli.create('data/cli/duplicates.ods')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### sheets" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "first sheet from file with 2 sheets" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "p = cli.create('data/cli/duplicates2.ods', sheets=[0])\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "both sheets from file with 2 sheets: should contain 16 rows" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [ - "p = cli.create('data/cli/duplicates2.ods', sheets=[0, 1])\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## XLS (broken in OpenRefine >=2.8)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "p = cli.create('data/cli/duplicates.xls')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### sheets" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "first sheet from file with 2 sheets" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "p = cli.create('data/cli/duplicates2.xls', sheets=[0])\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "both sheets from file with 2 sheets: should contain 16 rows" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [ - "p = cli.create('data/cli/duplicates2.xls', sheets=[0, 1])\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## XLSX (broken in OpenRefine >=2.8)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### default" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "p = cli.create('data/cli/duplicates.xlsx')\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### sheets" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "first sheet from file with 2 sheets" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "p = cli.create('data/cli/duplicates2.xlsx', sheets=[0])\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "both sheets from file with 2 sheets: should contain 16 rows" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "scrolled": false - }, - "outputs": [], - "source": [ - "p = cli.create('data/cli/duplicates2.xlsx', sheets=[0, 1])\n", - "cli.info(p.project_id)\n", - "cli.export(p.project_id)\n", - "cli.delete(p.project_id)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.16" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/tests/create-csv.sh b/tests/create-csv.sh index 04c9dac..db81d9c 100755 --- a/tests/create-csv.sh +++ b/tests/create-csv.sh @@ -2,10 +2,14 @@ # =============================== ENVIRONMENT ================================ # -t="create-csv" +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi +t="$(basename "${BASH_SOURCE[0]}" .sh)" cd "${BASH_SOURCE%/*}/" || exit 1 -client="python3 ../refine.py -H localhost -P 3334" mkdir -p "tmp/${t}" # =================================== DATA =================================== # @@ -28,8 +32,8 @@ DATA # ================================== ACTION ================================== # -${client} --create "tmp/${t}/${t}.csv" -${client} --export "${t}" --output "tmp/${t}/${t}.output" +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" --output "tmp/${t}/${t}.output" # =================================== TEST =================================== # diff --git a/tests/create-utf8.sh b/tests/create-utf8.sh new file mode 100755 index 0000000..0fd14e4 --- /dev/null +++ b/tests/create-utf8.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +a,b,c +🍉,🍒,🍓 +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +a b c +🍉 🍒 🍓 +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" --projectName "${t} biểu tượng cảm xúc 🍉" +${cmd} --export "${t} biểu tượng cảm xúc 🍉" --output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/data/duplicates.csv b/tests/data/duplicates.csv index 7a79dfe..8fcb581 100644 --- a/tests/data/duplicates.csv +++ b/tests/data/duplicates.csv @@ -1,11 +1,11 @@ -email,name,state,gender,purchase,count,date -danny.baron@example1.com,Danny Baron,CA,M,TV (UTF-8: 📺),1,"Wed, 4 Jul 2001" -melanie.white@example2.edu,Melanie White,NC,F,,1,2001-07-04T12:08:56 -danny.baron@example1.com, D. ("Tab") Baron,CA,M,Winter jacket,1,2001-07-04 -ben.tyler@example3.org,Ben Tyler,NV,M,Flashlight,1,2001/07/04 -arthur.duff@example4.com,Arthur Duff,OR,M,Dining table,1,2001-07 -danny.baron@example1.com,Daniel Baron,,,Bike,1,2001 -jean.griffith@example5.org,Jean Griffith,WA,F,Power drill,1,2000 -melanie.white@example2.edu,Melanie White,NC,F,'iPad',1,1999 -ben.morisson@example6.org,Ben Morisson,FL,M,Amplifier,1,1998 -arthur.duff@example4.com,Arthur Duff,OR,M,Night table,1,1997 +email,name,state,gender,purchase +danny.baron@example1.com,Danny Baron,CA,M,TV +melanie.white@example2.edu,Melanie White,NC,F,iPhone +danny.baron@example1.com,D. Baron,CA,M,Winter jacket +ben.tyler@example3.org,Ben Tyler,NV,M,Flashlight +arthur.duff@example4.com,Arthur Duff,OR,M,Dining table +danny.baron@example1.com,Daniel Baron,CA,M,Bike +jean.griffith@example5.org,Jean Griffith,WA,F,Power drill +melanie.white@example2.edu,Melanie White,NC,F,iPad +ben.morisson@example6.org,Ben Morisson,FL,M,Amplifier +arthur.duff@example4.com,Arthur Duff,OR,M,Night table \ No newline at end of file diff --git a/tests/data/duplicates.json b/tests/data/duplicates.json deleted file mode 100644 index d94ebea..0000000 --- a/tests/data/duplicates.json +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - "email": "danny.baron@example1.com", - "name": "Danny Baron", - "state": "CA", - "gender": "M", - "purchase": "TV (UTF-8: 📺)", - "count": 1, - "date": "Wed, 4 Jul 2001" - }, - { - "email": "melanie.white@example2.edu", - "name": "Melanie White", - "state": "NC", - "gender": "F", - "purchase": "", - "count": 1, - "date": "2001-07-04T12:08:56" - }, - { - "email": "danny.baron@example1.com", - "name": " D.\t(\"Tab\") Baron", - "state": "CA", - "gender": "M", - "purchase": "Winter jacket", - "count": 1, - "date": "2001-07-04" - }, - { - "email": "ben.tyler@example3.org", - "name": "Ben Tyler", - "state": "NV", - "gender": "M", - "purchase": "Flashlight", - "count": 1, - "date": "2001/07/04" - }, - { - "email": "arthur.duff@example4.com", - "name": "Arthur Duff", - "state": "OR", - "gender": "M", - "purchase": "Dining table", - "count": 1, - "date": "2001-07" - }, - { - "email": "danny.baron@example1.com", - "name": "Daniel Baron", - "state": "", - "gender": "", - "purchase": "Bike", - "count": 1, - "date": 2001 - }, - { - "email": "jean.griffith@example5.org", - "name": "Jean Griffith", - "state": "WA", - "gender": "F", - "purchase": "Power drill", - "count": 1, - "date": 2000 - }, - { - "email": "melanie.white@example2.edu", - "name": "Melanie White", - "state": "NC", - "gender": "F", - "purchase": "'iPad'", - "count": 1, - "date": 1999 - }, - { - "email": "ben.morisson@example6.org", - "name": "Ben Morisson", - "state": "FL", - "gender": "M", - "purchase": "Amplifier", - "count": 1, - "date": 1998 - }, - { - "email": "arthur.duff@example4.com", - "name": "Arthur Duff", - "state": "OR", - "gender": "M", - "purchase": "Night table", - "count": 1, - "date": 1997 - } -] diff --git a/tests/data/duplicates.ods b/tests/data/duplicates.ods deleted file mode 100644 index 375a0af..0000000 Binary files a/tests/data/duplicates.ods and /dev/null differ diff --git a/tests/data/duplicates.tsv b/tests/data/duplicates.tsv deleted file mode 100644 index 5a9767d..0000000 --- a/tests/data/duplicates.tsv +++ /dev/null @@ -1,11 +0,0 @@ -email name state gender purchase count date -danny.baron@example1.com Danny Baron CA M TV (UTF-8: 📺) 1 Wed, 4 Jul 2001 -melanie.white@example2.edu Melanie White NC F 1 2001-07-04T12:08:56 -danny.baron@example1.com "D. (""Tab"") Baron" CA M Winter jacket 1 2001-07-04 -ben.tyler@example3.org Ben Tyler NV M Flashlight 1 2001/07/04 -arthur.duff@example4.com Arthur Duff OR M Dining table 1 2001-07 -danny.baron@example1.com Daniel Baron Bike 1 2001 -jean.griffith@example5.org Jean Griffith WA F Power drill 1 2000 -melanie.white@example2.edu Melanie White NC F 'iPad' 1 1999 -ben.morisson@example6.org Ben Morisson FL M Amplifier 1 1998 -arthur.duff@example4.com Arthur Duff OR M Night table 1 1997 diff --git a/tests/data/duplicates.txt b/tests/data/duplicates.txt deleted file mode 100644 index 3d76a12..0000000 --- a/tests/data/duplicates.txt +++ /dev/null @@ -1,11 +0,0 @@ -email name state gender purchase count date -danny.baron@example1.com Danny Baron CA M TV (UTF-8: 📺) 1 Wed, 4 Jul 2001 -melanie.white@example2.edu Melanie White NC F 1 2001-07-04T12:08:5 -danny.baron@example1.com D. ("Tab") Baron CA M Winter jacket 1 2001-07-04 -ben.tyler@example3.org Ben Tyler NV M Flashlight 1 2001/07/04 -arthur.duff@example4.com Arthur Duff OR M Dining table 1 2001-07 -danny.baron@example1.com Daniel Baron Bike 1 2001 -jean.griffith@example5.org Jean Griffith WA F Power drill 1 2000 -melanie.white@example2.edu Melanie White NC F 'iPad' 1 1999 -ben.morisson@example6.org Ben Morisson FL M Amplifier 1 1998 -arthur.duff@example4.com Arthur Duff OR M Night table 1 1997 diff --git a/tests/data/duplicates.xls b/tests/data/duplicates.xls deleted file mode 100644 index cbc2916..0000000 Binary files a/tests/data/duplicates.xls and /dev/null differ diff --git a/tests/data/duplicates.xlsx b/tests/data/duplicates.xlsx deleted file mode 100644 index 30418c5..0000000 Binary files a/tests/data/duplicates.xlsx and /dev/null differ diff --git a/tests/data/duplicates.xml b/tests/data/duplicates.xml deleted file mode 100644 index 2402358..0000000 --- a/tests/data/duplicates.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - danny.baron@example1.com - Danny Baron - CA - M - TV (UTF-8: 📺) - 1 - Wed, 4 Jul 2001 - - - melanie.white@example2.edu - Melanie White - NC - F - <iPhone> - 1 - 2001-07-04T12:08:56 - - - danny.baron@example1.com - D. ("Tab") Baron - CA - M - Winter jacket - 1 - 2001-07-04 - - - ben.tyler@example3.org - Ben Tyler - NV - M - Flashlight - 1 - 2001/07/04 - - - arthur.duff@example4.com - Arthur Duff - OR - M - Dining table - 1 - 2001-07 - - - danny.baron@example1.com - Daniel Baron - - - Bike - 1 - 2001 - - - jean.griffith@example5.org - Jean Griffith - WA - F - Power drill - 1 - 2000 - - - melanie.white@example2.edu - Melanie White - NC - F - 'iPad' - 1 - 1999 - - - ben.morisson@example6.org - Ben Morisson - FL - M - Amplifier - 1 - 1998 - - - arthur.duff@example4.com - Arthur Duff - OR - M - Night table - 1 - 1997 - - diff --git a/tests/data/duplicates.zip b/tests/data/duplicates.zip deleted file mode 100644 index eee03ff..0000000 Binary files a/tests/data/duplicates.zip and /dev/null differ diff --git a/tests/data/duplicates1.xml b/tests/data/duplicates1.xml deleted file mode 100644 index ad678e2..0000000 --- a/tests/data/duplicates1.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - danny.baron@example1.com - Danny Baron - CA - M - TV (UTF-8: 📺) - 1 - Wed, 4 Jul 2001 - diff --git a/tests/data/duplicates2.ods b/tests/data/duplicates2.ods deleted file mode 100644 index 25751a8..0000000 Binary files a/tests/data/duplicates2.ods and /dev/null differ diff --git a/tests/data/duplicates2.xls b/tests/data/duplicates2.xls deleted file mode 100644 index 5774b29..0000000 Binary files a/tests/data/duplicates2.xls and /dev/null differ diff --git a/tests/data/duplicates2.xlsx b/tests/data/duplicates2.xlsx deleted file mode 100644 index 5cc2413..0000000 Binary files a/tests/data/duplicates2.xlsx and /dev/null differ diff --git a/tests/data/duplicates_old.csv b/tests/data/duplicates_old.csv deleted file mode 100644 index 8fcb581..0000000 --- a/tests/data/duplicates_old.csv +++ /dev/null @@ -1,11 +0,0 @@ -email,name,state,gender,purchase -danny.baron@example1.com,Danny Baron,CA,M,TV -melanie.white@example2.edu,Melanie White,NC,F,iPhone -danny.baron@example1.com,D. Baron,CA,M,Winter jacket -ben.tyler@example3.org,Ben Tyler,NV,M,Flashlight -arthur.duff@example4.com,Arthur Duff,OR,M,Dining table -danny.baron@example1.com,Daniel Baron,CA,M,Bike -jean.griffith@example5.org,Jean Griffith,WA,F,Power drill -melanie.white@example2.edu,Melanie White,NC,F,iPad -ben.morisson@example6.org,Ben Morisson,FL,M,Amplifier -arthur.duff@example4.com,Arthur Duff,OR,M,Night table \ No newline at end of file diff --git a/tests/data/dữ liệu biểu tượng cảm xúc.txt b/tests/data/dữ liệu biểu tượng cảm xúc.txt deleted file mode 100644 index bca3e44..0000000 --- a/tests/data/dữ liệu biểu tượng cảm xúc.txt +++ /dev/null @@ -1,1315 +0,0 @@ -# Emoji Data for UTR #51 -# -# File: emoji-data.txt -# Version: 1.0 -# Date: 2015-08-04 -# -# Copyright (c) 2015 Unicode, Inc. -# For terms of use, see http://www.unicode.org/terms_of_use.html -# For documentation and usage, see http://www.unicode.org/reports/tr51/ -# -# Format: Code ; Default_Emoji_Style ; Emoji_Level ; Emoji_Modifier_Status ; Emoji_Sources # Comment -# -# Field 1 — Default_Emoji_Style: -# text: default text presentation -# emoji: default emoji presentation -# Field 2 — Emoji_Level: -# L1: level 1 emoji -# L2: level 2 emoji -# NA: not applicable -# Field 3 — Emoji_Modifier_Status: -# modifier: an emoji modifier -# primary: a primary emoji modifier base -# secondary: a secondary emoji modifier base -# none: not applicable -# Field 4 — Emoji_Sources: -# one or more values from {z, a, j, w, x} -# see the key in http://unicode.org/reports/tr51#Major_Sources -# NA: not applicable -# Comment — currently contains the version where the character was first encoded, -# followed by: -# - a character name in uppercase (for a single character), -# - a keycap name, -# - an associated flag, where is associated with value unicode region code -# -00A9 ; text ; L1 ; none ; j # V1.1 (©) COPYRIGHT SIGN -00AE ; text ; L1 ; none ; j # V1.1 (®) REGISTERED SIGN -203C ; text ; L1 ; none ; a j # V1.1 (‼) DOUBLE EXCLAMATION MARK -2049 ; text ; L1 ; none ; a j # V3.0 (⁉) EXCLAMATION QUESTION MARK -2122 ; text ; L1 ; none ; j # V1.1 (™) TRADE MARK SIGN -2139 ; text ; L1 ; none ; j # V3.0 (ℹ) INFORMATION SOURCE -2194 ; text ; L1 ; none ; z j # V1.1 (↔) LEFT RIGHT ARROW -2195 ; text ; L1 ; none ; z j # V1.1 (↕) UP DOWN ARROW -2196 ; text ; L1 ; none ; j # V1.1 (↖) NORTH WEST ARROW -2197 ; text ; L1 ; none ; j # V1.1 (↗) NORTH EAST ARROW -2198 ; text ; L1 ; none ; j # V1.1 (↘) SOUTH EAST ARROW -2199 ; text ; L1 ; none ; j # V1.1 (↙) SOUTH WEST ARROW -21A9 ; text ; L1 ; none ; j # V1.1 (↩) LEFTWARDS ARROW WITH HOOK -21AA ; text ; L1 ; none ; j # V1.1 (↪) RIGHTWARDS ARROW WITH HOOK -231A ; emoji ; L1 ; none ; j # V1.1 (⌚) WATCH -231B ; emoji ; L1 ; none ; j # V1.1 (⌛) HOURGLASS -2328 ; text ; L2 ; none ; x # V1.1 (⌨) KEYBOARD -23CF ; text ; L2 ; none ; x # V4.0 (⏏) EJECT SYMBOL -23E9 ; emoji ; L1 ; none ; j w # V6.0 (⏩) BLACK RIGHT-POINTING DOUBLE TRIANGLE -23EA ; emoji ; L1 ; none ; j w # V6.0 (⏪) BLACK LEFT-POINTING DOUBLE TRIANGLE -23EB ; emoji ; L1 ; none ; j # V6.0 (⏫) BLACK UP-POINTING DOUBLE TRIANGLE -23EC ; emoji ; L1 ; none ; j # V6.0 (⏬) BLACK DOWN-POINTING DOUBLE TRIANGLE -23ED ; text ; L2 ; none ; w # V6.0 (⏭) BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR -23EE ; text ; L2 ; none ; w # V6.0 (⏮) BLACK LEFT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR -23EF ; text ; L2 ; none ; x # V6.0 (⏯) BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR -23F0 ; emoji ; L1 ; none ; j # V6.0 (⏰) ALARM CLOCK -23F1 ; text ; L2 ; none ; x # V6.0 (⏱) STOPWATCH -23F2 ; text ; L2 ; none ; x # V6.0 (⏲) TIMER CLOCK -23F3 ; emoji ; L1 ; none ; j w # V6.0 (⏳) HOURGLASS WITH FLOWING SAND -23F8 ; text ; L2 ; none ; w # V7.0 (⏸) DOUBLE VERTICAL BAR -23F9 ; text ; L2 ; none ; w # V7.0 (⏹) BLACK SQUARE FOR STOP -23FA ; text ; L2 ; none ; w # V7.0 (⏺) BLACK CIRCLE FOR RECORD -24C2 ; text ; L1 ; none ; j # V1.1 (Ⓜ) CIRCLED LATIN CAPITAL LETTER M -25AA ; text ; L1 ; none ; j w # V1.1 (▪) BLACK SMALL SQUARE -25AB ; text ; L1 ; none ; j # V1.1 (▫) WHITE SMALL SQUARE -25B6 ; text ; L1 ; none ; a j w # V1.1 (▶) BLACK RIGHT-POINTING TRIANGLE -25C0 ; text ; L1 ; none ; a j w # V1.1 (◀) BLACK LEFT-POINTING TRIANGLE -25FB ; text ; L1 ; none ; j # V3.2 (◻) WHITE MEDIUM SQUARE -25FC ; text ; L1 ; none ; j w # V3.2 (◼) BLACK MEDIUM SQUARE -25FD ; emoji ; L1 ; none ; j # V3.2 (◽) WHITE MEDIUM SMALL SQUARE -25FE ; emoji ; L1 ; none ; j w # V3.2 (◾) BLACK MEDIUM SMALL SQUARE -2600 ; text ; L1 ; none ; a j # V1.1 (☀) BLACK SUN WITH RAYS -2601 ; text ; L1 ; none ; a j w # V1.1 (☁) CLOUD -2602 ; text ; L2 ; none ; a # V1.1 (☂) UMBRELLA -2603 ; text ; L2 ; none ; a # V1.1 (☃) SNOWMAN -2604 ; text ; L2 ; none ; x # V1.1 (☄) COMET -260E ; text ; L1 ; none ; z a j # V1.1 (☎) BLACK TELEPHONE -2611 ; text ; L1 ; none ; j w # V1.1 (☑) BALLOT BOX WITH CHECK -2614 ; emoji ; L1 ; none ; a j # V4.0 (☔) UMBRELLA WITH RAIN DROPS -2615 ; emoji ; L1 ; none ; j # V4.0 (☕) HOT BEVERAGE -2618 ; text ; L2 ; none ; x # V4.1 (☘) SHAMROCK -261D ; text ; L1 ; secondary ; j w # V1.1 (☝) WHITE UP POINTING INDEX -2620 ; text ; L2 ; none ; x # V1.1 (☠) SKULL AND CROSSBONES -2622 ; text ; L2 ; none ; x # V1.1 (☢) RADIOACTIVE SIGN -2623 ; text ; L2 ; none ; x # V1.1 (☣) BIOHAZARD SIGN -2626 ; text ; L2 ; none ; x # V1.1 (☦) ORTHODOX CROSS -262A ; text ; L2 ; none ; w # V1.1 (☪) STAR AND CRESCENT -262E ; text ; L2 ; none ; x # V1.1 (☮) PEACE SYMBOL -262F ; text ; L2 ; none ; w # V1.1 (☯) YIN YANG -2638 ; text ; L2 ; none ; w # V1.1 (☸) WHEEL OF DHARMA -2639 ; text ; L2 ; secondary ; w # V1.1 (☹) WHITE FROWNING FACE -263A ; text ; L1 ; secondary ; j w # V1.1 (☺) WHITE SMILING FACE -2648 ; emoji ; L1 ; none ; j w # V1.1 (♈) ARIES -2649 ; emoji ; L1 ; none ; j w # V1.1 (♉) TAURUS -264A ; emoji ; L1 ; none ; j w # V1.1 (♊) GEMINI -264B ; emoji ; L1 ; none ; j w # V1.1 (♋) CANCER -264C ; emoji ; L1 ; none ; j w # V1.1 (♌) LEO -264D ; emoji ; L1 ; none ; j w # V1.1 (♍) VIRGO -264E ; emoji ; L1 ; none ; j w # V1.1 (♎) LIBRA -264F ; emoji ; L1 ; none ; j w # V1.1 (♏) SCORPIUS -2650 ; emoji ; L1 ; none ; j w # V1.1 (♐) SAGITTARIUS -2651 ; emoji ; L1 ; none ; j w # V1.1 (♑) CAPRICORN -2652 ; emoji ; L1 ; none ; j w # V1.1 (♒) AQUARIUS -2653 ; emoji ; L1 ; none ; j w # V1.1 (♓) PISCES -2660 ; text ; L1 ; none ; z a j # V1.1 (♠) BLACK SPADE SUIT -2663 ; text ; L1 ; none ; z a j # V1.1 (♣) BLACK CLUB SUIT -2665 ; text ; L1 ; none ; z a j # V1.1 (♥) BLACK HEART SUIT -2666 ; text ; L1 ; none ; z a j # V1.1 (♦) BLACK DIAMOND SUIT -2668 ; text ; L1 ; none ; a j # V1.1 (♨) HOT SPRINGS -267B ; text ; L1 ; none ; j # V3.2 (♻) BLACK UNIVERSAL RECYCLING SYMBOL -267F ; emoji ; L1 ; none ; j w # V4.1 (♿) WHEELCHAIR SYMBOL -2692 ; text ; L2 ; none ; x # V4.1 (⚒) HAMMER AND PICK -2693 ; emoji ; L1 ; none ; a j # V4.1 (⚓) ANCHOR -2694 ; text ; L2 ; none ; x # V4.1 (⚔) CROSSED SWORDS -2696 ; text ; L2 ; none ; x # V4.1 (⚖) SCALES -2697 ; text ; L2 ; none ; x # V4.1 (⚗) ALEMBIC -2699 ; text ; L2 ; none ; x # V4.1 (⚙) GEAR -269B ; text ; L2 ; none ; x # V4.1 (⚛) ATOM SYMBOL -269C ; text ; L2 ; none ; x # V4.1 (⚜) FLEUR-DE-LIS -26A0 ; text ; L1 ; none ; j # V4.0 (⚠) WARNING SIGN -26A1 ; emoji ; L1 ; none ; a j # V4.0 (⚡) HIGH VOLTAGE SIGN -26AA ; emoji ; L1 ; none ; j # V4.1 (⚪) MEDIUM WHITE CIRCLE -26AB ; emoji ; L1 ; none ; j w # V4.1 (⚫) MEDIUM BLACK CIRCLE -26B0 ; text ; L2 ; none ; x # V4.1 (⚰) COFFIN -26B1 ; text ; L2 ; none ; x # V4.1 (⚱) FUNERAL URN -26BD ; emoji ; L1 ; none ; j # V5.2 (⚽) SOCCER BALL -26BE ; emoji ; L1 ; none ; a j # V5.2 (⚾) BASEBALL -26C4 ; emoji ; L1 ; none ; a j # V5.2 (⛄) SNOWMAN WITHOUT SNOW -26C5 ; emoji ; L1 ; none ; a j # V5.2 (⛅) SUN BEHIND CLOUD -26C8 ; text ; L2 ; none ; a # V5.2 (⛈) THUNDER CLOUD AND RAIN -26CE ; emoji ; L1 ; none ; a j # V6.0 (⛎) OPHIUCHUS -26CF ; text ; L2 ; none ; a # V5.2 (⛏) PICK -26D1 ; text ; L2 ; none ; a # V5.2 (⛑) HELMET WITH WHITE CROSS -26D3 ; text ; L2 ; none ; a # V5.2 (⛓) CHAINS -26D4 ; emoji ; L1 ; none ; a j # V5.2 (⛔) NO ENTRY -26E9 ; text ; L2 ; none ; a # V5.2 (⛩) SHINTO SHRINE -26EA ; emoji ; L1 ; none ; a j # V5.2 (⛪) CHURCH -26F0 ; text ; L2 ; none ; a # V5.2 (⛰) MOUNTAIN -26F1 ; text ; L2 ; none ; a # V5.2 (⛱) UMBRELLA ON GROUND -26F2 ; emoji ; L1 ; none ; a j # V5.2 (⛲) FOUNTAIN -26F3 ; emoji ; L1 ; none ; a j w # V5.2 (⛳) FLAG IN HOLE -26F4 ; text ; L2 ; none ; a # V5.2 (⛴) FERRY -26F5 ; emoji ; L1 ; none ; a j # V5.2 (⛵) SAILBOAT -26F7 ; text ; L2 ; none ; a w # V5.2 (⛷) SKIER -26F8 ; text ; L2 ; none ; a # V5.2 (⛸) ICE SKATE -26F9 ; text ; L2 ; none ; a # V5.2 (⛹) PERSON WITH BALL -26FA ; emoji ; L1 ; none ; a j # V5.2 (⛺) TENT -26FD ; emoji ; L1 ; none ; a j # V5.2 (⛽) FUEL PUMP -2702 ; text ; L1 ; none ; z j w # V1.1 (✂) BLACK SCISSORS -2705 ; emoji ; L1 ; none ; j # V6.0 (✅) WHITE HEAVY CHECK MARK -2708 ; text ; L1 ; none ; z a j w # V1.1 (✈) AIRPLANE -2709 ; text ; L1 ; none ; z j # V1.1 (✉) ENVELOPE -270A ; emoji ; L1 ; secondary ; j # V6.0 (✊) RAISED FIST -270B ; emoji ; L1 ; secondary ; j # V6.0 (✋) RAISED HAND -270C ; text ; L1 ; secondary ; z j w # V1.1 (✌) VICTORY HAND -270D ; text ; L2 ; secondary ; z w # V1.1 (✍) WRITING HAND -270F ; text ; L1 ; none ; z j # V1.1 (✏) PENCIL -2712 ; text ; L1 ; none ; z j # V1.1 (✒) BLACK NIB -2714 ; text ; L1 ; none ; z j w # V1.1 (✔) HEAVY CHECK MARK -2716 ; text ; L1 ; none ; z j # V1.1 (✖) HEAVY MULTIPLICATION X -271D ; text ; L2 ; none ; w # V1.1 (✝) LATIN CROSS -2721 ; text ; L2 ; none ; w # V1.1 (✡) STAR OF DAVID -2728 ; emoji ; L1 ; none ; j # V6.0 (✨) SPARKLES -2733 ; text ; L1 ; none ; z j # V1.1 (✳) EIGHT SPOKED ASTERISK -2734 ; text ; L1 ; none ; z j # V1.1 (✴) EIGHT POINTED BLACK STAR -2744 ; text ; L1 ; none ; z j w # V1.1 (❄) SNOWFLAKE -2747 ; text ; L1 ; none ; z j # V1.1 (❇) SPARKLE -274C ; emoji ; L1 ; none ; j # V6.0 (❌) CROSS MARK -274E ; emoji ; L1 ; none ; j # V6.0 (❎) NEGATIVE SQUARED CROSS MARK -2753 ; emoji ; L1 ; none ; j w # V6.0 (❓) BLACK QUESTION MARK ORNAMENT -2754 ; emoji ; L1 ; none ; j # V6.0 (❔) WHITE QUESTION MARK ORNAMENT -2755 ; emoji ; L1 ; none ; j # V6.0 (❕) WHITE EXCLAMATION MARK ORNAMENT -2757 ; emoji ; L1 ; none ; j # V5.2 (❗) HEAVY EXCLAMATION MARK SYMBOL -2763 ; text ; L2 ; none ; z # V1.1 (❣) HEAVY HEART EXCLAMATION MARK ORNAMENT -2764 ; text ; L1 ; none ; z j # V1.1 (❤) HEAVY BLACK HEART -2795 ; emoji ; L1 ; none ; j # V6.0 (➕) HEAVY PLUS SIGN -2796 ; emoji ; L1 ; none ; j # V6.0 (➖) HEAVY MINUS SIGN -2797 ; emoji ; L1 ; none ; j # V6.0 (➗) HEAVY DIVISION SIGN -27A1 ; text ; L1 ; none ; z a j # V1.1 (➡) BLACK RIGHTWARDS ARROW -27B0 ; emoji ; L1 ; none ; j # V6.0 (➰) CURLY LOOP -27BF ; emoji ; L1 ; none ; x # V6.0 (➿) DOUBLE CURLY LOOP -2934 ; text ; L1 ; none ; j # V3.2 (⤴) ARROW POINTING RIGHTWARDS THEN CURVING UPWARDS -2935 ; text ; L1 ; none ; j # V3.2 (⤵) ARROW POINTING RIGHTWARDS THEN CURVING DOWNWARDS -2B05 ; text ; L1 ; none ; a j # V4.0 (⬅) LEFTWARDS BLACK ARROW -2B06 ; text ; L1 ; none ; a j # V4.0 (⬆) UPWARDS BLACK ARROW -2B07 ; text ; L1 ; none ; a j # V4.0 (⬇) DOWNWARDS BLACK ARROW -2B1B ; emoji ; L1 ; none ; a j w # V5.1 (⬛) BLACK LARGE SQUARE -2B1C ; emoji ; L1 ; none ; j w # V5.1 (⬜) WHITE LARGE SQUARE -2B50 ; emoji ; L1 ; none ; j # V5.1 (⭐) WHITE MEDIUM STAR -2B55 ; emoji ; L1 ; none ; j # V5.2 (⭕) HEAVY LARGE CIRCLE -3030 ; text ; L1 ; none ; j # V1.1 (〰) WAVY DASH -303D ; text ; L1 ; none ; j # V3.2 (〽) PART ALTERNATION MARK -3297 ; text ; L1 ; none ; j # V1.1 (㊗) CIRCLED IDEOGRAPH CONGRATULATION -3299 ; text ; L1 ; none ; a j # V1.1 (㊙) CIRCLED IDEOGRAPH SECRET -1F004 ; emoji ; L1 ; none ; j # V5.1 (🀄) MAHJONG TILE RED DRAGON -1F0CF ; emoji ; L1 ; none ; j # V6.0 (🃏) PLAYING CARD BLACK JOKER -1F170 ; text ; L1 ; none ; j # V6.0 (🅰) NEGATIVE SQUARED LATIN CAPITAL LETTER A -1F171 ; text ; L1 ; none ; j # V6.0 (🅱) NEGATIVE SQUARED LATIN CAPITAL LETTER B -1F17E ; text ; L1 ; none ; j # V6.0 (🅾) NEGATIVE SQUARED LATIN CAPITAL LETTER O -1F17F ; text ; L1 ; none ; a j # V5.2 (🅿) NEGATIVE SQUARED LATIN CAPITAL LETTER P -1F18E ; emoji ; L1 ; none ; j # V6.0 (🆎) NEGATIVE SQUARED AB -1F191 ; emoji ; L1 ; none ; j # V6.0 (🆑) SQUARED CL -1F192 ; emoji ; L1 ; none ; j # V6.0 (🆒) SQUARED COOL -1F193 ; emoji ; L1 ; none ; j # V6.0 (🆓) SQUARED FREE -1F194 ; emoji ; L1 ; none ; j # V6.0 (🆔) SQUARED ID -1F195 ; emoji ; L1 ; none ; j # V6.0 (🆕) SQUARED NEW -1F196 ; emoji ; L1 ; none ; j # V6.0 (🆖) SQUARED NG -1F197 ; emoji ; L1 ; none ; j # V6.0 (🆗) SQUARED OK -1F198 ; emoji ; L1 ; none ; j # V6.0 (🆘) SQUARED SOS -1F199 ; emoji ; L1 ; none ; j # V6.0 (🆙) SQUARED UP WITH EXCLAMATION MARK -1F19A ; emoji ; L1 ; none ; j # V6.0 (🆚) SQUARED VS -1F201 ; emoji ; L1 ; none ; j # V6.0 (🈁) SQUARED KATAKANA KOKO -1F202 ; text ; L1 ; none ; j # V6.0 (🈂) SQUARED KATAKANA SA -1F21A ; emoji ; L1 ; none ; a j # V5.2 (🈚) SQUARED CJK UNIFIED IDEOGRAPH-7121 -1F22F ; emoji ; L1 ; none ; a j # V5.2 (🈯) SQUARED CJK UNIFIED IDEOGRAPH-6307 -1F232 ; emoji ; L1 ; none ; j # V6.0 (🈲) SQUARED CJK UNIFIED IDEOGRAPH-7981 -1F233 ; emoji ; L1 ; none ; j # V6.0 (🈳) SQUARED CJK UNIFIED IDEOGRAPH-7A7A -1F234 ; emoji ; L1 ; none ; j # V6.0 (🈴) SQUARED CJK UNIFIED IDEOGRAPH-5408 -1F235 ; emoji ; L1 ; none ; j # V6.0 (🈵) SQUARED CJK UNIFIED IDEOGRAPH-6E80 -1F236 ; emoji ; L1 ; none ; j # V6.0 (🈶) SQUARED CJK UNIFIED IDEOGRAPH-6709 -1F237 ; text ; L1 ; none ; j # V6.0 (🈷) SQUARED CJK UNIFIED IDEOGRAPH-6708 -1F238 ; emoji ; L1 ; none ; j # V6.0 (🈸) SQUARED CJK UNIFIED IDEOGRAPH-7533 -1F239 ; emoji ; L1 ; none ; j # V6.0 (🈹) SQUARED CJK UNIFIED IDEOGRAPH-5272 -1F23A ; emoji ; L1 ; none ; j # V6.0 (🈺) SQUARED CJK UNIFIED IDEOGRAPH-55B6 -1F250 ; emoji ; L1 ; none ; j # V6.0 (🉐) CIRCLED IDEOGRAPH ADVANTAGE -1F251 ; emoji ; L1 ; none ; j # V6.0 (🉑) CIRCLED IDEOGRAPH ACCEPT -1F300 ; emoji ; L1 ; none ; j # V6.0 (🌀) CYCLONE -1F301 ; emoji ; L1 ; none ; j # V6.0 (🌁) FOGGY -1F302 ; emoji ; L1 ; none ; j # V6.0 (🌂) CLOSED UMBRELLA -1F303 ; emoji ; L1 ; none ; j # V6.0 (🌃) NIGHT WITH STARS -1F304 ; emoji ; L1 ; none ; j # V6.0 (🌄) SUNRISE OVER MOUNTAINS -1F305 ; emoji ; L1 ; none ; j # V6.0 (🌅) SUNRISE -1F306 ; emoji ; L1 ; none ; j # V6.0 (🌆) CITYSCAPE AT DUSK -1F307 ; emoji ; L1 ; none ; j # V6.0 (🌇) SUNSET OVER BUILDINGS -1F308 ; emoji ; L1 ; none ; j # V6.0 (🌈) RAINBOW -1F309 ; emoji ; L1 ; none ; j # V6.0 (🌉) BRIDGE AT NIGHT -1F30A ; emoji ; L1 ; none ; j # V6.0 (🌊) WATER WAVE -1F30B ; emoji ; L1 ; none ; j # V6.0 (🌋) VOLCANO -1F30C ; emoji ; L1 ; none ; j # V6.0 (🌌) MILKY WAY -1F30D ; emoji ; L1 ; none ; w # V6.0 (🌍) EARTH GLOBE EUROPE-AFRICA -1F30E ; emoji ; L1 ; none ; w # V6.0 (🌎) EARTH GLOBE AMERICAS -1F30F ; emoji ; L1 ; none ; j w # V6.0 (🌏) EARTH GLOBE ASIA-AUSTRALIA -1F310 ; emoji ; L1 ; none ; x # V6.0 (🌐) GLOBE WITH MERIDIANS -1F311 ; emoji ; L1 ; none ; j # V6.0 (🌑) NEW MOON SYMBOL -1F312 ; emoji ; L1 ; none ; x # V6.0 (🌒) WAXING CRESCENT MOON SYMBOL -1F313 ; emoji ; L1 ; none ; j # V6.0 (🌓) FIRST QUARTER MOON SYMBOL -1F314 ; emoji ; L1 ; none ; j # V6.0 (🌔) WAXING GIBBOUS MOON SYMBOL -1F315 ; emoji ; L1 ; none ; j w # V6.0 (🌕) FULL MOON SYMBOL -1F316 ; emoji ; L1 ; none ; x # V6.0 (🌖) WANING GIBBOUS MOON SYMBOL -1F317 ; emoji ; L1 ; none ; x # V6.0 (🌗) LAST QUARTER MOON SYMBOL -1F318 ; emoji ; L1 ; none ; x # V6.0 (🌘) WANING CRESCENT MOON SYMBOL -1F319 ; emoji ; L1 ; none ; j # V6.0 (🌙) CRESCENT MOON -1F31A ; emoji ; L1 ; none ; x # V6.0 (🌚) NEW MOON WITH FACE -1F31B ; emoji ; L1 ; none ; j # V6.0 (🌛) FIRST QUARTER MOON WITH FACE -1F31C ; emoji ; L1 ; none ; w # V6.0 (🌜) LAST QUARTER MOON WITH FACE -1F31D ; emoji ; L1 ; none ; x # V6.0 (🌝) FULL MOON WITH FACE -1F31E ; emoji ; L1 ; none ; x # V6.0 (🌞) SUN WITH FACE -1F31F ; emoji ; L1 ; none ; j # V6.0 (🌟) GLOWING STAR -1F320 ; emoji ; L1 ; none ; j # V6.0 (🌠) SHOOTING STAR -1F321 ; text ; L2 ; none ; w # V7.0 (🌡) THERMOMETER -1F324 ; text ; L2 ; none ; w # V7.0 (🌤) WHITE SUN WITH SMALL CLOUD -1F325 ; text ; L2 ; none ; w # V7.0 (🌥) WHITE SUN BEHIND CLOUD -1F326 ; text ; L2 ; none ; w # V7.0 (🌦) WHITE SUN BEHIND CLOUD WITH RAIN -1F327 ; text ; L2 ; none ; w # V7.0 (🌧) CLOUD WITH RAIN -1F328 ; text ; L2 ; none ; w # V7.0 (🌨) CLOUD WITH SNOW -1F329 ; text ; L2 ; none ; w # V7.0 (🌩) CLOUD WITH LIGHTNING -1F32A ; text ; L2 ; none ; w # V7.0 (🌪) CLOUD WITH TORNADO -1F32B ; text ; L2 ; none ; w # V7.0 (🌫) FOG -1F32C ; text ; L2 ; none ; w # V7.0 (🌬) WIND BLOWING FACE -1F32D ; emoji ; L2 ; none ; x # V8.0 (🌭) HOT DOG -1F32E ; emoji ; L2 ; none ; x # V8.0 (🌮) TACO -1F32F ; emoji ; L2 ; none ; x # V8.0 (🌯) BURRITO -1F330 ; emoji ; L1 ; none ; j # V6.0 (🌰) CHESTNUT -1F331 ; emoji ; L1 ; none ; j # V6.0 (🌱) SEEDLING -1F332 ; emoji ; L1 ; none ; x # V6.0 (🌲) EVERGREEN TREE -1F333 ; emoji ; L1 ; none ; x # V6.0 (🌳) DECIDUOUS TREE -1F334 ; emoji ; L1 ; none ; j # V6.0 (🌴) PALM TREE -1F335 ; emoji ; L1 ; none ; j # V6.0 (🌵) CACTUS -1F336 ; text ; L2 ; none ; w # V7.0 (🌶) HOT PEPPER -1F337 ; emoji ; L1 ; none ; j # V6.0 (🌷) TULIP -1F338 ; emoji ; L1 ; none ; j # V6.0 (🌸) CHERRY BLOSSOM -1F339 ; emoji ; L1 ; none ; j # V6.0 (🌹) ROSE -1F33A ; emoji ; L1 ; none ; j # V6.0 (🌺) HIBISCUS -1F33B ; emoji ; L1 ; none ; j # V6.0 (🌻) SUNFLOWER -1F33C ; emoji ; L1 ; none ; j # V6.0 (🌼) BLOSSOM -1F33D ; emoji ; L1 ; none ; j # V6.0 (🌽) EAR OF MAIZE -1F33E ; emoji ; L1 ; none ; j # V6.0 (🌾) EAR OF RICE -1F33F ; emoji ; L1 ; none ; j # V6.0 (🌿) HERB -1F340 ; emoji ; L1 ; none ; j # V6.0 (🍀) FOUR LEAF CLOVER -1F341 ; emoji ; L1 ; none ; j # V6.0 (🍁) MAPLE LEAF -1F342 ; emoji ; L1 ; none ; j # V6.0 (🍂) FALLEN LEAF -1F343 ; emoji ; L1 ; none ; j # V6.0 (🍃) LEAF FLUTTERING IN WIND -1F344 ; emoji ; L1 ; none ; j # V6.0 (🍄) MUSHROOM -1F345 ; emoji ; L1 ; none ; j # V6.0 (🍅) TOMATO -1F346 ; emoji ; L1 ; none ; j # V6.0 (🍆) AUBERGINE -1F347 ; emoji ; L1 ; none ; j # V6.0 (🍇) GRAPES -1F348 ; emoji ; L1 ; none ; j # V6.0 (🍈) MELON -1F349 ; emoji ; L1 ; none ; j # V6.0 (🍉) WATERMELON -1F34A ; emoji ; L1 ; none ; j # V6.0 (🍊) TANGERINE -1F34B ; emoji ; L1 ; none ; x # V6.0 (🍋) LEMON -1F34C ; emoji ; L1 ; none ; j # V6.0 (🍌) BANANA -1F34D ; emoji ; L1 ; none ; j # V6.0 (🍍) PINEAPPLE -1F34E ; emoji ; L1 ; none ; j # V6.0 (🍎) RED APPLE -1F34F ; emoji ; L1 ; none ; j # V6.0 (🍏) GREEN APPLE -1F350 ; emoji ; L1 ; none ; x # V6.0 (🍐) PEAR -1F351 ; emoji ; L1 ; none ; j # V6.0 (🍑) PEACH -1F352 ; emoji ; L1 ; none ; j # V6.0 (🍒) CHERRIES -1F353 ; emoji ; L1 ; none ; j # V6.0 (🍓) STRAWBERRY -1F354 ; emoji ; L1 ; none ; j # V6.0 (🍔) HAMBURGER -1F355 ; emoji ; L1 ; none ; j # V6.0 (🍕) SLICE OF PIZZA -1F356 ; emoji ; L1 ; none ; j # V6.0 (🍖) MEAT ON BONE -1F357 ; emoji ; L1 ; none ; j # V6.0 (🍗) POULTRY LEG -1F358 ; emoji ; L1 ; none ; j # V6.0 (🍘) RICE CRACKER -1F359 ; emoji ; L1 ; none ; j # V6.0 (🍙) RICE BALL -1F35A ; emoji ; L1 ; none ; j # V6.0 (🍚) COOKED RICE -1F35B ; emoji ; L1 ; none ; j # V6.0 (🍛) CURRY AND RICE -1F35C ; emoji ; L1 ; none ; j # V6.0 (🍜) STEAMING BOWL -1F35D ; emoji ; L1 ; none ; j # V6.0 (🍝) SPAGHETTI -1F35E ; emoji ; L1 ; none ; j # V6.0 (🍞) BREAD -1F35F ; emoji ; L1 ; none ; j # V6.0 (🍟) FRENCH FRIES -1F360 ; emoji ; L1 ; none ; j # V6.0 (🍠) ROASTED SWEET POTATO -1F361 ; emoji ; L1 ; none ; j # V6.0 (🍡) DANGO -1F362 ; emoji ; L1 ; none ; j # V6.0 (🍢) ODEN -1F363 ; emoji ; L1 ; none ; j # V6.0 (🍣) SUSHI -1F364 ; emoji ; L1 ; none ; j # V6.0 (🍤) FRIED SHRIMP -1F365 ; emoji ; L1 ; none ; j # V6.0 (🍥) FISH CAKE WITH SWIRL DESIGN -1F366 ; emoji ; L1 ; none ; j # V6.0 (🍦) SOFT ICE CREAM -1F367 ; emoji ; L1 ; none ; j # V6.0 (🍧) SHAVED ICE -1F368 ; emoji ; L1 ; none ; j # V6.0 (🍨) ICE CREAM -1F369 ; emoji ; L1 ; none ; j # V6.0 (🍩) DOUGHNUT -1F36A ; emoji ; L1 ; none ; j # V6.0 (🍪) COOKIE -1F36B ; emoji ; L1 ; none ; j # V6.0 (🍫) CHOCOLATE BAR -1F36C ; emoji ; L1 ; none ; j # V6.0 (🍬) CANDY -1F36D ; emoji ; L1 ; none ; j # V6.0 (🍭) LOLLIPOP -1F36E ; emoji ; L1 ; none ; j # V6.0 (🍮) CUSTARD -1F36F ; emoji ; L1 ; none ; j # V6.0 (🍯) HONEY POT -1F370 ; emoji ; L1 ; none ; j # V6.0 (🍰) SHORTCAKE -1F371 ; emoji ; L1 ; none ; j # V6.0 (🍱) BENTO BOX -1F372 ; emoji ; L1 ; none ; j # V6.0 (🍲) POT OF FOOD -1F373 ; emoji ; L1 ; none ; j # V6.0 (🍳) COOKING -1F374 ; emoji ; L1 ; none ; j # V6.0 (🍴) FORK AND KNIFE -1F375 ; emoji ; L1 ; none ; j # V6.0 (🍵) TEACUP WITHOUT HANDLE -1F376 ; emoji ; L1 ; none ; j # V6.0 (🍶) SAKE BOTTLE AND CUP -1F377 ; emoji ; L1 ; none ; j # V6.0 (🍷) WINE GLASS -1F378 ; emoji ; L1 ; none ; j w # V6.0 (🍸) COCKTAIL GLASS -1F379 ; emoji ; L1 ; none ; j # V6.0 (🍹) TROPICAL DRINK -1F37A ; emoji ; L1 ; none ; j # V6.0 (🍺) BEER MUG -1F37B ; emoji ; L1 ; none ; j # V6.0 (🍻) CLINKING BEER MUGS -1F37C ; emoji ; L1 ; none ; x # V6.0 (🍼) BABY BOTTLE -1F37D ; text ; L2 ; none ; w # V7.0 (🍽) FORK AND KNIFE WITH PLATE -1F37E ; emoji ; L2 ; none ; x # V8.0 (🍾) BOTTLE WITH POPPING CORK -1F37F ; emoji ; L2 ; none ; x # V8.0 (🍿) POPCORN -1F380 ; emoji ; L1 ; none ; j # V6.0 (🎀) RIBBON -1F381 ; emoji ; L1 ; none ; j # V6.0 (🎁) WRAPPED PRESENT -1F382 ; emoji ; L1 ; none ; j # V6.0 (🎂) BIRTHDAY CAKE -1F383 ; emoji ; L1 ; none ; j # V6.0 (🎃) JACK-O-LANTERN -1F384 ; emoji ; L1 ; none ; j # V6.0 (🎄) CHRISTMAS TREE -1F385 ; emoji ; L1 ; primary ; j # V6.0 (🎅) FATHER CHRISTMAS -1F386 ; emoji ; L1 ; none ; j # V6.0 (🎆) FIREWORKS -1F387 ; emoji ; L1 ; none ; j # V6.0 (🎇) FIREWORK SPARKLER -1F388 ; emoji ; L1 ; none ; j # V6.0 (🎈) BALLOON -1F389 ; emoji ; L1 ; none ; j # V6.0 (🎉) PARTY POPPER -1F38A ; emoji ; L1 ; none ; j # V6.0 (🎊) CONFETTI BALL -1F38B ; emoji ; L1 ; none ; j # V6.0 (🎋) TANABATA TREE -1F38C ; emoji ; L1 ; none ; j # V6.0 (🎌) CROSSED FLAGS -1F38D ; emoji ; L1 ; none ; j # V6.0 (🎍) PINE DECORATION -1F38E ; emoji ; L1 ; none ; j # V6.0 (🎎) JAPANESE DOLLS -1F38F ; emoji ; L1 ; none ; j # V6.0 (🎏) CARP STREAMER -1F390 ; emoji ; L1 ; none ; j # V6.0 (🎐) WIND CHIME -1F391 ; emoji ; L1 ; none ; j # V6.0 (🎑) MOON VIEWING CEREMONY -1F392 ; emoji ; L1 ; none ; j # V6.0 (🎒) SCHOOL SATCHEL -1F393 ; emoji ; L1 ; none ; j w # V6.0 (🎓) GRADUATION CAP -1F396 ; text ; L2 ; none ; w # V7.0 (🎖) MILITARY MEDAL -1F397 ; text ; L2 ; none ; w # V7.0 (🎗) REMINDER RIBBON -1F399 ; text ; L2 ; none ; w # V7.0 (🎙) STUDIO MICROPHONE -1F39A ; text ; L2 ; none ; w # V7.0 (🎚) LEVEL SLIDER -1F39B ; text ; L2 ; none ; w # V7.0 (🎛) CONTROL KNOBS -1F39E ; text ; L2 ; none ; w # V7.0 (🎞) FILM FRAMES -1F39F ; text ; L2 ; none ; w # V7.0 (🎟) ADMISSION TICKETS -1F3A0 ; emoji ; L1 ; none ; j # V6.0 (🎠) CAROUSEL HORSE -1F3A1 ; emoji ; L1 ; none ; j # V6.0 (🎡) FERRIS WHEEL -1F3A2 ; emoji ; L1 ; none ; j # V6.0 (🎢) ROLLER COASTER -1F3A3 ; emoji ; L1 ; none ; j # V6.0 (🎣) FISHING POLE AND FISH -1F3A4 ; emoji ; L1 ; none ; j # V6.0 (🎤) MICROPHONE -1F3A5 ; emoji ; L1 ; none ; j # V6.0 (🎥) MOVIE CAMERA -1F3A6 ; emoji ; L1 ; none ; j # V6.0 (🎦) CINEMA -1F3A7 ; emoji ; L1 ; none ; j w # V6.0 (🎧) HEADPHONE -1F3A8 ; emoji ; L1 ; none ; j # V6.0 (🎨) ARTIST PALETTE -1F3A9 ; emoji ; L1 ; none ; j # V6.0 (🎩) TOP HAT -1F3AA ; emoji ; L1 ; none ; j # V6.0 (🎪) CIRCUS TENT -1F3AB ; emoji ; L1 ; none ; j # V6.0 (🎫) TICKET -1F3AC ; emoji ; L1 ; none ; j w # V6.0 (🎬) CLAPPER BOARD -1F3AD ; emoji ; L1 ; none ; j w # V6.0 (🎭) PERFORMING ARTS -1F3AE ; emoji ; L1 ; none ; j w # V6.0 (🎮) VIDEO GAME -1F3AF ; emoji ; L1 ; none ; j # V6.0 (🎯) DIRECT HIT -1F3B0 ; emoji ; L1 ; none ; j # V6.0 (🎰) SLOT MACHINE -1F3B1 ; emoji ; L1 ; none ; j # V6.0 (🎱) BILLIARDS -1F3B2 ; emoji ; L1 ; none ; j # V6.0 (🎲) GAME DIE -1F3B3 ; emoji ; L1 ; none ; j # V6.0 (🎳) BOWLING -1F3B4 ; emoji ; L1 ; none ; j # V6.0 (🎴) FLOWER PLAYING CARDS -1F3B5 ; emoji ; L1 ; none ; j # V6.0 (🎵) MUSICAL NOTE -1F3B6 ; emoji ; L1 ; none ; j # V6.0 (🎶) MULTIPLE MUSICAL NOTES -1F3B7 ; emoji ; L1 ; none ; j # V6.0 (🎷) SAXOPHONE -1F3B8 ; emoji ; L1 ; none ; j # V6.0 (🎸) GUITAR -1F3B9 ; emoji ; L1 ; none ; j # V6.0 (🎹) MUSICAL KEYBOARD -1F3BA ; emoji ; L1 ; none ; j # V6.0 (🎺) TRUMPET -1F3BB ; emoji ; L1 ; none ; j # V6.0 (🎻) VIOLIN -1F3BC ; emoji ; L1 ; none ; j # V6.0 (🎼) MUSICAL SCORE -1F3BD ; emoji ; L1 ; none ; j # V6.0 (🎽) RUNNING SHIRT WITH SASH -1F3BE ; emoji ; L1 ; none ; j # V6.0 (🎾) TENNIS RACQUET AND BALL -1F3BF ; emoji ; L1 ; none ; j # V6.0 (🎿) SKI AND SKI BOOT -1F3C0 ; emoji ; L1 ; none ; j # V6.0 (🏀) BASKETBALL AND HOOP -1F3C1 ; emoji ; L1 ; none ; j # V6.0 (🏁) CHEQUERED FLAG -1F3C2 ; emoji ; L1 ; secondary ; j w # V6.0 (🏂) SNOWBOARDER -1F3C3 ; emoji ; L1 ; secondary ; j # V6.0 (🏃) RUNNER -1F3C4 ; emoji ; L1 ; secondary ; j w # V6.0 (🏄) SURFER -1F3C5 ; emoji ; L2 ; none ; x # V7.0 (🏅) SPORTS MEDAL -1F3C6 ; emoji ; L1 ; none ; j w # V6.0 (🏆) TROPHY -1F3C7 ; emoji ; L1 ; secondary ; x # V6.0 (🏇) HORSE RACING -1F3C8 ; emoji ; L1 ; none ; j # V6.0 (🏈) AMERICAN FOOTBALL -1F3C9 ; emoji ; L1 ; none ; x # V6.0 (🏉) RUGBY FOOTBALL -1F3CA ; emoji ; L1 ; secondary ; j w # V6.0 (🏊) SWIMMER -1F3CB ; text ; L2 ; none ; w # V7.0 (🏋) WEIGHT LIFTER -1F3CC ; text ; L2 ; none ; w # V7.0 (🏌) GOLFER -1F3CD ; text ; L2 ; none ; w # V7.0 (🏍) RACING MOTORCYCLE -1F3CE ; text ; L2 ; none ; w # V7.0 (🏎) RACING CAR -1F3CF ; emoji ; L2 ; none ; x # V8.0 (🏏) CRICKET BAT AND BALL -1F3D0 ; emoji ; L2 ; none ; x # V8.0 (🏐) VOLLEYBALL -1F3D1 ; emoji ; L2 ; none ; x # V8.0 (🏑) FIELD HOCKEY STICK AND BALL -1F3D2 ; emoji ; L2 ; none ; x # V8.0 (🏒) ICE HOCKEY STICK AND PUCK -1F3D3 ; emoji ; L2 ; none ; x # V8.0 (🏓) TABLE TENNIS PADDLE AND BALL -1F3D4 ; text ; L2 ; none ; w # V7.0 (🏔) SNOW CAPPED MOUNTAIN -1F3D5 ; text ; L2 ; none ; w # V7.0 (🏕) CAMPING -1F3D6 ; text ; L2 ; none ; w # V7.0 (🏖) BEACH WITH UMBRELLA -1F3D7 ; text ; L2 ; none ; w # V7.0 (🏗) BUILDING CONSTRUCTION -1F3D8 ; text ; L2 ; none ; w # V7.0 (🏘) HOUSE BUILDINGS -1F3D9 ; text ; L2 ; none ; w # V7.0 (🏙) CITYSCAPE -1F3DA ; text ; L2 ; none ; w # V7.0 (🏚) DERELICT HOUSE BUILDING -1F3DB ; text ; L2 ; none ; w # V7.0 (🏛) CLASSICAL BUILDING -1F3DC ; text ; L2 ; none ; w # V7.0 (🏜) DESERT -1F3DD ; text ; L2 ; none ; w # V7.0 (🏝) DESERT ISLAND -1F3DE ; text ; L2 ; none ; w # V7.0 (🏞) NATIONAL PARK -1F3DF ; text ; L2 ; none ; w # V7.0 (🏟) STADIUM -1F3E0 ; emoji ; L1 ; none ; j w # V6.0 (🏠) HOUSE BUILDING -1F3E1 ; emoji ; L1 ; none ; j # V6.0 (🏡) HOUSE WITH GARDEN -1F3E2 ; emoji ; L1 ; none ; j # V6.0 (🏢) OFFICE BUILDING -1F3E3 ; emoji ; L1 ; none ; j # V6.0 (🏣) JAPANESE POST OFFICE -1F3E4 ; emoji ; L1 ; none ; x # V6.0 (🏤) EUROPEAN POST OFFICE -1F3E5 ; emoji ; L1 ; none ; j # V6.0 (🏥) HOSPITAL -1F3E6 ; emoji ; L1 ; none ; j # V6.0 (🏦) BANK -1F3E7 ; emoji ; L1 ; none ; j # V6.0 (🏧) AUTOMATED TELLER MACHINE -1F3E8 ; emoji ; L1 ; none ; j # V6.0 (🏨) HOTEL -1F3E9 ; emoji ; L1 ; none ; j # V6.0 (🏩) LOVE HOTEL -1F3EA ; emoji ; L1 ; none ; j # V6.0 (🏪) CONVENIENCE STORE -1F3EB ; emoji ; L1 ; none ; j # V6.0 (🏫) SCHOOL -1F3EC ; emoji ; L1 ; none ; j # V6.0 (🏬) DEPARTMENT STORE -1F3ED ; emoji ; L1 ; none ; j w # V6.0 (🏭) FACTORY -1F3EE ; emoji ; L1 ; none ; j # V6.0 (🏮) IZAKAYA LANTERN -1F3EF ; emoji ; L1 ; none ; j # V6.0 (🏯) JAPANESE CASTLE -1F3F0 ; emoji ; L1 ; none ; j # V6.0 (🏰) EUROPEAN CASTLE -1F3F3 ; text ; L2 ; none ; w # V7.0 (🏳) WAVING WHITE FLAG -1F3F4 ; emoji ; L2 ; none ; x # V7.0 (🏴) WAVING BLACK FLAG -1F3F5 ; text ; L2 ; none ; w # V7.0 (🏵) ROSETTE -1F3F7 ; text ; L2 ; none ; w # V7.0 (🏷) LABEL -1F3F8 ; emoji ; L2 ; none ; x # V8.0 (🏸) BADMINTON RACQUET AND SHUTTLECOCK -1F3F9 ; emoji ; L2 ; none ; x # V8.0 (🏹) BOW AND ARROW -1F3FA ; emoji ; L2 ; none ; x # V8.0 (🏺) AMPHORA -1F3FB ; emoji ; L2 ; modifier ; x # V8.0 (🏻) EMOJI MODIFIER FITZPATRICK TYPE-1-2 -1F3FC ; emoji ; L2 ; modifier ; x # V8.0 (🏼) EMOJI MODIFIER FITZPATRICK TYPE-3 -1F3FD ; emoji ; L2 ; modifier ; x # V8.0 (🏽) EMOJI MODIFIER FITZPATRICK TYPE-4 -1F3FE ; emoji ; L2 ; modifier ; x # V8.0 (🏾) EMOJI MODIFIER FITZPATRICK TYPE-5 -1F3FF ; emoji ; L2 ; modifier ; x # V8.0 (🏿) EMOJI MODIFIER FITZPATRICK TYPE-6 -1F400 ; emoji ; L1 ; none ; x # V6.0 (🐀) RAT -1F401 ; emoji ; L1 ; none ; x # V6.0 (🐁) MOUSE -1F402 ; emoji ; L1 ; none ; x # V6.0 (🐂) OX -1F403 ; emoji ; L1 ; none ; x # V6.0 (🐃) WATER BUFFALO -1F404 ; emoji ; L1 ; none ; x # V6.0 (🐄) COW -1F405 ; emoji ; L1 ; none ; x # V6.0 (🐅) TIGER -1F406 ; emoji ; L1 ; none ; x # V6.0 (🐆) LEOPARD -1F407 ; emoji ; L1 ; none ; x # V6.0 (🐇) RABBIT -1F408 ; emoji ; L1 ; none ; w # V6.0 (🐈) CAT -1F409 ; emoji ; L1 ; none ; x # V6.0 (🐉) DRAGON -1F40A ; emoji ; L1 ; none ; x # V6.0 (🐊) CROCODILE -1F40B ; emoji ; L1 ; none ; x # V6.0 (🐋) WHALE -1F40C ; emoji ; L1 ; none ; j # V6.0 (🐌) SNAIL -1F40D ; emoji ; L1 ; none ; j # V6.0 (🐍) SNAKE -1F40E ; emoji ; L1 ; none ; j # V6.0 (🐎) HORSE -1F40F ; emoji ; L1 ; none ; x # V6.0 (🐏) RAM -1F410 ; emoji ; L1 ; none ; x # V6.0 (🐐) GOAT -1F411 ; emoji ; L1 ; none ; j # V6.0 (🐑) SHEEP -1F412 ; emoji ; L1 ; none ; j # V6.0 (🐒) MONKEY -1F413 ; emoji ; L1 ; none ; x # V6.0 (🐓) ROOSTER -1F414 ; emoji ; L1 ; none ; j # V6.0 (🐔) CHICKEN -1F415 ; emoji ; L1 ; none ; w # V6.0 (🐕) DOG -1F416 ; emoji ; L1 ; none ; x # V6.0 (🐖) PIG -1F417 ; emoji ; L1 ; none ; j # V6.0 (🐗) BOAR -1F418 ; emoji ; L1 ; none ; j # V6.0 (🐘) ELEPHANT -1F419 ; emoji ; L1 ; none ; j # V6.0 (🐙) OCTOPUS -1F41A ; emoji ; L1 ; none ; j # V6.0 (🐚) SPIRAL SHELL -1F41B ; emoji ; L1 ; none ; j # V6.0 (🐛) BUG -1F41C ; emoji ; L1 ; none ; j # V6.0 (🐜) ANT -1F41D ; emoji ; L1 ; none ; j # V6.0 (🐝) HONEYBEE -1F41E ; emoji ; L1 ; none ; j # V6.0 (🐞) LADY BEETLE -1F41F ; emoji ; L1 ; none ; j w # V6.0 (🐟) FISH -1F420 ; emoji ; L1 ; none ; j # V6.0 (🐠) TROPICAL FISH -1F421 ; emoji ; L1 ; none ; j # V6.0 (🐡) BLOWFISH -1F422 ; emoji ; L1 ; none ; j # V6.0 (🐢) TURTLE -1F423 ; emoji ; L1 ; none ; j # V6.0 (🐣) HATCHING CHICK -1F424 ; emoji ; L1 ; none ; j # V6.0 (🐤) BABY CHICK -1F425 ; emoji ; L1 ; none ; j # V6.0 (🐥) FRONT-FACING BABY CHICK -1F426 ; emoji ; L1 ; none ; j w # V6.0 (🐦) BIRD -1F427 ; emoji ; L1 ; none ; j # V6.0 (🐧) PENGUIN -1F428 ; emoji ; L1 ; none ; j # V6.0 (🐨) KOALA -1F429 ; emoji ; L1 ; none ; j # V6.0 (🐩) POODLE -1F42A ; emoji ; L1 ; none ; x # V6.0 (🐪) DROMEDARY CAMEL -1F42B ; emoji ; L1 ; none ; j # V6.0 (🐫) BACTRIAN CAMEL -1F42C ; emoji ; L1 ; none ; j # V6.0 (🐬) DOLPHIN -1F42D ; emoji ; L1 ; none ; j # V6.0 (🐭) MOUSE FACE -1F42E ; emoji ; L1 ; none ; j # V6.0 (🐮) COW FACE -1F42F ; emoji ; L1 ; none ; j # V6.0 (🐯) TIGER FACE -1F430 ; emoji ; L1 ; none ; j # V6.0 (🐰) RABBIT FACE -1F431 ; emoji ; L1 ; none ; j # V6.0 (🐱) CAT FACE -1F432 ; emoji ; L1 ; none ; j # V6.0 (🐲) DRAGON FACE -1F433 ; emoji ; L1 ; none ; j # V6.0 (🐳) SPOUTING WHALE -1F434 ; emoji ; L1 ; none ; j # V6.0 (🐴) HORSE FACE -1F435 ; emoji ; L1 ; none ; j # V6.0 (🐵) MONKEY FACE -1F436 ; emoji ; L1 ; none ; j # V6.0 (🐶) DOG FACE -1F437 ; emoji ; L1 ; none ; j # V6.0 (🐷) PIG FACE -1F438 ; emoji ; L1 ; none ; j # V6.0 (🐸) FROG FACE -1F439 ; emoji ; L1 ; none ; j # V6.0 (🐹) HAMSTER FACE -1F43A ; emoji ; L1 ; none ; j # V6.0 (🐺) WOLF FACE -1F43B ; emoji ; L1 ; none ; j # V6.0 (🐻) BEAR FACE -1F43C ; emoji ; L1 ; none ; j # V6.0 (🐼) PANDA FACE -1F43D ; emoji ; L1 ; none ; j # V6.0 (🐽) PIG NOSE -1F43E ; emoji ; L1 ; none ; j # V6.0 (🐾) PAW PRINTS -1F43F ; text ; L2 ; none ; w # V7.0 (🐿) CHIPMUNK -1F440 ; emoji ; L1 ; none ; j # V6.0 (👀) EYES -1F441 ; text ; L2 ; none ; w # V7.0 (👁) EYE -1F442 ; emoji ; L1 ; secondary ; j w # V6.0 (👂) EAR -1F443 ; emoji ; L1 ; secondary ; j # V6.0 (👃) NOSE -1F444 ; emoji ; L1 ; none ; j # V6.0 (👄) MOUTH -1F445 ; emoji ; L1 ; none ; j # V6.0 (👅) TONGUE -1F446 ; emoji ; L1 ; secondary ; j w # V6.0 (👆) WHITE UP POINTING BACKHAND INDEX -1F447 ; emoji ; L1 ; secondary ; j w # V6.0 (👇) WHITE DOWN POINTING BACKHAND INDEX -1F448 ; emoji ; L1 ; secondary ; j w # V6.0 (👈) WHITE LEFT POINTING BACKHAND INDEX -1F449 ; emoji ; L1 ; secondary ; j w # V6.0 (👉) WHITE RIGHT POINTING BACKHAND INDEX -1F44A ; emoji ; L1 ; secondary ; j # V6.0 (👊) FISTED HAND SIGN -1F44B ; emoji ; L1 ; secondary ; j # V6.0 (👋) WAVING HAND SIGN -1F44C ; emoji ; L1 ; secondary ; j # V6.0 (👌) OK HAND SIGN -1F44D ; emoji ; L1 ; secondary ; j w # V6.0 (👍) THUMBS UP SIGN -1F44E ; emoji ; L1 ; secondary ; j w # V6.0 (👎) THUMBS DOWN SIGN -1F44F ; emoji ; L1 ; secondary ; j # V6.0 (👏) CLAPPING HANDS SIGN -1F450 ; emoji ; L1 ; secondary ; j # V6.0 (👐) OPEN HANDS SIGN -1F451 ; emoji ; L1 ; none ; j # V6.0 (👑) CROWN -1F452 ; emoji ; L1 ; none ; j # V6.0 (👒) WOMANS HAT -1F453 ; emoji ; L1 ; none ; j w # V6.0 (👓) EYEGLASSES -1F454 ; emoji ; L1 ; none ; j # V6.0 (👔) NECKTIE -1F455 ; emoji ; L1 ; none ; j # V6.0 (👕) T-SHIRT -1F456 ; emoji ; L1 ; none ; j # V6.0 (👖) JEANS -1F457 ; emoji ; L1 ; none ; j # V6.0 (👗) DRESS -1F458 ; emoji ; L1 ; none ; j # V6.0 (👘) KIMONO -1F459 ; emoji ; L1 ; none ; j # V6.0 (👙) BIKINI -1F45A ; emoji ; L1 ; none ; j # V6.0 (👚) WOMANS CLOTHES -1F45B ; emoji ; L1 ; none ; j # V6.0 (👛) PURSE -1F45C ; emoji ; L1 ; none ; j # V6.0 (👜) HANDBAG -1F45D ; emoji ; L1 ; none ; j # V6.0 (👝) POUCH -1F45E ; emoji ; L1 ; none ; j # V6.0 (👞) MANS SHOE -1F45F ; emoji ; L1 ; none ; j # V6.0 (👟) ATHLETIC SHOE -1F460 ; emoji ; L1 ; none ; j # V6.0 (👠) HIGH-HEELED SHOE -1F461 ; emoji ; L1 ; none ; j # V6.0 (👡) WOMANS SANDAL -1F462 ; emoji ; L1 ; none ; j # V6.0 (👢) WOMANS BOOTS -1F463 ; emoji ; L1 ; none ; j # V6.0 (👣) FOOTPRINTS -1F464 ; emoji ; L1 ; none ; j # V6.0 (👤) BUST IN SILHOUETTE -1F465 ; emoji ; L1 ; none ; x # V6.0 (👥) BUSTS IN SILHOUETTE -1F466 ; emoji ; L1 ; primary ; j # V6.0 (👦) BOY -1F467 ; emoji ; L1 ; primary ; j # V6.0 (👧) GIRL -1F468 ; emoji ; L1 ; primary ; j # V6.0 (👨) MAN -1F469 ; emoji ; L1 ; primary ; j # V6.0 (👩) WOMAN -1F46A ; emoji ; L1 ; none ; j w # V6.0 (👪) FAMILY -1F46B ; emoji ; L1 ; none ; j # V6.0 (👫) MAN AND WOMAN HOLDING HANDS -1F46C ; emoji ; L1 ; none ; x # V6.0 (👬) TWO MEN HOLDING HANDS -1F46D ; emoji ; L1 ; none ; x # V6.0 (👭) TWO WOMEN HOLDING HANDS -1F46E ; emoji ; L1 ; primary ; j # V6.0 (👮) POLICE OFFICER -1F46F ; emoji ; L1 ; none ; j # V6.0 (👯) WOMAN WITH BUNNY EARS -1F470 ; emoji ; L1 ; primary ; j # V6.0 (👰) BRIDE WITH VEIL -1F471 ; emoji ; L1 ; primary ; j # V6.0 (👱) PERSON WITH BLOND HAIR -1F472 ; emoji ; L1 ; primary ; j # V6.0 (👲) MAN WITH GUA PI MAO -1F473 ; emoji ; L1 ; primary ; j # V6.0 (👳) MAN WITH TURBAN -1F474 ; emoji ; L1 ; primary ; j # V6.0 (👴) OLDER MAN -1F475 ; emoji ; L1 ; primary ; j # V6.0 (👵) OLDER WOMAN -1F476 ; emoji ; L1 ; primary ; j # V6.0 (👶) BABY -1F477 ; emoji ; L1 ; primary ; j # V6.0 (👷) CONSTRUCTION WORKER -1F478 ; emoji ; L1 ; primary ; j # V6.0 (👸) PRINCESS -1F479 ; emoji ; L1 ; none ; j # V6.0 (👹) JAPANESE OGRE -1F47A ; emoji ; L1 ; none ; j # V6.0 (👺) JAPANESE GOBLIN -1F47B ; emoji ; L1 ; none ; j # V6.0 (👻) GHOST -1F47C ; emoji ; L1 ; primary ; j # V6.0 (👼) BABY ANGEL -1F47D ; emoji ; L1 ; none ; j w # V6.0 (👽) EXTRATERRESTRIAL ALIEN -1F47E ; emoji ; L1 ; none ; j # V6.0 (👾) ALIEN MONSTER -1F47F ; emoji ; L1 ; secondary ; j # V6.0 (👿) IMP -1F480 ; emoji ; L1 ; none ; j # V6.0 (💀) SKULL -1F481 ; emoji ; L1 ; primary ; j # V6.0 (💁) INFORMATION DESK PERSON -1F482 ; emoji ; L1 ; primary ; j # V6.0 (💂) GUARDSMAN -1F483 ; emoji ; L1 ; secondary ; j # V6.0 (💃) DANCER -1F484 ; emoji ; L1 ; none ; j # V6.0 (💄) LIPSTICK -1F485 ; emoji ; L1 ; secondary ; j # V6.0 (💅) NAIL POLISH -1F486 ; emoji ; L1 ; primary ; j # V6.0 (💆) FACE MASSAGE -1F487 ; emoji ; L1 ; primary ; j # V6.0 (💇) HAIRCUT -1F488 ; emoji ; L1 ; none ; j # V6.0 (💈) BARBER POLE -1F489 ; emoji ; L1 ; none ; j # V6.0 (💉) SYRINGE -1F48A ; emoji ; L1 ; none ; j # V6.0 (💊) PILL -1F48B ; emoji ; L1 ; none ; j # V6.0 (💋) KISS MARK -1F48C ; emoji ; L1 ; none ; j # V6.0 (💌) LOVE LETTER -1F48D ; emoji ; L1 ; none ; j # V6.0 (💍) RING -1F48E ; emoji ; L1 ; none ; j # V6.0 (💎) GEM STONE -1F48F ; emoji ; L1 ; none ; j # V6.0 (💏) KISS -1F490 ; emoji ; L1 ; none ; j # V6.0 (💐) BOUQUET -1F491 ; emoji ; L1 ; none ; j # V6.0 (💑) COUPLE WITH HEART -1F492 ; emoji ; L1 ; none ; j # V6.0 (💒) WEDDING -1F493 ; emoji ; L1 ; none ; j # V6.0 (💓) BEATING HEART -1F494 ; emoji ; L1 ; none ; j # V6.0 (💔) BROKEN HEART -1F495 ; emoji ; L1 ; none ; j # V6.0 (💕) TWO HEARTS -1F496 ; emoji ; L1 ; none ; j # V6.0 (💖) SPARKLING HEART -1F497 ; emoji ; L1 ; none ; j # V6.0 (💗) GROWING HEART -1F498 ; emoji ; L1 ; none ; j # V6.0 (💘) HEART WITH ARROW -1F499 ; emoji ; L1 ; none ; j # V6.0 (💙) BLUE HEART -1F49A ; emoji ; L1 ; none ; j # V6.0 (💚) GREEN HEART -1F49B ; emoji ; L1 ; none ; j # V6.0 (💛) YELLOW HEART -1F49C ; emoji ; L1 ; none ; j # V6.0 (💜) PURPLE HEART -1F49D ; emoji ; L1 ; none ; j # V6.0 (💝) HEART WITH RIBBON -1F49E ; emoji ; L1 ; none ; j # V6.0 (💞) REVOLVING HEARTS -1F49F ; emoji ; L1 ; none ; j # V6.0 (💟) HEART DECORATION -1F4A0 ; emoji ; L1 ; none ; j # V6.0 (💠) DIAMOND SHAPE WITH A DOT INSIDE -1F4A1 ; emoji ; L1 ; none ; j # V6.0 (💡) ELECTRIC LIGHT BULB -1F4A2 ; emoji ; L1 ; none ; j # V6.0 (💢) ANGER SYMBOL -1F4A3 ; emoji ; L1 ; none ; j w # V6.0 (💣) BOMB -1F4A4 ; emoji ; L1 ; none ; j # V6.0 (💤) SLEEPING SYMBOL -1F4A5 ; emoji ; L1 ; none ; j # V6.0 (💥) COLLISION SYMBOL -1F4A6 ; emoji ; L1 ; none ; j # V6.0 (💦) SPLASHING SWEAT SYMBOL -1F4A7 ; emoji ; L1 ; none ; j # V6.0 (💧) DROPLET -1F4A8 ; emoji ; L1 ; none ; j # V6.0 (💨) DASH SYMBOL -1F4A9 ; emoji ; L1 ; none ; j # V6.0 (💩) PILE OF POO -1F4AA ; emoji ; L1 ; secondary ; j # V6.0 (💪) FLEXED BICEPS -1F4AB ; emoji ; L1 ; none ; j # V6.0 (💫) DIZZY SYMBOL -1F4AC ; emoji ; L1 ; none ; j # V6.0 (💬) SPEECH BALLOON -1F4AD ; emoji ; L1 ; none ; x # V6.0 (💭) THOUGHT BALLOON -1F4AE ; emoji ; L1 ; none ; j # V6.0 (💮) WHITE FLOWER -1F4AF ; emoji ; L1 ; none ; j # V6.0 (💯) HUNDRED POINTS SYMBOL -1F4B0 ; emoji ; L1 ; none ; j w # V6.0 (💰) MONEY BAG -1F4B1 ; emoji ; L1 ; none ; j # V6.0 (💱) CURRENCY EXCHANGE -1F4B2 ; emoji ; L1 ; none ; j # V6.0 (💲) HEAVY DOLLAR SIGN -1F4B3 ; emoji ; L1 ; none ; j w # V6.0 (💳) CREDIT CARD -1F4B4 ; emoji ; L1 ; none ; j # V6.0 (💴) BANKNOTE WITH YEN SIGN -1F4B5 ; emoji ; L1 ; none ; j # V6.0 (💵) BANKNOTE WITH DOLLAR SIGN -1F4B6 ; emoji ; L1 ; none ; x # V6.0 (💶) BANKNOTE WITH EURO SIGN -1F4B7 ; emoji ; L1 ; none ; x # V6.0 (💷) BANKNOTE WITH POUND SIGN -1F4B8 ; emoji ; L1 ; none ; j # V6.0 (💸) MONEY WITH WINGS -1F4B9 ; emoji ; L1 ; none ; j # V6.0 (💹) CHART WITH UPWARDS TREND AND YEN SIGN -1F4BA ; emoji ; L1 ; none ; j # V6.0 (💺) SEAT -1F4BB ; emoji ; L1 ; none ; j w # V6.0 (💻) PERSONAL COMPUTER -1F4BC ; emoji ; L1 ; none ; j # V6.0 (💼) BRIEFCASE -1F4BD ; emoji ; L1 ; none ; j # V6.0 (💽) MINIDISC -1F4BE ; emoji ; L1 ; none ; j # V6.0 (💾) FLOPPY DISK -1F4BF ; emoji ; L1 ; none ; j w # V6.0 (💿) OPTICAL DISC -1F4C0 ; emoji ; L1 ; none ; j # V6.0 (📀) DVD -1F4C1 ; emoji ; L1 ; none ; j # V6.0 (📁) FILE FOLDER -1F4C2 ; emoji ; L1 ; none ; j # V6.0 (📂) OPEN FILE FOLDER -1F4C3 ; emoji ; L1 ; none ; j # V6.0 (📃) PAGE WITH CURL -1F4C4 ; emoji ; L1 ; none ; j # V6.0 (📄) PAGE FACING UP -1F4C5 ; emoji ; L1 ; none ; j # V6.0 (📅) CALENDAR -1F4C6 ; emoji ; L1 ; none ; j # V6.0 (📆) TEAR-OFF CALENDAR -1F4C7 ; emoji ; L1 ; none ; j # V6.0 (📇) CARD INDEX -1F4C8 ; emoji ; L1 ; none ; j # V6.0 (📈) CHART WITH UPWARDS TREND -1F4C9 ; emoji ; L1 ; none ; j # V6.0 (📉) CHART WITH DOWNWARDS TREND -1F4CA ; emoji ; L1 ; none ; j # V6.0 (📊) BAR CHART -1F4CB ; emoji ; L1 ; none ; j w # V6.0 (📋) CLIPBOARD -1F4CC ; emoji ; L1 ; none ; j # V6.0 (📌) PUSHPIN -1F4CD ; emoji ; L1 ; none ; j # V6.0 (📍) ROUND PUSHPIN -1F4CE ; emoji ; L1 ; none ; j # V6.0 (📎) PAPERCLIP -1F4CF ; emoji ; L1 ; none ; j # V6.0 (📏) STRAIGHT RULER -1F4D0 ; emoji ; L1 ; none ; j # V6.0 (📐) TRIANGULAR RULER -1F4D1 ; emoji ; L1 ; none ; j # V6.0 (📑) BOOKMARK TABS -1F4D2 ; emoji ; L1 ; none ; j # V6.0 (📒) LEDGER -1F4D3 ; emoji ; L1 ; none ; j # V6.0 (📓) NOTEBOOK -1F4D4 ; emoji ; L1 ; none ; j # V6.0 (📔) NOTEBOOK WITH DECORATIVE COVER -1F4D5 ; emoji ; L1 ; none ; j # V6.0 (📕) CLOSED BOOK -1F4D6 ; emoji ; L1 ; none ; j # V6.0 (📖) OPEN BOOK -1F4D7 ; emoji ; L1 ; none ; j # V6.0 (📗) GREEN BOOK -1F4D8 ; emoji ; L1 ; none ; j # V6.0 (📘) BLUE BOOK -1F4D9 ; emoji ; L1 ; none ; j # V6.0 (📙) ORANGE BOOK -1F4DA ; emoji ; L1 ; none ; j w # V6.0 (📚) BOOKS -1F4DB ; emoji ; L1 ; none ; j # V6.0 (📛) NAME BADGE -1F4DC ; emoji ; L1 ; none ; j # V6.0 (📜) SCROLL -1F4DD ; emoji ; L1 ; none ; j # V6.0 (📝) MEMO -1F4DE ; emoji ; L1 ; none ; j # V6.0 (📞) TELEPHONE RECEIVER -1F4DF ; emoji ; L1 ; none ; j w # V6.0 (📟) PAGER -1F4E0 ; emoji ; L1 ; none ; j # V6.0 (📠) FAX MACHINE -1F4E1 ; emoji ; L1 ; none ; j # V6.0 (📡) SATELLITE ANTENNA -1F4E2 ; emoji ; L1 ; none ; j # V6.0 (📢) PUBLIC ADDRESS LOUDSPEAKER -1F4E3 ; emoji ; L1 ; none ; j # V6.0 (📣) CHEERING MEGAPHONE -1F4E4 ; emoji ; L1 ; none ; j w # V6.0 (📤) OUTBOX TRAY -1F4E5 ; emoji ; L1 ; none ; j w # V6.0 (📥) INBOX TRAY -1F4E6 ; emoji ; L1 ; none ; j w # V6.0 (📦) PACKAGE -1F4E7 ; emoji ; L1 ; none ; j # V6.0 (📧) E-MAIL SYMBOL -1F4E8 ; emoji ; L1 ; none ; j # V6.0 (📨) INCOMING ENVELOPE -1F4E9 ; emoji ; L1 ; none ; j # V6.0 (📩) ENVELOPE WITH DOWNWARDS ARROW ABOVE -1F4EA ; emoji ; L1 ; none ; j w # V6.0 (📪) CLOSED MAILBOX WITH LOWERED FLAG -1F4EB ; emoji ; L1 ; none ; j w # V6.0 (📫) CLOSED MAILBOX WITH RAISED FLAG -1F4EC ; emoji ; L1 ; none ; w # V6.0 (📬) OPEN MAILBOX WITH RAISED FLAG -1F4ED ; emoji ; L1 ; none ; w # V6.0 (📭) OPEN MAILBOX WITH LOWERED FLAG -1F4EE ; emoji ; L1 ; none ; j # V6.0 (📮) POSTBOX -1F4EF ; emoji ; L1 ; none ; x # V6.0 (📯) POSTAL HORN -1F4F0 ; emoji ; L1 ; none ; j # V6.0 (📰) NEWSPAPER -1F4F1 ; emoji ; L1 ; none ; j # V6.0 (📱) MOBILE PHONE -1F4F2 ; emoji ; L1 ; none ; j # V6.0 (📲) MOBILE PHONE WITH RIGHTWARDS ARROW AT LEFT -1F4F3 ; emoji ; L1 ; none ; j # V6.0 (📳) VIBRATION MODE -1F4F4 ; emoji ; L1 ; none ; j # V6.0 (📴) MOBILE PHONE OFF -1F4F5 ; emoji ; L1 ; none ; x # V6.0 (📵) NO MOBILE PHONES -1F4F6 ; emoji ; L1 ; none ; j # V6.0 (📶) ANTENNA WITH BARS -1F4F7 ; emoji ; L1 ; none ; j w # V6.0 (📷) CAMERA -1F4F8 ; emoji ; L2 ; none ; x # V7.0 (📸) CAMERA WITH FLASH -1F4F9 ; emoji ; L1 ; none ; j w # V6.0 (📹) VIDEO CAMERA -1F4FA ; emoji ; L1 ; none ; j w # V6.0 (📺) TELEVISION -1F4FB ; emoji ; L1 ; none ; j w # V6.0 (📻) RADIO -1F4FC ; emoji ; L1 ; none ; j # V6.0 (📼) VIDEOCASSETTE -1F4FD ; text ; L2 ; none ; w # V7.0 (📽) FILM PROJECTOR -1F4FF ; emoji ; L2 ; none ; x # V8.0 (📿) PRAYER BEADS -1F500 ; emoji ; L1 ; none ; x # V6.0 (🔀) TWISTED RIGHTWARDS ARROWS -1F501 ; emoji ; L1 ; none ; x # V6.0 (🔁) CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS -1F502 ; emoji ; L1 ; none ; x # V6.0 (🔂) CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS WITH CIRCLED ONE OVERLAY -1F503 ; emoji ; L1 ; none ; j # V6.0 (🔃) CLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS -1F504 ; emoji ; L1 ; none ; x # V6.0 (🔄) ANTICLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS -1F505 ; emoji ; L1 ; none ; x # V6.0 (🔅) LOW BRIGHTNESS SYMBOL -1F506 ; emoji ; L1 ; none ; x # V6.0 (🔆) HIGH BRIGHTNESS SYMBOL -1F507 ; emoji ; L1 ; none ; x # V6.0 (🔇) SPEAKER WITH CANCELLATION STROKE -1F508 ; emoji ; L1 ; none ; w # V6.0 (🔈) SPEAKER -1F509 ; emoji ; L1 ; none ; x # V6.0 (🔉) SPEAKER WITH ONE SOUND WAVE -1F50A ; emoji ; L1 ; none ; j # V6.0 (🔊) SPEAKER WITH THREE SOUND WAVES -1F50B ; emoji ; L1 ; none ; j # V6.0 (🔋) BATTERY -1F50C ; emoji ; L1 ; none ; j # V6.0 (🔌) ELECTRIC PLUG -1F50D ; emoji ; L1 ; none ; j w # V6.0 (🔍) LEFT-POINTING MAGNIFYING GLASS -1F50E ; emoji ; L1 ; none ; j # V6.0 (🔎) RIGHT-POINTING MAGNIFYING GLASS -1F50F ; emoji ; L1 ; none ; j # V6.0 (🔏) LOCK WITH INK PEN -1F510 ; emoji ; L1 ; none ; j # V6.0 (🔐) CLOSED LOCK WITH KEY -1F511 ; emoji ; L1 ; none ; j # V6.0 (🔑) KEY -1F512 ; emoji ; L1 ; none ; j w # V6.0 (🔒) LOCK -1F513 ; emoji ; L1 ; none ; j w # V6.0 (🔓) OPEN LOCK -1F514 ; emoji ; L1 ; none ; j # V6.0 (🔔) BELL -1F515 ; emoji ; L1 ; none ; x # V6.0 (🔕) BELL WITH CANCELLATION STROKE -1F516 ; emoji ; L1 ; none ; j # V6.0 (🔖) BOOKMARK -1F517 ; emoji ; L1 ; none ; j # V6.0 (🔗) LINK SYMBOL -1F518 ; emoji ; L1 ; none ; j # V6.0 (🔘) RADIO BUTTON -1F519 ; emoji ; L1 ; none ; j # V6.0 (🔙) BACK WITH LEFTWARDS ARROW ABOVE -1F51A ; emoji ; L1 ; none ; j # V6.0 (🔚) END WITH LEFTWARDS ARROW ABOVE -1F51B ; emoji ; L1 ; none ; j # V6.0 (🔛) ON WITH EXCLAMATION MARK WITH LEFT RIGHT ARROW ABOVE -1F51C ; emoji ; L1 ; none ; j # V6.0 (🔜) SOON WITH RIGHTWARDS ARROW ABOVE -1F51D ; emoji ; L1 ; none ; j # V6.0 (🔝) TOP WITH UPWARDS ARROW ABOVE -1F51E ; emoji ; L1 ; none ; j # V6.0 (🔞) NO ONE UNDER EIGHTEEN SYMBOL -1F51F ; emoji ; L1 ; none ; j # V6.0 (🔟) KEYCAP TEN -1F520 ; emoji ; L1 ; none ; j # V6.0 (🔠) INPUT SYMBOL FOR LATIN CAPITAL LETTERS -1F521 ; emoji ; L1 ; none ; j # V6.0 (🔡) INPUT SYMBOL FOR LATIN SMALL LETTERS -1F522 ; emoji ; L1 ; none ; j # V6.0 (🔢) INPUT SYMBOL FOR NUMBERS -1F523 ; emoji ; L1 ; none ; j # V6.0 (🔣) INPUT SYMBOL FOR SYMBOLS -1F524 ; emoji ; L1 ; none ; j # V6.0 (🔤) INPUT SYMBOL FOR LATIN LETTERS -1F525 ; emoji ; L1 ; none ; j # V6.0 (🔥) FIRE -1F526 ; emoji ; L1 ; none ; j # V6.0 (🔦) ELECTRIC TORCH -1F527 ; emoji ; L1 ; none ; j # V6.0 (🔧) WRENCH -1F528 ; emoji ; L1 ; none ; j # V6.0 (🔨) HAMMER -1F529 ; emoji ; L1 ; none ; j # V6.0 (🔩) NUT AND BOLT -1F52A ; emoji ; L1 ; none ; j # V6.0 (🔪) HOCHO -1F52B ; emoji ; L1 ; none ; j # V6.0 (🔫) PISTOL -1F52C ; emoji ; L1 ; none ; x # V6.0 (🔬) MICROSCOPE -1F52D ; emoji ; L1 ; none ; x # V6.0 (🔭) TELESCOPE -1F52E ; emoji ; L1 ; none ; j # V6.0 (🔮) CRYSTAL BALL -1F52F ; emoji ; L1 ; none ; j # V6.0 (🔯) SIX POINTED STAR WITH MIDDLE DOT -1F530 ; emoji ; L1 ; none ; j # V6.0 (🔰) JAPANESE SYMBOL FOR BEGINNER -1F531 ; emoji ; L1 ; none ; j # V6.0 (🔱) TRIDENT EMBLEM -1F532 ; emoji ; L1 ; none ; j # V6.0 (🔲) BLACK SQUARE BUTTON -1F533 ; emoji ; L1 ; none ; j # V6.0 (🔳) WHITE SQUARE BUTTON -1F534 ; emoji ; L1 ; none ; j # V6.0 (🔴) LARGE RED CIRCLE -1F535 ; emoji ; L1 ; none ; j # V6.0 (🔵) LARGE BLUE CIRCLE -1F536 ; emoji ; L1 ; none ; j # V6.0 (🔶) LARGE ORANGE DIAMOND -1F537 ; emoji ; L1 ; none ; j # V6.0 (🔷) LARGE BLUE DIAMOND -1F538 ; emoji ; L1 ; none ; j # V6.0 (🔸) SMALL ORANGE DIAMOND -1F539 ; emoji ; L1 ; none ; j # V6.0 (🔹) SMALL BLUE DIAMOND -1F53A ; emoji ; L1 ; none ; j # V6.0 (🔺) UP-POINTING RED TRIANGLE -1F53B ; emoji ; L1 ; none ; j # V6.0 (🔻) DOWN-POINTING RED TRIANGLE -1F53C ; emoji ; L1 ; none ; j # V6.0 (🔼) UP-POINTING SMALL RED TRIANGLE -1F53D ; emoji ; L1 ; none ; j # V6.0 (🔽) DOWN-POINTING SMALL RED TRIANGLE -1F549 ; text ; L2 ; none ; w # V7.0 (🕉) OM SYMBOL -1F54A ; text ; L2 ; none ; w # V7.0 (🕊) DOVE OF PEACE -1F54B ; emoji ; L2 ; none ; x # V8.0 (🕋) KAABA -1F54C ; emoji ; L2 ; none ; x # V8.0 (🕌) MOSQUE -1F54D ; emoji ; L2 ; none ; x # V8.0 (🕍) SYNAGOGUE -1F54E ; emoji ; L2 ; none ; x # V8.0 (🕎) MENORAH WITH NINE BRANCHES -1F550 ; emoji ; L1 ; none ; j w # V6.0 (🕐) CLOCK FACE ONE OCLOCK -1F551 ; emoji ; L1 ; none ; j w # V6.0 (🕑) CLOCK FACE TWO OCLOCK -1F552 ; emoji ; L1 ; none ; j w # V6.0 (🕒) CLOCK FACE THREE OCLOCK -1F553 ; emoji ; L1 ; none ; j w # V6.0 (🕓) CLOCK FACE FOUR OCLOCK -1F554 ; emoji ; L1 ; none ; j w # V6.0 (🕔) CLOCK FACE FIVE OCLOCK -1F555 ; emoji ; L1 ; none ; j w # V6.0 (🕕) CLOCK FACE SIX OCLOCK -1F556 ; emoji ; L1 ; none ; j w # V6.0 (🕖) CLOCK FACE SEVEN OCLOCK -1F557 ; emoji ; L1 ; none ; j w # V6.0 (🕗) CLOCK FACE EIGHT OCLOCK -1F558 ; emoji ; L1 ; none ; j w # V6.0 (🕘) CLOCK FACE NINE OCLOCK -1F559 ; emoji ; L1 ; none ; j w # V6.0 (🕙) CLOCK FACE TEN OCLOCK -1F55A ; emoji ; L1 ; none ; j w # V6.0 (🕚) CLOCK FACE ELEVEN OCLOCK -1F55B ; emoji ; L1 ; none ; j w # V6.0 (🕛) CLOCK FACE TWELVE OCLOCK -1F55C ; emoji ; L1 ; none ; w # V6.0 (🕜) CLOCK FACE ONE-THIRTY -1F55D ; emoji ; L1 ; none ; w # V6.0 (🕝) CLOCK FACE TWO-THIRTY -1F55E ; emoji ; L1 ; none ; w # V6.0 (🕞) CLOCK FACE THREE-THIRTY -1F55F ; emoji ; L1 ; none ; w # V6.0 (🕟) CLOCK FACE FOUR-THIRTY -1F560 ; emoji ; L1 ; none ; w # V6.0 (🕠) CLOCK FACE FIVE-THIRTY -1F561 ; emoji ; L1 ; none ; w # V6.0 (🕡) CLOCK FACE SIX-THIRTY -1F562 ; emoji ; L1 ; none ; w # V6.0 (🕢) CLOCK FACE SEVEN-THIRTY -1F563 ; emoji ; L1 ; none ; w # V6.0 (🕣) CLOCK FACE EIGHT-THIRTY -1F564 ; emoji ; L1 ; none ; w # V6.0 (🕤) CLOCK FACE NINE-THIRTY -1F565 ; emoji ; L1 ; none ; w # V6.0 (🕥) CLOCK FACE TEN-THIRTY -1F566 ; emoji ; L1 ; none ; w # V6.0 (🕦) CLOCK FACE ELEVEN-THIRTY -1F567 ; emoji ; L1 ; none ; w # V6.0 (🕧) CLOCK FACE TWELVE-THIRTY -1F56F ; text ; L2 ; none ; w # V7.0 (🕯) CANDLE -1F570 ; text ; L2 ; none ; w # V7.0 (🕰) MANTELPIECE CLOCK -1F573 ; text ; L2 ; none ; w # V7.0 (🕳) HOLE -1F574 ; text ; L2 ; none ; w # V7.0 (🕴) MAN IN BUSINESS SUIT LEVITATING -1F575 ; text ; L2 ; none ; w # V7.0 (🕵) SLEUTH OR SPY -1F576 ; text ; L2 ; none ; w # V7.0 (🕶) DARK SUNGLASSES -1F577 ; text ; L2 ; none ; w # V7.0 (🕷) SPIDER -1F578 ; text ; L2 ; none ; w # V7.0 (🕸) SPIDER WEB -1F579 ; text ; L2 ; none ; w # V7.0 (🕹) JOYSTICK -1F587 ; text ; L2 ; none ; w # V7.0 (🖇) LINKED PAPERCLIPS -1F58A ; text ; L2 ; none ; w # V7.0 (🖊) LOWER LEFT BALLPOINT PEN -1F58B ; text ; L2 ; none ; w # V7.0 (🖋) LOWER LEFT FOUNTAIN PEN -1F58C ; text ; L2 ; none ; w # V7.0 (🖌) LOWER LEFT PAINTBRUSH -1F58D ; text ; L2 ; none ; w # V7.0 (🖍) LOWER LEFT CRAYON -1F590 ; text ; L2 ; secondary ; w # V7.0 (🖐) RAISED HAND WITH FINGERS SPLAYED -1F595 ; emoji ; L2 ; secondary ; x # V7.0 (🖕) REVERSED HAND WITH MIDDLE FINGER EXTENDED -1F596 ; emoji ; L2 ; secondary ; x # V7.0 (🖖) RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS -1F5A5 ; text ; L2 ; none ; w # V7.0 (🖥) DESKTOP COMPUTER -1F5A8 ; text ; L2 ; none ; w # V7.0 (🖨) PRINTER -1F5B1 ; text ; L2 ; none ; w # V7.0 (🖱) THREE BUTTON MOUSE -1F5B2 ; text ; L2 ; none ; w # V7.0 (🖲) TRACKBALL -1F5BC ; text ; L2 ; none ; w # V7.0 (🖼) FRAME WITH PICTURE -1F5C2 ; text ; L2 ; none ; w # V7.0 (🗂) CARD INDEX DIVIDERS -1F5C3 ; text ; L2 ; none ; w # V7.0 (🗃) CARD FILE BOX -1F5C4 ; text ; L2 ; none ; w # V7.0 (🗄) FILE CABINET -1F5D1 ; text ; L2 ; none ; w # V7.0 (🗑) WASTEBASKET -1F5D2 ; text ; L2 ; none ; w # V7.0 (🗒) SPIRAL NOTE PAD -1F5D3 ; text ; L2 ; none ; w # V7.0 (🗓) SPIRAL CALENDAR PAD -1F5DC ; text ; L2 ; none ; w # V7.0 (🗜) COMPRESSION -1F5DD ; text ; L2 ; none ; w # V7.0 (🗝) OLD KEY -1F5DE ; text ; L2 ; none ; w # V7.0 (🗞) ROLLED-UP NEWSPAPER -1F5E1 ; text ; L2 ; none ; w # V7.0 (🗡) DAGGER KNIFE -1F5E3 ; text ; L2 ; none ; w # V7.0 (🗣) SPEAKING HEAD IN SILHOUETTE -1F5EF ; text ; L2 ; none ; w # V7.0 (🗯) RIGHT ANGER BUBBLE -1F5F3 ; text ; L2 ; none ; w # V7.0 (🗳) BALLOT BOX WITH BALLOT -1F5FA ; text ; L2 ; none ; w # V7.0 (🗺) WORLD MAP -1F5FB ; emoji ; L1 ; none ; j # V6.0 (🗻) MOUNT FUJI -1F5FC ; emoji ; L1 ; none ; j # V6.0 (🗼) TOKYO TOWER -1F5FD ; emoji ; L1 ; none ; j # V6.0 (🗽) STATUE OF LIBERTY -1F5FE ; emoji ; L1 ; none ; j # V6.0 (🗾) SILHOUETTE OF JAPAN -1F5FF ; emoji ; L1 ; none ; j # V6.0 (🗿) MOYAI -1F600 ; emoji ; L1 ; secondary ; x # V6.1 (😀) GRINNING FACE -1F601 ; emoji ; L1 ; secondary ; j # V6.0 (😁) GRINNING FACE WITH SMILING EYES -1F602 ; emoji ; L1 ; secondary ; j # V6.0 (😂) FACE WITH TEARS OF JOY -1F603 ; emoji ; L1 ; secondary ; j # V6.0 (😃) SMILING FACE WITH OPEN MOUTH -1F604 ; emoji ; L1 ; secondary ; j # V6.0 (😄) SMILING FACE WITH OPEN MOUTH AND SMILING EYES -1F605 ; emoji ; L1 ; secondary ; j # V6.0 (😅) SMILING FACE WITH OPEN MOUTH AND COLD SWEAT -1F606 ; emoji ; L1 ; secondary ; j # V6.0 (😆) SMILING FACE WITH OPEN MOUTH AND TIGHTLY-CLOSED EYES -1F607 ; emoji ; L1 ; secondary ; x # V6.0 (😇) SMILING FACE WITH HALO -1F608 ; emoji ; L1 ; secondary ; x # V6.0 (😈) SMILING FACE WITH HORNS -1F609 ; emoji ; L1 ; secondary ; j # V6.0 (😉) WINKING FACE -1F60A ; emoji ; L1 ; secondary ; j # V6.0 (😊) SMILING FACE WITH SMILING EYES -1F60B ; emoji ; L1 ; secondary ; j # V6.0 (😋) FACE SAVOURING DELICIOUS FOOD -1F60C ; emoji ; L1 ; secondary ; j # V6.0 (😌) RELIEVED FACE -1F60D ; emoji ; L1 ; secondary ; j # V6.0 (😍) SMILING FACE WITH HEART-SHAPED EYES -1F60E ; emoji ; L1 ; secondary ; x # V6.0 (😎) SMILING FACE WITH SUNGLASSES -1F60F ; emoji ; L1 ; secondary ; j # V6.0 (😏) SMIRKING FACE -1F610 ; emoji ; L1 ; secondary ; w # V6.0 (😐) NEUTRAL FACE -1F611 ; emoji ; L1 ; secondary ; x # V6.1 (😑) EXPRESSIONLESS FACE -1F612 ; emoji ; L1 ; secondary ; j # V6.0 (😒) UNAMUSED FACE -1F613 ; emoji ; L1 ; secondary ; j # V6.0 (😓) FACE WITH COLD SWEAT -1F614 ; emoji ; L1 ; secondary ; j # V6.0 (😔) PENSIVE FACE -1F615 ; emoji ; L1 ; secondary ; x # V6.1 (😕) CONFUSED FACE -1F616 ; emoji ; L1 ; secondary ; j # V6.0 (😖) CONFOUNDED FACE -1F617 ; emoji ; L1 ; secondary ; x # V6.1 (😗) KISSING FACE -1F618 ; emoji ; L1 ; secondary ; j # V6.0 (😘) FACE THROWING A KISS -1F619 ; emoji ; L1 ; secondary ; x # V6.1 (😙) KISSING FACE WITH SMILING EYES -1F61A ; emoji ; L1 ; secondary ; j # V6.0 (😚) KISSING FACE WITH CLOSED EYES -1F61B ; emoji ; L1 ; secondary ; x # V6.1 (😛) FACE WITH STUCK-OUT TONGUE -1F61C ; emoji ; L1 ; secondary ; j # V6.0 (😜) FACE WITH STUCK-OUT TONGUE AND WINKING EYE -1F61D ; emoji ; L1 ; secondary ; j # V6.0 (😝) FACE WITH STUCK-OUT TONGUE AND TIGHTLY-CLOSED EYES -1F61E ; emoji ; L1 ; secondary ; j # V6.0 (😞) DISAPPOINTED FACE -1F61F ; emoji ; L1 ; secondary ; x # V6.1 (😟) WORRIED FACE -1F620 ; emoji ; L1 ; secondary ; j # V6.0 (😠) ANGRY FACE -1F621 ; emoji ; L1 ; secondary ; j # V6.0 (😡) POUTING FACE -1F622 ; emoji ; L1 ; secondary ; j # V6.0 (😢) CRYING FACE -1F623 ; emoji ; L1 ; secondary ; j # V6.0 (😣) PERSEVERING FACE -1F624 ; emoji ; L1 ; secondary ; j # V6.0 (😤) FACE WITH LOOK OF TRIUMPH -1F625 ; emoji ; L1 ; secondary ; j # V6.0 (😥) DISAPPOINTED BUT RELIEVED FACE -1F626 ; emoji ; L1 ; secondary ; x # V6.1 (😦) FROWNING FACE WITH OPEN MOUTH -1F627 ; emoji ; L1 ; secondary ; x # V6.1 (😧) ANGUISHED FACE -1F628 ; emoji ; L1 ; secondary ; j # V6.0 (😨) FEARFUL FACE -1F629 ; emoji ; L1 ; secondary ; j # V6.0 (😩) WEARY FACE -1F62A ; emoji ; L1 ; secondary ; j # V6.0 (😪) SLEEPY FACE -1F62B ; emoji ; L1 ; secondary ; j # V6.0 (😫) TIRED FACE -1F62C ; emoji ; L1 ; secondary ; x # V6.1 (😬) GRIMACING FACE -1F62D ; emoji ; L1 ; secondary ; j # V6.0 (😭) LOUDLY CRYING FACE -1F62E ; emoji ; L1 ; secondary ; x # V6.1 (😮) FACE WITH OPEN MOUTH -1F62F ; emoji ; L1 ; secondary ; x # V6.1 (😯) HUSHED FACE -1F630 ; emoji ; L1 ; secondary ; j # V6.0 (😰) FACE WITH OPEN MOUTH AND COLD SWEAT -1F631 ; emoji ; L1 ; secondary ; j # V6.0 (😱) FACE SCREAMING IN FEAR -1F632 ; emoji ; L1 ; secondary ; j # V6.0 (😲) ASTONISHED FACE -1F633 ; emoji ; L1 ; secondary ; j # V6.0 (😳) FLUSHED FACE -1F634 ; emoji ; L1 ; secondary ; x # V6.1 (😴) SLEEPING FACE -1F635 ; emoji ; L1 ; secondary ; j # V6.0 (😵) DIZZY FACE -1F636 ; emoji ; L1 ; secondary ; x # V6.0 (😶) FACE WITHOUT MOUTH -1F637 ; emoji ; L1 ; secondary ; j # V6.0 (😷) FACE WITH MEDICAL MASK -1F638 ; emoji ; L1 ; none ; j # V6.0 (😸) GRINNING CAT FACE WITH SMILING EYES -1F639 ; emoji ; L1 ; none ; j # V6.0 (😹) CAT FACE WITH TEARS OF JOY -1F63A ; emoji ; L1 ; none ; j # V6.0 (😺) SMILING CAT FACE WITH OPEN MOUTH -1F63B ; emoji ; L1 ; none ; j # V6.0 (😻) SMILING CAT FACE WITH HEART-SHAPED EYES -1F63C ; emoji ; L1 ; none ; j # V6.0 (😼) CAT FACE WITH WRY SMILE -1F63D ; emoji ; L1 ; none ; j # V6.0 (😽) KISSING CAT FACE WITH CLOSED EYES -1F63E ; emoji ; L1 ; none ; j # V6.0 (😾) POUTING CAT FACE -1F63F ; emoji ; L1 ; none ; j # V6.0 (😿) CRYING CAT FACE -1F640 ; emoji ; L1 ; none ; j # V6.0 (🙀) WEARY CAT FACE -1F641 ; emoji ; L2 ; secondary ; x # V7.0 (🙁) SLIGHTLY FROWNING FACE -1F642 ; emoji ; L2 ; secondary ; x # V7.0 (🙂) SLIGHTLY SMILING FACE -1F643 ; emoji ; L2 ; secondary ; x # V8.0 (🙃) UPSIDE-DOWN FACE -1F644 ; emoji ; L2 ; secondary ; x # V8.0 (🙄) FACE WITH ROLLING EYES -1F645 ; emoji ; L1 ; primary ; j # V6.0 (🙅) FACE WITH NO GOOD GESTURE -1F646 ; emoji ; L1 ; primary ; j # V6.0 (🙆) FACE WITH OK GESTURE -1F647 ; emoji ; L1 ; primary ; j # V6.0 (🙇) PERSON BOWING DEEPLY -1F648 ; emoji ; L1 ; none ; j # V6.0 (🙈) SEE-NO-EVIL MONKEY -1F649 ; emoji ; L1 ; none ; j # V6.0 (🙉) HEAR-NO-EVIL MONKEY -1F64A ; emoji ; L1 ; none ; j # V6.0 (🙊) SPEAK-NO-EVIL MONKEY -1F64B ; emoji ; L1 ; primary ; j # V6.0 (🙋) HAPPY PERSON RAISING ONE HAND -1F64C ; emoji ; L1 ; secondary ; j # V6.0 (🙌) PERSON RAISING BOTH HANDS IN CELEBRATION -1F64D ; emoji ; L1 ; primary ; j # V6.0 (🙍) PERSON FROWNING -1F64E ; emoji ; L1 ; primary ; j # V6.0 (🙎) PERSON WITH POUTING FACE -1F64F ; emoji ; L1 ; secondary ; j # V6.0 (🙏) PERSON WITH FOLDED HANDS -1F680 ; emoji ; L1 ; none ; j # V6.0 (🚀) ROCKET -1F681 ; emoji ; L1 ; none ; x # V6.0 (🚁) HELICOPTER -1F682 ; emoji ; L1 ; none ; x # V6.0 (🚂) STEAM LOCOMOTIVE -1F683 ; emoji ; L1 ; none ; j # V6.0 (🚃) RAILWAY CAR -1F684 ; emoji ; L1 ; none ; j # V6.0 (🚄) HIGH-SPEED TRAIN -1F685 ; emoji ; L1 ; none ; j # V6.0 (🚅) HIGH-SPEED TRAIN WITH BULLET NOSE -1F686 ; emoji ; L1 ; none ; x # V6.0 (🚆) TRAIN -1F687 ; emoji ; L1 ; none ; j w # V6.0 (🚇) METRO -1F688 ; emoji ; L1 ; none ; x # V6.0 (🚈) LIGHT RAIL -1F689 ; emoji ; L1 ; none ; j # V6.0 (🚉) STATION -1F68A ; emoji ; L1 ; none ; x # V6.0 (🚊) TRAM -1F68B ; emoji ; L1 ; none ; x # V6.0 (🚋) TRAM CAR -1F68C ; emoji ; L1 ; none ; j # V6.0 (🚌) BUS -1F68D ; emoji ; L1 ; none ; w # V6.0 (🚍) ONCOMING BUS -1F68E ; emoji ; L1 ; none ; x # V6.0 (🚎) TROLLEYBUS -1F68F ; emoji ; L1 ; none ; j # V6.0 (🚏) BUS STOP -1F690 ; emoji ; L1 ; none ; x # V6.0 (🚐) MINIBUS -1F691 ; emoji ; L1 ; none ; j w # V6.0 (🚑) AMBULANCE -1F692 ; emoji ; L1 ; none ; j # V6.0 (🚒) FIRE ENGINE -1F693 ; emoji ; L1 ; none ; j # V6.0 (🚓) POLICE CAR -1F694 ; emoji ; L1 ; none ; w # V6.0 (🚔) ONCOMING POLICE CAR -1F695 ; emoji ; L1 ; none ; j # V6.0 (🚕) TAXI -1F696 ; emoji ; L1 ; none ; x # V6.0 (🚖) ONCOMING TAXI -1F697 ; emoji ; L1 ; none ; j # V6.0 (🚗) AUTOMOBILE -1F698 ; emoji ; L1 ; none ; w # V6.0 (🚘) ONCOMING AUTOMOBILE -1F699 ; emoji ; L1 ; none ; j # V6.0 (🚙) RECREATIONAL VEHICLE -1F69A ; emoji ; L1 ; none ; j # V6.0 (🚚) DELIVERY TRUCK -1F69B ; emoji ; L1 ; none ; x # V6.0 (🚛) ARTICULATED LORRY -1F69C ; emoji ; L1 ; none ; x # V6.0 (🚜) TRACTOR -1F69D ; emoji ; L1 ; none ; x # V6.0 (🚝) MONORAIL -1F69E ; emoji ; L1 ; none ; x # V6.0 (🚞) MOUNTAIN RAILWAY -1F69F ; emoji ; L1 ; none ; x # V6.0 (🚟) SUSPENSION RAILWAY -1F6A0 ; emoji ; L1 ; none ; x # V6.0 (🚠) MOUNTAIN CABLEWAY -1F6A1 ; emoji ; L1 ; none ; x # V6.0 (🚡) AERIAL TRAMWAY -1F6A2 ; emoji ; L1 ; none ; j # V6.0 (🚢) SHIP -1F6A3 ; emoji ; L1 ; secondary ; x # V6.0 (🚣) ROWBOAT -1F6A4 ; emoji ; L1 ; none ; j # V6.0 (🚤) SPEEDBOAT -1F6A5 ; emoji ; L1 ; none ; j # V6.0 (🚥) HORIZONTAL TRAFFIC LIGHT -1F6A6 ; emoji ; L1 ; none ; x # V6.0 (🚦) VERTICAL TRAFFIC LIGHT -1F6A7 ; emoji ; L1 ; none ; j # V6.0 (🚧) CONSTRUCTION SIGN -1F6A8 ; emoji ; L1 ; none ; j # V6.0 (🚨) POLICE CARS REVOLVING LIGHT -1F6A9 ; emoji ; L1 ; none ; j # V6.0 (🚩) TRIANGULAR FLAG ON POST -1F6AA ; emoji ; L1 ; none ; j # V6.0 (🚪) DOOR -1F6AB ; emoji ; L1 ; none ; j # V6.0 (🚫) NO ENTRY SIGN -1F6AC ; emoji ; L1 ; none ; j # V6.0 (🚬) SMOKING SYMBOL -1F6AD ; emoji ; L1 ; none ; j w # V6.0 (🚭) NO SMOKING SYMBOL -1F6AE ; emoji ; L1 ; none ; x # V6.0 (🚮) PUT LITTER IN ITS PLACE SYMBOL -1F6AF ; emoji ; L1 ; none ; x # V6.0 (🚯) DO NOT LITTER SYMBOL -1F6B0 ; emoji ; L1 ; none ; x # V6.0 (🚰) POTABLE WATER SYMBOL -1F6B1 ; emoji ; L1 ; none ; x # V6.0 (🚱) NON-POTABLE WATER SYMBOL -1F6B2 ; emoji ; L1 ; none ; j w # V6.0 (🚲) BICYCLE -1F6B3 ; emoji ; L1 ; none ; x # V6.0 (🚳) NO BICYCLES -1F6B4 ; emoji ; L1 ; secondary ; x # V6.0 (🚴) BICYCLIST -1F6B5 ; emoji ; L1 ; secondary ; x # V6.0 (🚵) MOUNTAIN BICYCLIST -1F6B6 ; emoji ; L1 ; secondary ; j # V6.0 (🚶) PEDESTRIAN -1F6B7 ; emoji ; L1 ; none ; x # V6.0 (🚷) NO PEDESTRIANS -1F6B8 ; emoji ; L1 ; none ; x # V6.0 (🚸) CHILDREN CROSSING -1F6B9 ; emoji ; L1 ; none ; j w # V6.0 (🚹) MENS SYMBOL -1F6BA ; emoji ; L1 ; none ; j w # V6.0 (🚺) WOMENS SYMBOL -1F6BB ; emoji ; L1 ; none ; j # V6.0 (🚻) RESTROOM -1F6BC ; emoji ; L1 ; none ; j w # V6.0 (🚼) BABY SYMBOL -1F6BD ; emoji ; L1 ; none ; j # V6.0 (🚽) TOILET -1F6BE ; emoji ; L1 ; none ; j # V6.0 (🚾) WATER CLOSET -1F6BF ; emoji ; L1 ; none ; x # V6.0 (🚿) SHOWER -1F6C0 ; emoji ; L1 ; secondary ; j # V6.0 (🛀) BATH -1F6C1 ; emoji ; L1 ; none ; x # V6.0 (🛁) BATHTUB -1F6C2 ; emoji ; L1 ; none ; x # V6.0 (🛂) PASSPORT CONTROL -1F6C3 ; emoji ; L1 ; none ; x # V6.0 (🛃) CUSTOMS -1F6C4 ; emoji ; L1 ; none ; x # V6.0 (🛄) BAGGAGE CLAIM -1F6C5 ; emoji ; L1 ; none ; x # V6.0 (🛅) LEFT LUGGAGE -1F6CB ; text ; L2 ; none ; w # V7.0 (🛋) COUCH AND LAMP -1F6CC ; emoji ; L2 ; none ; x # V7.0 (🛌) SLEEPING ACCOMMODATION -1F6CD ; text ; L2 ; none ; w # V7.0 (🛍) SHOPPING BAGS -1F6CE ; text ; L2 ; none ; w # V7.0 (🛎) BELLHOP BELL -1F6CF ; text ; L2 ; none ; w # V7.0 (🛏) BED -1F6D0 ; emoji ; L2 ; none ; x # V8.0 (🛐) PLACE OF WORSHIP -1F6E0 ; text ; L2 ; none ; w # V7.0 (🛠) HAMMER AND WRENCH -1F6E1 ; text ; L2 ; none ; w # V7.0 (🛡) SHIELD -1F6E2 ; text ; L2 ; none ; w # V7.0 (🛢) OIL DRUM -1F6E3 ; text ; L2 ; none ; w # V7.0 (🛣) MOTORWAY -1F6E4 ; text ; L2 ; none ; w # V7.0 (🛤) RAILWAY TRACK -1F6E5 ; text ; L2 ; none ; w # V7.0 (🛥) MOTOR BOAT -1F6E9 ; text ; L2 ; none ; w # V7.0 (🛩) SMALL AIRPLANE -1F6EB ; emoji ; L2 ; none ; x # V7.0 (🛫) AIRPLANE DEPARTURE -1F6EC ; emoji ; L2 ; none ; x # V7.0 (🛬) AIRPLANE ARRIVING -1F6F0 ; text ; L2 ; none ; w # V7.0 (🛰) SATELLITE -1F6F3 ; text ; L2 ; none ; w # V7.0 (🛳) PASSENGER SHIP -1F910 ; emoji ; L2 ; secondary ; x # V8.0 (🤐) ZIPPER-MOUTH FACE -1F911 ; emoji ; L2 ; secondary ; x # V8.0 (🤑) MONEY-MOUTH FACE -1F912 ; emoji ; L2 ; secondary ; x # V8.0 (🤒) FACE WITH THERMOMETER -1F913 ; emoji ; L2 ; secondary ; x # V8.0 (🤓) NERD FACE -1F914 ; emoji ; L2 ; secondary ; x # V8.0 (🤔) THINKING FACE -1F915 ; emoji ; L2 ; secondary ; x # V8.0 (🤕) FACE WITH HEAD-BANDAGE -1F916 ; emoji ; L2 ; none ; x # V8.0 (🤖) ROBOT FACE -1F917 ; emoji ; L2 ; secondary ; x # V8.0 (🤗) HUGGING FACE -1F918 ; emoji ; L2 ; secondary ; x # V8.0 (🤘) SIGN OF THE HORNS -1F980 ; emoji ; L2 ; none ; x # V8.0 (🦀) CRAB -1F981 ; emoji ; L2 ; none ; x # V8.0 (🦁) LION FACE -1F982 ; emoji ; L2 ; none ; x # V8.0 (🦂) SCORPION -1F983 ; emoji ; L2 ; none ; x # V8.0 (🦃) TURKEY -1F984 ; emoji ; L2 ; none ; x # V8.0 (🦄) UNICORN FACE -1F9C0 ; emoji ; L2 ; none ; x # V8.0 (🧀) CHEESE WEDGE -0023 20E3 ; text ; L1 ; none ; j # V3.0 (#⃣) keycap NUMBER SIGN -002A 20E3 ; text ; L2 ; none ; x # V3.0 (*⃣) keycap ASTERISK -0030 20E3 ; text ; L1 ; none ; j # V3.0 (0⃣) keycap DIGIT ZERO -0031 20E3 ; text ; L1 ; none ; j # V3.0 (1⃣) keycap DIGIT ONE -0032 20E3 ; text ; L1 ; none ; j # V3.0 (2⃣) keycap DIGIT TWO -0033 20E3 ; text ; L1 ; none ; j # V3.0 (3⃣) keycap DIGIT THREE -0034 20E3 ; text ; L1 ; none ; j # V3.0 (4⃣) keycap DIGIT FOUR -0035 20E3 ; text ; L1 ; none ; j # V3.0 (5⃣) keycap DIGIT FIVE -0036 20E3 ; text ; L1 ; none ; j # V3.0 (6⃣) keycap DIGIT SIX -0037 20E3 ; text ; L1 ; none ; j # V3.0 (7⃣) keycap DIGIT SEVEN -0038 20E3 ; text ; L1 ; none ; j # V3.0 (8⃣) keycap DIGIT EIGHT -0039 20E3 ; text ; L1 ; none ; j # V3.0 (9⃣) keycap DIGIT NINE -1F1E6 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇦🇨) flag for Ascension Island -1F1E6 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇦🇩) flag for Andorra -1F1E6 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇦🇪) flag for United Arab Emirates -1F1E6 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇦🇫) flag for Afghanistan -1F1E6 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇦🇬) flag for Antigua & Barbuda -1F1E6 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇦🇮) flag for Anguilla -1F1E6 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇦🇱) flag for Albania -1F1E6 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇦🇲) flag for Armenia -1F1E6 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇦🇴) flag for Angola -1F1E6 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇦🇶) flag for Antarctica -1F1E6 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇦🇷) flag for Argentina -1F1E6 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇦🇸) flag for American Samoa -1F1E6 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇦🇹) flag for Austria -1F1E6 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇦🇺) flag for Australia -1F1E6 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇦🇼) flag for Aruba -1F1E6 1F1FD ; emoji ; L2 ; none ; x # V6.0 (🇦🇽) flag for Åland Islands -1F1E6 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇦🇿) flag for Azerbaijan -1F1E7 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇧🇦) flag for Bosnia & Herzegovina -1F1E7 1F1E7 ; emoji ; L2 ; none ; x # V6.0 (🇧🇧) flag for Barbados -1F1E7 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇧🇩) flag for Bangladesh -1F1E7 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇧🇪) flag for Belgium -1F1E7 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇧🇫) flag for Burkina Faso -1F1E7 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇧🇬) flag for Bulgaria -1F1E7 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇧🇭) flag for Bahrain -1F1E7 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇧🇮) flag for Burundi -1F1E7 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇧🇯) flag for Benin -1F1E7 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇧🇱) flag for St. Barthélemy -1F1E7 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇧🇲) flag for Bermuda -1F1E7 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇧🇳) flag for Brunei -1F1E7 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇧🇴) flag for Bolivia -1F1E7 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇧🇶) flag for Caribbean Netherlands -1F1E7 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇧🇷) flag for Brazil -1F1E7 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇧🇸) flag for Bahamas -1F1E7 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇧🇹) flag for Bhutan -1F1E7 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇧🇻) flag for Bouvet Island -1F1E7 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇧🇼) flag for Botswana -1F1E7 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇧🇾) flag for Belarus -1F1E7 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇧🇿) flag for Belize -1F1E8 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇨🇦) flag for Canada -1F1E8 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇨🇨) flag for Cocos Islands -1F1E8 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇨🇩) flag for Congo - Kinshasa -1F1E8 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇨🇫) flag for Central African Republic -1F1E8 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇨🇬) flag for Congo - Brazzaville -1F1E8 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇨🇭) flag for Switzerland -1F1E8 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇨🇮) flag for Côte d’Ivoire -1F1E8 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇨🇰) flag for Cook Islands -1F1E8 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇨🇱) flag for Chile -1F1E8 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇨🇲) flag for Cameroon -1F1E8 1F1F3 ; emoji ; L1 ; none ; j # V6.0 (🇨🇳) flag for China -1F1E8 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇨🇴) flag for Colombia -1F1E8 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇨🇵) flag for Clipperton Island -1F1E8 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇨🇷) flag for Costa Rica -1F1E8 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇨🇺) flag for Cuba -1F1E8 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇨🇻) flag for Cape Verde -1F1E8 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇨🇼) flag for Curaçao -1F1E8 1F1FD ; emoji ; L2 ; none ; x # V6.0 (🇨🇽) flag for Christmas Island -1F1E8 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇨🇾) flag for Cyprus -1F1E8 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇨🇿) flag for Czech Republic -1F1E9 1F1EA ; emoji ; L1 ; none ; j # V6.0 (🇩🇪) flag for Germany -1F1E9 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇩🇬) flag for Diego Garcia -1F1E9 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇩🇯) flag for Djibouti -1F1E9 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇩🇰) flag for Denmark -1F1E9 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇩🇲) flag for Dominica -1F1E9 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇩🇴) flag for Dominican Republic -1F1E9 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇩🇿) flag for Algeria -1F1EA 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇪🇦) flag for Ceuta & Melilla -1F1EA 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇪🇨) flag for Ecuador -1F1EA 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇪🇪) flag for Estonia -1F1EA 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇪🇬) flag for Egypt -1F1EA 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇪🇭) flag for Western Sahara -1F1EA 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇪🇷) flag for Eritrea -1F1EA 1F1F8 ; emoji ; L1 ; none ; j # V6.0 (🇪🇸) flag for Spain -1F1EA 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇪🇹) flag for Ethiopia -1F1EA 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇪🇺) flag for European Union -1F1EB 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇫🇮) flag for Finland -1F1EB 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇫🇯) flag for Fiji -1F1EB 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇫🇰) flag for Falkland Islands -1F1EB 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇫🇲) flag for Micronesia -1F1EB 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇫🇴) flag for Faroe Islands -1F1EB 1F1F7 ; emoji ; L1 ; none ; j # V6.0 (🇫🇷) flag for France -1F1EC 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇬🇦) flag for Gabon -1F1EC 1F1E7 ; emoji ; L1 ; none ; j # V6.0 (🇬🇧) flag for United Kingdom -1F1EC 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇬🇩) flag for Grenada -1F1EC 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇬🇪) flag for Georgia -1F1EC 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇬🇫) flag for French Guiana -1F1EC 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇬🇬) flag for Guernsey -1F1EC 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇬🇭) flag for Ghana -1F1EC 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇬🇮) flag for Gibraltar -1F1EC 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇬🇱) flag for Greenland -1F1EC 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇬🇲) flag for Gambia -1F1EC 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇬🇳) flag for Guinea -1F1EC 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇬🇵) flag for Guadeloupe -1F1EC 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇬🇶) flag for Equatorial Guinea -1F1EC 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇬🇷) flag for Greece -1F1EC 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇬🇸) flag for South Georgia & South Sandwich Islands -1F1EC 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇬🇹) flag for Guatemala -1F1EC 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇬🇺) flag for Guam -1F1EC 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇬🇼) flag for Guinea-Bissau -1F1EC 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇬🇾) flag for Guyana -1F1ED 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇭🇰) flag for Hong Kong -1F1ED 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇭🇲) flag for Heard & McDonald Islands -1F1ED 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇭🇳) flag for Honduras -1F1ED 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇭🇷) flag for Croatia -1F1ED 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇭🇹) flag for Haiti -1F1ED 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇭🇺) flag for Hungary -1F1EE 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇮🇨) flag for Canary Islands -1F1EE 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇮🇩) flag for Indonesia -1F1EE 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇮🇪) flag for Ireland -1F1EE 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇮🇱) flag for Israel -1F1EE 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇮🇲) flag for Isle of Man -1F1EE 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇮🇳) flag for India -1F1EE 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇮🇴) flag for British Indian Ocean Territory -1F1EE 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇮🇶) flag for Iraq -1F1EE 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇮🇷) flag for Iran -1F1EE 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇮🇸) flag for Iceland -1F1EE 1F1F9 ; emoji ; L1 ; none ; j # V6.0 (🇮🇹) flag for Italy -1F1EF 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇯🇪) flag for Jersey -1F1EF 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇯🇲) flag for Jamaica -1F1EF 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇯🇴) flag for Jordan -1F1EF 1F1F5 ; emoji ; L1 ; none ; j # V6.0 (🇯🇵) flag for Japan -1F1F0 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇰🇪) flag for Kenya -1F1F0 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇰🇬) flag for Kyrgyzstan -1F1F0 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇰🇭) flag for Cambodia -1F1F0 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇰🇮) flag for Kiribati -1F1F0 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇰🇲) flag for Comoros -1F1F0 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇰🇳) flag for St. Kitts & Nevis -1F1F0 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇰🇵) flag for North Korea -1F1F0 1F1F7 ; emoji ; L1 ; none ; j # V6.0 (🇰🇷) flag for South Korea -1F1F0 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇰🇼) flag for Kuwait -1F1F0 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇰🇾) flag for Cayman Islands -1F1F0 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇰🇿) flag for Kazakhstan -1F1F1 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇱🇦) flag for Laos -1F1F1 1F1E7 ; emoji ; L2 ; none ; x # V6.0 (🇱🇧) flag for Lebanon -1F1F1 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇱🇨) flag for St. Lucia -1F1F1 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇱🇮) flag for Liechtenstein -1F1F1 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇱🇰) flag for Sri Lanka -1F1F1 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇱🇷) flag for Liberia -1F1F1 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇱🇸) flag for Lesotho -1F1F1 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇱🇹) flag for Lithuania -1F1F1 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇱🇺) flag for Luxembourg -1F1F1 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇱🇻) flag for Latvia -1F1F1 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇱🇾) flag for Libya -1F1F2 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇲🇦) flag for Morocco -1F1F2 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇲🇨) flag for Monaco -1F1F2 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇲🇩) flag for Moldova -1F1F2 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇲🇪) flag for Montenegro -1F1F2 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇲🇫) flag for St. Martin -1F1F2 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇲🇬) flag for Madagascar -1F1F2 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇲🇭) flag for Marshall Islands -1F1F2 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇲🇰) flag for Macedonia -1F1F2 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇲🇱) flag for Mali -1F1F2 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇲🇲) flag for Myanmar -1F1F2 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇲🇳) flag for Mongolia -1F1F2 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇲🇴) flag for Macau -1F1F2 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇲🇵) flag for Northern Mariana Islands -1F1F2 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇲🇶) flag for Martinique -1F1F2 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇲🇷) flag for Mauritania -1F1F2 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇲🇸) flag for Montserrat -1F1F2 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇲🇹) flag for Malta -1F1F2 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇲🇺) flag for Mauritius -1F1F2 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇲🇻) flag for Maldives -1F1F2 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇲🇼) flag for Malawi -1F1F2 1F1FD ; emoji ; L2 ; none ; x # V6.0 (🇲🇽) flag for Mexico -1F1F2 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇲🇾) flag for Malaysia -1F1F2 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇲🇿) flag for Mozambique -1F1F3 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇳🇦) flag for Namibia -1F1F3 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇳🇨) flag for New Caledonia -1F1F3 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇳🇪) flag for Niger -1F1F3 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇳🇫) flag for Norfolk Island -1F1F3 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇳🇬) flag for Nigeria -1F1F3 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇳🇮) flag for Nicaragua -1F1F3 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇳🇱) flag for Netherlands -1F1F3 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇳🇴) flag for Norway -1F1F3 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇳🇵) flag for Nepal -1F1F3 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇳🇷) flag for Nauru -1F1F3 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇳🇺) flag for Niue -1F1F3 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇳🇿) flag for New Zealand -1F1F4 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇴🇲) flag for Oman -1F1F5 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇵🇦) flag for Panama -1F1F5 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇵🇪) flag for Peru -1F1F5 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇵🇫) flag for French Polynesia -1F1F5 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇵🇬) flag for Papua New Guinea -1F1F5 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇵🇭) flag for Philippines -1F1F5 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇵🇰) flag for Pakistan -1F1F5 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇵🇱) flag for Poland -1F1F5 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇵🇲) flag for St. Pierre & Miquelon -1F1F5 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇵🇳) flag for Pitcairn Islands -1F1F5 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇵🇷) flag for Puerto Rico -1F1F5 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇵🇸) flag for Palestinian Territories -1F1F5 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇵🇹) flag for Portugal -1F1F5 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇵🇼) flag for Palau -1F1F5 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇵🇾) flag for Paraguay -1F1F6 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇶🇦) flag for Qatar -1F1F7 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇷🇪) flag for Réunion -1F1F7 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇷🇴) flag for Romania -1F1F7 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇷🇸) flag for Serbia -1F1F7 1F1FA ; emoji ; L1 ; none ; j # V6.0 (🇷🇺) flag for Russia -1F1F7 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇷🇼) flag for Rwanda -1F1F8 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇸🇦) flag for Saudi Arabia -1F1F8 1F1E7 ; emoji ; L2 ; none ; x # V6.0 (🇸🇧) flag for Solomon Islands -1F1F8 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇸🇨) flag for Seychelles -1F1F8 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇸🇩) flag for Sudan -1F1F8 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇸🇪) flag for Sweden -1F1F8 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇸🇬) flag for Singapore -1F1F8 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇸🇭) flag for St. Helena -1F1F8 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇸🇮) flag for Slovenia -1F1F8 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇸🇯) flag for Svalbard & Jan Mayen -1F1F8 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇸🇰) flag for Slovakia -1F1F8 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇸🇱) flag for Sierra Leone -1F1F8 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇸🇲) flag for San Marino -1F1F8 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇸🇳) flag for Senegal -1F1F8 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇸🇴) flag for Somalia -1F1F8 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇸🇷) flag for Suriname -1F1F8 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇸🇸) flag for South Sudan -1F1F8 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇸🇹) flag for São Tomé & Príncipe -1F1F8 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇸🇻) flag for El Salvador -1F1F8 1F1FD ; emoji ; L2 ; none ; x # V6.0 (🇸🇽) flag for Sint Maarten -1F1F8 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇸🇾) flag for Syria -1F1F8 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇸🇿) flag for Swaziland -1F1F9 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇹🇦) flag for Tristan da Cunha -1F1F9 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇹🇨) flag for Turks & Caicos Islands -1F1F9 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇹🇩) flag for Chad -1F1F9 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇹🇫) flag for French Southern Territories -1F1F9 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇹🇬) flag for Togo -1F1F9 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇹🇭) flag for Thailand -1F1F9 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇹🇯) flag for Tajikistan -1F1F9 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇹🇰) flag for Tokelau -1F1F9 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇹🇱) flag for Timor-Leste -1F1F9 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇹🇲) flag for Turkmenistan -1F1F9 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇹🇳) flag for Tunisia -1F1F9 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇹🇴) flag for Tonga -1F1F9 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇹🇷) flag for Turkey -1F1F9 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇹🇹) flag for Trinidad & Tobago -1F1F9 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇹🇻) flag for Tuvalu -1F1F9 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇹🇼) flag for Taiwan -1F1F9 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇹🇿) flag for Tanzania -1F1FA 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇺🇦) flag for Ukraine -1F1FA 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇺🇬) flag for Uganda -1F1FA 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇺🇲) flag for U.S. Outlying Islands -1F1FA 1F1F8 ; emoji ; L1 ; none ; j # V6.0 (🇺🇸) flag for United States -1F1FA 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇺🇾) flag for Uruguay -1F1FA 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇺🇿) flag for Uzbekistan -1F1FB 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇻🇦) flag for Vatican City -1F1FB 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇻🇨) flag for St. Vincent & Grenadines -1F1FB 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇻🇪) flag for Venezuela -1F1FB 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇻🇬) flag for British Virgin Islands -1F1FB 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇻🇮) flag for U.S. Virgin Islands -1F1FB 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇻🇳) flag for Vietnam -1F1FB 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇻🇺) flag for Vanuatu -1F1FC 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇼🇫) flag for Wallis & Futuna -1F1FC 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇼🇸) flag for Samoa -1F1FD 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇽🇰) flag for Kosovo -1F1FE 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇾🇪) flag for Yemen -1F1FE 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇾🇹) flag for Mayotte -1F1FF 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇿🇦) flag for South Africa -1F1FF 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇿🇲) flag for Zambia -1F1FF 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇿🇼) flag for Zimbabwe diff --git a/tests/data/evil-fruits.tsv b/tests/data/evil-fruits.tsv deleted file mode 100644 index 230c862..0000000 --- a/tests/data/evil-fruits.tsv +++ /dev/null @@ -1,6 +0,0 @@ -🔣 code meaning -🍇 1F347 GRAPES -🍉 1F349 WATERMELON -🍒 1F352 CHERRIES -🍓 1F353 STRAWBERRY -🍍 1F34D PINEAPPLE diff --git a/tests/delete-utf8.sh b/tests/delete-utf8.sh new file mode 100755 index 0000000..2d88f7f --- /dev/null +++ b/tests/delete-utf8.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +a,b,c +1,2,3 +DATA + +# ================================= ASSERTION ================================ # + +cat << DATA > "tmp/${t}/${t}.assert" +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" --projectName "${t} biểu tượng cảm xúc 🍉" +${cmd} --delete "${t} biểu tượng cảm xúc 🍉" +${cmd} --list | grep "${t}" | cut -d ':' -f 2 > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/delete.sh b/tests/delete.sh new file mode 100755 index 0000000..d7e0434 --- /dev/null +++ b/tests/delete.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +a,b,c +1,2,3 +DATA + +# ================================= ASSERTION ================================ # + +cat << DATA > "tmp/${t}/${t}.assert" +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --delete "${t}" +${cmd} --list | grep "${t}" | cut -d ':' -f 2 > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/download.sh b/tests/download.sh new file mode 100755 index 0000000..9f8b0ae --- /dev/null +++ b/tests/download.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# ================================== ACTION ================================== # + +${cmd} --download "https://git.io/fj5ju" --output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "data/duplicates-deletion.json" "tmp/${t}/${t}.output" diff --git a/tests/export-filename-utf8.sh b/tests/export-filename-utf8.sh new file mode 100755 index 0000000..9c74d1c --- /dev/null +++ b/tests/export-filename-utf8.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.tsv" +a b c +1 2 3 +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +a,b,c +1,2,3 +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.tsv" +${cmd} --export "${t}" --output "tmp/${t}/biểu tượng cảm xúc 🍉.csv" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/biểu tượng cảm xúc 🍉.csv" diff --git a/tests/export-filename.sh b/tests/export-filename.sh new file mode 100755 index 0000000..7176adc --- /dev/null +++ b/tests/export-filename.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.tsv" +a b c +1 2 3 +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +a,b,c +1,2,3 +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.tsv" +${cmd} --export "${t}" --output "tmp/${t}/${t}.csv" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.csv" diff --git a/tests/export-utf8.sh b/tests/export-utf8.sh new file mode 100755 index 0000000..ec26638 --- /dev/null +++ b/tests/export-utf8.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +🔣,code,meaning +🍇,1F347,GRAPES +🍉,1F349,WATERMELON +🍒,1F352,CHERRIES +🍓,1F353,STRAWBERRY +🍍,1F34D,PINEAPPLE +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +🔣 code meaning +🍇 1F347 GRAPES +🍉 1F349 WATERMELON +🍒 1F352 CHERRIES +🍓 1F353 STRAWBERRY +🍍 1F34D PINEAPPLE +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/export.sh b/tests/export.sh new file mode 100755 index 0000000..1980555 --- /dev/null +++ b/tests/export.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +a,b,c +1,2,3 +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +a b c +1 2 3 +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/help.sh b/tests/help.sh new file mode 100755 index 0000000..e768159 --- /dev/null +++ b/tests/help.sh @@ -0,0 +1,169 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +Usage: refine.py [--help | OPTIONS] + +Script to provide a command line interface to an OpenRefine server. + +Options: + -h, --help show this help message and exit + + Connection options: + -H 127.0.0.1, --host=127.0.0.1 + OpenRefine hostname (default: 127.0.0.1) + -P 3333, --port=3333 + OpenRefine port (default: 3333) + + Commands: + -c [FILE], --create=[FILE] + Create project from file. The filename ending (e.g. + .csv) defines the input format + (csv,tsv,xml,json,txt,xls,xlsx,ods) + -l, --list List projects + --download=[URL] Download file from URL (e.g. example data). Combine + with --output to specify a filename. + + Commands with argument [PROJECTID/PROJECTNAME]: + -d, --delete Delete project + -f [FILE], --apply=[FILE] + Apply JSON rules to OpenRefine project + -E, --export Export project in tsv format to stdout. + -o [FILE], --output=[FILE] + Export project to file. The filename ending (e.g. + .tsv) defines the output format + (csv,tsv,xls,xlsx,html) + --template=[STRING] + Export project with templating. Provide (big) text + string that you enter in the *row template* textfield + in the export/templating menu in the browser app) + --info show project metadata + + General options: + --format=FILE_FORMAT + Override file detection (import: + csv,tsv,xml,json,line-based,fixed-width,xls,xlsx,ods; + export: csv,tsv,html,xls,xlsx,ods) + + Create options: + --columnWidths=COLUMNWIDTHS + (txt/fixed-width), please provide widths in multiple + arguments, e.g. --columnWidths=7 --columnWidths=5 + --encoding=ENCODING + (csv,tsv,txt), please provide short encoding name + (e.g. UTF-8) + --guessCellValueTypes=true/false + (xml,csv,tsv,txt,json, default: false) + --headerLines=HEADERLINES + (csv,tsv,txt/fixed-width,xls,xlsx,ods), default: 1, + default txt/fixed-width: 0 + --ignoreLines=IGNORELINES + (csv,tsv,txt,xls,xlsx,ods), default: -1 + --includeFileSources=true/false + (all formats), default: false + --limit=LIMIT (all formats), default: -1 + --linesPerRow=LINESPERROW + (txt/line-based), default: 1 + --processQuotes=true/false + (csv,tsv), default: true + --projectName=PROJECTNAME + (all formats), default: filename + --projectTags=PROJECTTAGS + (all formats), please provide tags in multiple + arguments, e.g. --projectTags=beta + --projectTags=client1 + --recordPath=RECORDPATH + (xml,json), please provide path in multiple arguments, + e.g. /collection/record/ should be entered: + --recordPath=collection --recordPath=record, default + xml: root element, default json: _ _ + --separator=SEPARATOR + (csv,tsv), default csv: , default tsv: \t + --sheets=SHEETS (xls,xlsx,ods), please provide sheets in multiple + arguments, e.g. --sheets=0 --sheets=1, default: 0 + (first sheet) + --skipDataLines=SKIPDATALINES + (csv,tsv,txt,xls,xlsx,ods), default: 0, default line- + based: -1 + --storeBlankCellsAsNulls=true/false + (csv,tsv,txt,xls,xlsx,ods), default: true + --storeBlankRows=true/false + (csv,tsv,txt,xls,xlsx,ods), default: true + --storeEmptyStrings=true/false + (xml,json), default: true + --trimStrings=true/false + (xml,json), default: false + + Templating options: + --mode=row-based/record-based + engine mode (default: row-based) + --prefix=PREFIX text string that you enter in the *prefix* textfield + in the browser app + --rowSeparator=ROWSEPARATOR + text string that you enter in the *row separator* + textfield in the browser app + --suffix=SUFFIX text string that you enter in the *suffix* textfield + in the browser app + --filterQuery=REGEX + Simple RegEx text filter on filterColumn, e.g. ^12015$ + --filterColumn=COLUMNNAME + column name for filterQuery (default: name of first + column) + --facets=FACETS facets config in json format (may be extracted with + browser dev tools in browser app) + --splitToFiles=true/false + will split each row/record into a single file; it + specifies a presumably unique character series for + splitting; --prefix and --suffix will be applied to + all files; filename-prefix can be specified with + --output (default: %Y%m%d) + --suffixById=true/false + enhancement option for --splitToFiles; will generate + filename-suffix from values in key column + +Example data: + --download "https://git.io/fj5hF" --output=duplicates.csv + --download "https://git.io/fj5ju" --output=duplicates-deletion.json + +Basic commands: + --list # list all projects + --list -H 127.0.0.1 -P 80 # specify hostname and port + --create duplicates.csv # create new project from file + --info "duplicates" # show project metadata + --apply duplicates-deletion.json "duplicates" # apply rules in file to project + --export "duplicates" # export project to terminal in tsv format + --export --output=deduped.xls "duplicates" # export project to file in xls format + --delete "duplicates" # delete project + +Some more examples: + --info 1234567890123 # specify project by id + --create example.tsv --encoding=UTF-8 + --create example.xml --recordPath=collection --recordPath=record + --create example.json --recordPath=_ --recordPath=_ + --create example.xlsx --sheets=0 + --create example.ods --sheets=0 + +Example for Templating Export: + Cf. https://github.com/opencultureconsulting/openrefine-client#advanced-templating +DATA + +# ================================== ACTION ================================== # + +${cmd} --help > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/info-utf8.sh b/tests/info-utf8.sh new file mode 100755 index 0000000..1fc4122 --- /dev/null +++ b/tests/info-utf8.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.tsv" +🔣 code meaning +🍇 1F347 GRAPES +🍉 1F349 WATERMELON +🍒 1F352 CHERRIES +🍓 1F353 STRAWBERRY +🍍 1F34D PINEAPPLE +DATA + +# ================================= ASSERTION ================================ # + +cat << DATA > "tmp/${t}/${t}.assert" + column 001: 🔣 +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.tsv" +${cmd} --info "${t}" | grep 'column 001' > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/info.sh b/tests/info.sh new file mode 100755 index 0000000..204b630 --- /dev/null +++ b/tests/info.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +a,b,c +1,2,3 +DATA + +# ================================= ASSERTION ================================ # + +cat << DATA > "tmp/${t}/${t}.assert" + column 002: b +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --info "${t}" | grep 'column 002' > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/list.sh b/tests/list.sh new file mode 100755 index 0000000..7e23172 --- /dev/null +++ b/tests/list.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +a,b,c +1,2,3 +DATA + +# ================================= ASSERTION ================================ # + +cat << DATA > "tmp/${t}/${t}.assert" + ${t} +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --list | grep "${t}" | cut -d ':' -f 2 > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/template b/tests/template index 7ec62f7..ade739e 100755 --- a/tests/template +++ b/tests/template @@ -2,14 +2,17 @@ # =============================== ENVIRONMENT ================================ # -t="test" - if [[ ${1} ]]; then - version="${1##*.}" + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 fi +#if [[ ${2} ]]; then +# version="${2##*.}" +#fi +t="$(basename "${BASH_SOURCE[0]}" .sh)" cd "${BASH_SOURCE%/*}/" || exit 1 -client="python3 ../refine.py -H localhost -P 3334" mkdir -p "tmp/${t}" # =================================== DATA =================================== # @@ -39,21 +42,21 @@ DATA # ================================= ASSERTION ================================ # -# if [[ "$version" >= 2 ]]; then +#if [[ "$version" >= 2 ]]; then cat << "DATA" > "tmp/${t}/${t}.assert" a b apply c 1 2 TEST 3 0 0 0 0 $ \ \ ' DATA -# else -# fi +#else +#fi # ================================== ACTION ================================== # -${client} --create "tmp/${t}/${t}.csv" -${client} --apply "tmp/${t}/${t}.transform" "${t}" -${client} --export "${t}" --output "tmp/${t}/${t}.output" +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --apply "tmp/${t}/${t}.transform" "${t}" +${cmd} --export "${t}" --output "tmp/${t}/${t}.output" # =================================== TEST =================================== # diff --git a/tests/templating-filter-utf8.sh b/tests/templating-filter-utf8.sh new file mode 100755 index 0000000..78d883a --- /dev/null +++ b/tests/templating-filter-utf8.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +🔣,code,meaning +🍇,1F347,GRAPES +🍉,1F349,WATERMELON +🍒,1F352,CHERRIES +🍓,1F353,STRAWBERRY +🍍,1F34D,PINEAPPLE +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +{ "emojis" : [ + { "symbol" : "🍇", "meaning" : "GRAPES" }, + { "symbol" : "🍉", "meaning" : "WATERMELON" }, + { "symbol" : "🍍", "meaning" : "PINEAPPLE" } +] } +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" \ +--prefix '{ "emojis" : [ +' \ +--template ' { "symbol" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, "meaning" : {{jsonize(cells["meaning"].value)}} }' \ +--rowSeparator ', +' \ +--suffix ' +] } +' \ +--filterQuery '^1F34' \ +--filterColumn 'code' \ +--output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/templating-filter.sh b/tests/templating-filter.sh new file mode 100755 index 0000000..e63c710 --- /dev/null +++ b/tests/templating-filter.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +email,name,state,gender,purchase +danny.baron@example1.com,Danny Baron,CA,M,TV +melanie.white@example2.edu,Melanie White,NC,F,iPhone +danny.baron@example1.com,D. Baron,CA,M,Winter jacket +ben.tyler@example3.org,Ben Tyler,NV,M,Flashlight +arthur.duff@example4.com,Arthur Duff,OR,M,Dining table +danny.baron@example1.com,Daniel Baron,CA,M,Bike +jean.griffith@example5.org,Jean Griffith,WA,F,Power drill +melanie.white@example2.edu,Melanie White,NC,F,iPad +ben.morisson@example6.org,Ben Morisson,FL,M,Amplifier +arthur.duff@example4.com,Arthur Duff,OR,M,Night table +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +{ "events" : [ + { "name" : "Melanie White", "purchase" : "iPhone" }, + { "name" : "Jean Griffith", "purchase" : "Power drill" }, + { "name" : "Melanie White", "purchase" : "iPad" } +] } +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" \ +--prefix '{ "events" : [ +' \ +--template ' { "name" : {{jsonize(cells["name"].value)}}, "purchase" : {{jsonize(cells["purchase"].value)}} }' \ +--rowSeparator ', +' \ +--suffix ' +] } +' \ +--filterQuery '^F$' \ +--filterColumn 'gender' \ +--output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/templating-split-id-utf8.sh b/tests/templating-split-id-utf8.sh new file mode 100755 index 0000000..ec30a4a --- /dev/null +++ b/tests/templating-split-id-utf8.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +🔣,code,meaning +🍇,1F347,GRAPES +🍉,1F349,WATERMELON +🍒,1F352,CHERRIES +🍓,1F353,STRAWBERRY +🍍,1F34D,PINEAPPLE +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +{ "emojis" : [ + { "symbol" : "🍍", "meaning" : "PINEAPPLE" } +] } +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" \ +--prefix '{ "emojis" : [ +' \ +--template ' { "symbol" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, "meaning" : {{jsonize(cells["meaning"].value)}} }' \ +--rowSeparator ', +' \ +--suffix ' +] } +' \ +--splitToFiles true \ +--suffixById true \ +--output "tmp/${t}/trái cây.json" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/trái cây_🍍.json" diff --git a/tests/templating-split-id.sh b/tests/templating-split-id.sh new file mode 100755 index 0000000..a739c52 --- /dev/null +++ b/tests/templating-split-id.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +email,name,state,gender,purchase +danny.baron@example1.com,Danny Baron,CA,M,TV +melanie.white@example2.edu,Melanie White,NC,F,iPhone +danny.baron@example1.com,D. Baron,CA,M,Winter jacket +ben.tyler@example3.org,Ben Tyler,NV,M,Flashlight +arthur.duff@example4.com,Arthur Duff,OR,M,Dining table +danny.baron@example1.com,Daniel Baron,CA,M,Bike +jean.griffith@example5.org,Jean Griffith,WA,F,Power drill +melanie.white@example2.edu,Melanie White,NC,F,iPad +ben.morisson@example6.org,Ben Morisson,FL,M,Amplifier +arthur.duff@example4.com,Arthur Duff,OR,M,Night table +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +{ "events" : [ + { "name" : "Arthur Duff", "purchase" : "Night table" } +] } +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" \ +--prefix '{ "events" : [ +' \ +--template ' { "name" : {{jsonize(cells["name"].value)}}, "purchase" : {{jsonize(cells["purchase"].value)}} }' \ +--rowSeparator ', +' \ +--suffix ' +] } +' \ +--splitToFiles true \ +--suffixById true \ +--output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +ls "tmp/${t}" +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}_arthur.duff@example4.com.output" diff --git a/tests/templating-split-utf8.sh b/tests/templating-split-utf8.sh new file mode 100755 index 0000000..3ceeefb --- /dev/null +++ b/tests/templating-split-utf8.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +🔣,code,meaning +🍇,1F347,GRAPES +🍉,1F349,WATERMELON +🍒,1F352,CHERRIES +🍓,1F353,STRAWBERRY +🍍,1F34D,PINEAPPLE +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +{ "emojis" : [ + { "symbol" : "🍍", "meaning" : "PINEAPPLE" } +] } +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" \ +--prefix '{ "emojis" : [ +' \ +--template ' { "symbol" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, "meaning" : {{jsonize(cells["meaning"].value)}} }' \ +--rowSeparator ', +' \ +--suffix ' +] } +' \ +--splitToFiles true \ +--output "tmp/${t}/trái cây.json" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/trái cây_5.json" diff --git a/tests/templating-split.sh b/tests/templating-split.sh new file mode 100755 index 0000000..3929754 --- /dev/null +++ b/tests/templating-split.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +email,name,state,gender,purchase +danny.baron@example1.com,Danny Baron,CA,M,TV +melanie.white@example2.edu,Melanie White,NC,F,iPhone +danny.baron@example1.com,D. Baron,CA,M,Winter jacket +ben.tyler@example3.org,Ben Tyler,NV,M,Flashlight +arthur.duff@example4.com,Arthur Duff,OR,M,Dining table +danny.baron@example1.com,Daniel Baron,CA,M,Bike +jean.griffith@example5.org,Jean Griffith,WA,F,Power drill +melanie.white@example2.edu,Melanie White,NC,F,iPad +ben.morisson@example6.org,Ben Morisson,FL,M,Amplifier +arthur.duff@example4.com,Arthur Duff,OR,M,Night table +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +{ "events" : [ + { "name" : "Arthur Duff", "purchase" : "Night table" } +] } +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" \ +--prefix '{ "events" : [ +' \ +--template ' { "name" : {{jsonize(cells["name"].value)}}, "purchase" : {{jsonize(cells["purchase"].value)}} }' \ +--rowSeparator ', +' \ +--suffix ' +] } +' \ +--splitToFiles true \ +--output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +ls "tmp/${t}" +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}_10.output" diff --git a/tests/templating-utf8.sh b/tests/templating-utf8.sh new file mode 100755 index 0000000..a47f946 --- /dev/null +++ b/tests/templating-utf8.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +🔣,code,meaning +🍇,1F347,GRAPES +🍉,1F349,WATERMELON +🍒,1F352,CHERRIES +🍓,1F353,STRAWBERRY +🍍,1F34D,PINEAPPLE +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +{ "emojis" : [ + { "symbol" : "🍇", "meaning" : "GRAPES" }, + { "symbol" : "🍉", "meaning" : "WATERMELON" }, + { "symbol" : "🍒", "meaning" : "CHERRIES" }, + { "symbol" : "🍓", "meaning" : "STRAWBERRY" }, + { "symbol" : "🍍", "meaning" : "PINEAPPLE" } +] } +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" \ +--prefix '{ "emojis" : [ +' \ +--template ' { "symbol" : {{jsonize(with(row.columnNames[0],cn,cells[cn].value))}}, "meaning" : {{jsonize(cells["meaning"].value)}} }' \ +--rowSeparator ', +' \ +--suffix ' +] } +' \ +--output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/templating.sh b/tests/templating.sh new file mode 100755 index 0000000..e3b89b9 --- /dev/null +++ b/tests/templating.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# =================================== DATA =================================== # + +cat << "DATA" > "tmp/${t}/${t}.csv" +email,name,state,gender,purchase +danny.baron@example1.com,Danny Baron,CA,M,TV +melanie.white@example2.edu,Melanie White,NC,F,iPhone +danny.baron@example1.com,D. Baron,CA,M,Winter jacket +ben.tyler@example3.org,Ben Tyler,NV,M,Flashlight +arthur.duff@example4.com,Arthur Duff,OR,M,Dining table +danny.baron@example1.com,Daniel Baron,CA,M,Bike +jean.griffith@example5.org,Jean Griffith,WA,F,Power drill +melanie.white@example2.edu,Melanie White,NC,F,iPad +ben.morisson@example6.org,Ben Morisson,FL,M,Amplifier +arthur.duff@example4.com,Arthur Duff,OR,M,Night table +DATA + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +{ "events" : [ + { "name" : "Danny Baron", "purchase" : "TV" }, + { "name" : "Melanie White", "purchase" : "iPhone" }, + { "name" : "D. Baron", "purchase" : "Winter jacket" }, + { "name" : "Ben Tyler", "purchase" : "Flashlight" }, + { "name" : "Arthur Duff", "purchase" : "Dining table" }, + { "name" : "Daniel Baron", "purchase" : "Bike" }, + { "name" : "Jean Griffith", "purchase" : "Power drill" }, + { "name" : "Melanie White", "purchase" : "iPad" }, + { "name" : "Ben Morisson", "purchase" : "Amplifier" }, + { "name" : "Arthur Duff", "purchase" : "Night table" } +] } +DATA + +# ================================== ACTION ================================== # + +${cmd} --create "tmp/${t}/${t}.csv" +${cmd} --export "${t}" \ +--prefix '{ "events" : [ +' \ +--template ' { "name" : {{jsonize(cells["name"].value)}}, "purchase" : {{jsonize(cells["purchase"].value)}} }' \ +--rowSeparator ', +' \ +--suffix ' +] } +' \ +--output "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output" diff --git a/tests/usage.sh b/tests/usage.sh new file mode 100755 index 0000000..ccce91a --- /dev/null +++ b/tests/usage.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# =============================== ENVIRONMENT ================================ # + +if [[ ${1} ]]; then + cmd="${1}" +else + echo 1>&2 "execute tests.sh to run all tests"; exit 1 +fi + +t="$(basename "${BASH_SOURCE[0]}" .sh)" +cd "${BASH_SOURCE%/*}/" || exit 1 +mkdir -p "tmp/${t}" + +# ================================= ASSERTION ================================ # + +cat << "DATA" > "tmp/${t}/${t}.assert" +Usage: refine.py [--help | OPTIONS] + +DATA + +# ================================== ACTION ================================== # + +${cmd} > "tmp/${t}/${t}.output" + +# =================================== TEST =================================== # + +diff -u "tmp/${t}/${t}.assert" "tmp/${t}/${t}.output"