{"id":17245426,"url":"https://github.com/bobbicodes/wtf","last_synced_at":"2026-05-03T04:41:47.658Z","repository":{"id":101319901,"uuid":"136264182","full_name":"bobbicodes/wtf","owner":"bobbicodes","description":"Clojure Ring app - Answer/Picture search engine","archived":false,"fork":false,"pushed_at":"2018-10-21T05:21:30.000Z","size":6547,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-31T06:42:33.378Z","etag":null,"topics":["clojure","ring"],"latest_commit_sha":null,"homepage":"https://dry-retreat-70804.herokuapp.com/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bobbicodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-06T03:03:33.000Z","updated_at":"2018-10-21T05:21:32.000Z","dependencies_parsed_at":"2023-07-12T10:16:01.799Z","dependency_job_id":null,"html_url":"https://github.com/bobbicodes/wtf","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/bobbicodes%2Fwtf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobbicodes%2Fwtf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobbicodes%2Fwtf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobbicodes%2Fwtf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bobbicodes","download_url":"https://codeload.github.com/bobbicodes/wtf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245591618,"owners_count":20640692,"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":["clojure","ring"],"created_at":"2024-10-15T06:29:32.859Z","updated_at":"2026-05-03T04:41:47.598Z","avatar_url":"https://github.com/bobbicodes.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wtf\n\nThe \"minimum viable product\", or, \"what's the stupidest thing I can build that's still slightly useful?\"\n\nIt's a stupid answer engine. You type something in and it gives you a brief definition and a picture (for most things). That's it. Go ahead, [try it.](https://dry-retreat-70804.herokuapp.com/) It's SO much stupider than Google.\n\nSPOILER: It simply calls the Wikipedia API and returns the description and full-res image for the query.\n\n## The entire code:\n\n```\n(ns wtf.core\n  (:require [ring.middleware.params :as params]\n            [ring.util.response :as ring]\n\t    [clojure.data.json :as json]\n\t    [ring.adapter.jetty :as jetty]\n            [hiccup.page :as page])\n(:gen-class))\n\n(defn wtf [x]\n  (:extract (json/read-str (slurp\n    (str \"https://en.wikipedia.org/api/rest_v1/page/summary/\" x)) :key-fn keyword)))\n\n(defn pic [x]\n  (second (first (:originalimage (json/read-str (slurp\n    (str \"https://en.wikipedia.org/api/rest_v1/page/summary/\" x)) :key-fn keyword)))))\n\n(defn page [name]\n  (page/html5\n   [:head\n    [:meta {:charset \"utf-8\"}]\n    [:meta {:http-equiv \"X-UA-Compatible\" :content \"IE=edge,chrome=1\"}]\n    [:meta {:name \"viewport\" :content \"width=device-width, initial-scale=1, maximum-scale=1\"}]\n    [:title \"WTF?\"]]\n   [:body {:bgcolor \"#E6E6FA\"}\n[:center    \n[:div {:id \"header\"}\n     [:h1 \"WTF?\"]]\n    [:h3 (if name\n         (str \"\u003cform\u003e\"\n              \"WTF is...  \u003cinput name='name' type='text'\u003e ? \"\n              \"\u003cinput type='submit'\u003e\"\n              \"\u003c/form\u003e\u003cbr\u003e\" (wtf name) \"\u003cbr\u003e\u003cbr\u003e\u003cimg src=\" (pic name) \" width=\"1200\"\u003e\")\n         (str \"\u003cform\u003e\"\n              \"WTF is... \u003cinput name='name' type='text'\u003e\"\n              \"\u003cinput type='submit'\u003e\"\n              \"\u003c/form\u003e\"))]]]))\n       \n(defn handler [{{name \"name\"} :params}]\n  (-\u003e (ring/response (page name))\n      (ring/content-type \"text/html\")))\n\n(def app\n  (-\u003e handler params/wrap-params))\n\n(defn start [port]\n  (jetty/run-jetty app {:port port\n                          :join? false}))\n\n(defn -main []\n  (let [port (Integer/parseInt (or (System/getenv \"PORT\") \"8080\"))]\n    (start port)))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobbicodes%2Fwtf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbobbicodes%2Fwtf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobbicodes%2Fwtf/lists"}