{"id":17003849,"url":"https://github.com/cldwalker/emoji","last_synced_at":"2025-03-22T10:14:33.417Z","repository":{"id":7668073,"uuid":"9030004","full_name":"cldwalker/emoji","owner":"cldwalker","description":"middleware/interceptorware to add bundled emoji images","archived":false,"fork":false,"pushed_at":"2013-03-28T22:53:22.000Z","size":4016,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T10:44:14.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cldwalker.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-26T12:44:46.000Z","updated_at":"2016-06-17T22:17:10.000Z","dependencies_parsed_at":"2022-09-13T10:22:52.977Z","dependency_job_id":null,"html_url":"https://github.com/cldwalker/emoji","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Femoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Femoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Femoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Femoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cldwalker","download_url":"https://codeload.github.com/cldwalker/emoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244937832,"owners_count":20535127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T04:32:55.400Z","updated_at":"2025-03-22T10:14:33.395Z","avatar_url":"https://github.com/cldwalker.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Description\n\nThis library provides middleware/interceptorware to replace a response\ncontaining emoji names with bundled emoji images.\n\n## Install\n\nAdd to your project.clj:\n\n    [emoji \"0.1.0\"]\n\n## Usage\n\nThe below usages are taken from the full pedestal service and\ncompojure app examples in [examples](examples/).\n\nTo use as an interceptor for a pedestal service:\n\n```clojure\n(require '[io.pedestal.service.interceptor :refer [defon-response]])\n(require '[emoji.core :refer [emoji-response]])\n(defon-response emoji-interceptor\n  [response]\n  (emoji-response response))\n\n;; add emoji-interceptor to a route\n[\"/\" {:get some-endpoint ^:interceptors [emoji-interceptor]]\n```\n\nWith emoji in place, a response body such as `This page is on :fire:`\nbecomes `This page is on \u003cimg height='20' src='/images/emoji/fire.png' style='vertical-align:middle' width='20' /\u003e`.\n\nTo use as middleware for a ring app:\n\n```clojure\n(require '[emoji.core :refer [emoji-response]])\n(require '[ring.middleware.resource :refer [wrap-resource]])\n\n;; Assuming a compojure routes table called app-routes\n;; resource middleware is needed to serve up bundled emojis\n(-\u003e app-routes\n    wrap-emoji\n    (wrap-resource \"/public\"))\n```\n\nOptions `emoji-response` and `wrap-emoji` can take:\n\n* :wild - Converts every word that is a valid emoji name, no\n  colon-delimitation necessary. For example \"This page is on fire\" would yield\n  two emojis since on and fire are emoji names.\n* :replace-fn - Customize the replacement text for an emoji. Useful\n  for customizing the emoji image tag.\n* :images-dir - Specify a local directory for emoji images.\n\nTo copy the bundled emojis: `lein trampoline run -m emoji.core [DIRECTORY]`\n\n## Bugs/Issues\n\nPlease report them\n[on github](http://github.com/cldwalker/emoji/issues).\n\n## Credits\n* This project would not be possible without @github providing [their emojis](https://github.com/github/gemoji/).\n\n## License\n\nFor this library's license see LICENSE.TXT. For license of emoji\nimages see [gemoji's license](https://github.com/github/gemoji/blob/master/LICENSE).\n\n## Links\n* [demo app](https://github.com/cldwalker/emojinator)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldwalker%2Femoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcldwalker%2Femoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldwalker%2Femoji/lists"}