{"id":18062181,"url":"https://github.com/messeb/alleswisser","last_synced_at":"2025-04-05T13:21:11.424Z","repository":{"id":151708741,"uuid":"148670794","full_name":"messeb/alleswisser","owner":"messeb","description":null,"archived":false,"fork":false,"pushed_at":"2019-09-03T17:57:08.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-18T09:58:55.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/messeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-09-13T17:07:00.000Z","updated_at":"2019-09-03T17:58:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"3fbec545-ad43-44c5-8e0e-e4ca64b03466","html_url":"https://github.com/messeb/alleswisser","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/messeb%2Falleswisser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2Falleswisser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2Falleswisser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2Falleswisser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/messeb","download_url":"https://codeload.github.com/messeb/alleswisser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339889,"owners_count":20923155,"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-31T05:06:05.143Z","updated_at":"2025-04-05T13:21:11.396Z","avatar_url":"https://github.com/messeb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alleswisser\n\nService to get answers for questions in german. It uses the [WolframAlpha Short Answers API](https://products.wolframalpha.com/short-answers-api/documentation/). \n\nBecause the [Short Answers API](https://products.wolframalpha.com/short-answers-api/documentation/) supports only englisch questions, the initial question is translated to english and the answer is translated back to german.\n\n## Prerequisite\n\n[WolframAlpha API](https://products.wolframalpha.com/api/): Create a free account for api access and register an app to get an  api app id.\n\n## Deployment\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/messeb/alleswisser)\n\n### Heroku\n\n* Install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) and [login](https://devcenter.heroku.com/articles/heroku-cli#getting-started) via the CLI.\n\n* Create a new app via the CLI\n\n```\n$ heroku create\n```\n\nor select an existing app\n\n```\n$ heroku git:remote -a [app name]\n```\n\n*  Set the [WolframAlpha app id](http://developer.wolframalpha.com/portal/myapps/) as Heroku environment variable\n\n```\n$ heroku config:set WOLFRAM_ALPHA_APP_ID=[app id] \n```\n\n* Deploy it on Heroku\n\n```\n$ git push heroku master\n```\n\n### Local\n\n* Export the [WolframAlpha app id](http://developer.wolframalpha.com/portal/myapps/) as environment variable\n\n```\n$ export WOLFRAM_ALPHA_APP_ID=[app id]\n```\n\n* Install all dependencies\n\n```\n$ npm install\n```\n\n* Run it for production\n\n```\n$ npm start\n```\n\nor for development, without separated TypeScript transpiling\n\n```\n$ npm run dev\n```\n\n## Usage \n\nSend a json structure with the question via post request to your Heroku app.\n\n### Json structure\n\n```\n{\n  \"question\": \"Wie groß ist eine Giraffe?\"\n}\n```\n\n### Sample request\n\n```\ncurl -X \"POST\" \"https://[Heroku App ID].herokuapp.com/\" \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -d $'{\n  \"question\": \"Wie groß ist eine Giraffe?\"\n}'\n```\n\n### Response\n\nThe response contains the question, a field if an answer exists and the answer:\n\n```\n{\n  \"question\": \"Wie groß ist eine Giraffe?\",\n  \"has_answer\": true,\n  \"answer\": \"4 bis 6 Meter\"\n}\n```\n\n## Hint\n\nThe service is currently not protected via an api key or some other credentials. Because the usage of the WolframAlpha api can cause additional costs, you should have a look at it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmesseb%2Falleswisser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmesseb%2Falleswisser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmesseb%2Falleswisser/lists"}