{"id":19558520,"url":"https://github.com/mach-kernel/haldunful","last_synced_at":"2026-06-11T18:31:07.882Z","repository":{"id":146170834,"uuid":"52057442","full_name":"mach-kernel/haldunful","owner":"mach-kernel","description":"RESTful Haldun Markov Bot ","archived":false,"fork":false,"pushed_at":"2016-02-19T23:58:08.000Z","size":28,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T08:19:15.453Z","etag":null,"topics":["grape","marky-markov"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/mach-kernel.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}},"created_at":"2016-02-19T03:06:55.000Z","updated_at":"2016-02-19T04:52:21.000Z","dependencies_parsed_at":"2023-05-05T10:25:45.039Z","dependency_job_id":null,"html_url":"https://github.com/mach-kernel/haldunful","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mach-kernel/haldunful","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mach-kernel%2Fhaldunful","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mach-kernel%2Fhaldunful/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mach-kernel%2Fhaldunful/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mach-kernel%2Fhaldunful/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mach-kernel","download_url":"https://codeload.github.com/mach-kernel/haldunful/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mach-kernel%2Fhaldunful/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34213180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["grape","marky-markov"],"created_at":"2024-11-11T04:47:22.308Z","updated_at":"2026-06-11T18:31:07.855Z","avatar_url":"https://github.com/mach-kernel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# haldunful\n![Are we happy?](http://cse.poly.edu/haldun/haldun.jpg)\n\nRESTful Haldun Markov Bot. Powered by [Grape](https://github.com/zolrath/marky_markov) and [marky_markov](https://github.com/zolrath/marky_markov) disgracefully uses disk for persistence because it's a 15 minute joke. Any/all contributions accepted - just make a pull request!\n\nMake requests against the live version at: http://haldunful.herokuapp.com/v1\n\n#### Message to Haldun\nYour phrases and sayings have generated discussion and legend around the Poly CSE crowd. It is only natural to expect us to do something like this at some point. We are happy.\n\n## Getting Started\n```bash\ngit clone https://github.com/mach-kernel/haldunful.github\ncd haldunful \nbundle install\nrails s\n```\n\n## Routes\n\nAll `POST` requests expect a JSON object, all `GET` requests expect querystring parameters. All the magic happens in `lib/markov.rb`.\n\n#### POST `/learn`\nAdd to Haldun's dictionary. The more, the better! \n\n**NOTE**: You must set `Content-Type: application/json`\n\n| Parameter  | Description                          | Type   |\n|------------|--------------------------------------|--------|\n| learn_data | What would you like Haldun to learn? | String |\n\n#### GET `/words`\nWhat would Haldun say?\n\n| Parameter  | Description                          | Type   |\n|------------|--------------------------------------|--------|\n| word_count | How many words? | Integer |\n\n#### GET `/sentences`\nWhat would Haldun say?\n\n| Parameter  | Description                          | Type   |\n|------------|--------------------------------------|--------|\n| word_count | How many sentences? | Integer |\n\n#### Errors\n\nThere's a catchall in `Haldunful::V1` that returns a `500` with some info from the thrown exception, in a JSON object.\n\n## Learn from CSV\n\nI have adopted [this spreadsheet and its format](https://docs.google.com/spreadsheets/d/1pMBLXOh-xjIKd10OxRnh-Izumjqkz8dYM7pPSyH8OoE/edit#gid=0)\n\n```bash\nrake learn:from_csv\\[\"/path/to/haldun.csv\",\"http://haldunful.herokuapp.com\"\\]\n```\n\n## Changelog\n\n- 1.0.2\nFix issue with dictionary persistence by adding `dictionaries/.keep`.\n\n- 1.0.1\nRename `wwhs` to `words` and `sentences`. Add support for complete sentence returns.\n\n- 1.0.0\nInitial Release\n\n## Credits\nThis is basically all possible because of [marky-markov](https://github.com/zolrath/marky_markov) and [Grape](https://github.com/zolrath/marky_markov). I just tied it all together.\n\n## License\n[CC-BY-NC 4](http://creativecommons.org/licenses/by-nc/4.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmach-kernel%2Fhaldunful","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmach-kernel%2Fhaldunful","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmach-kernel%2Fhaldunful/lists"}