{"id":16707825,"url":"https://github.com/syuilo/homula","last_synced_at":"2025-04-10T05:16:25.235Z","repository":{"id":57266426,"uuid":"56545043","full_name":"syuilo/homula","owner":"syuilo","description":":sparkles: A novel analyzer :sparkles:","archived":false,"fork":false,"pushed_at":"2018-07-14T14:20:24.000Z","size":186,"stargazers_count":6,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T23:33:31.009Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/syuilo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-18T21:57:29.000Z","updated_at":"2024-06-11T05:04:36.000Z","dependencies_parsed_at":"2022-08-25T03:41:00.184Z","dependency_job_id":null,"html_url":"https://github.com/syuilo/homula","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/syuilo%2Fhomula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Fhomula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Fhomula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syuilo%2Fhomula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syuilo","download_url":"https://codeload.github.com/syuilo/homula/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247697844,"owners_count":20981254,"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-12T19:41:09.669Z","updated_at":"2025-04-10T05:16:25.209Z","avatar_url":"https://github.com/syuilo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![homula](./docs/assets/homula.png)\n===================================\n\n[![][npm-badge]][npm-link]\n[![][travis-badge]][travis-link]\n[![][david-runtime-badge]][david-runtime-link]\n[![][david-dev-badge]][david-dev-link]\n[![][mit-badge]][mit-link]\n\n[![NPM](https://nodei.co/npm/homula.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/homula/)\n\n**Homula** is an analyzer of Novel of Japanese.\n\n```\nまどか「まどまどまど」\n\nほむら「ほむほむほむ」\n\nまどか(ほむらちゃほむほむ) ほむら「まどか」\n\nまどか(神)「ほむ」 ほむらA「ほ」 ほむらB「む」\n\nマミ・さやか・あんこ「まみまみさやさやあんあん」\n\nマミさやあん「まみまみさやさやあんあん」\n\nマミ「暁美さnまどか「ほむらちゃほむほむ」\n```\n↑ Compile using **Homula**... ↓\n``` html\n\u003cstyle\u003e.a{color:#f79286}.b{color:#8f5ab5}.c{color:#f9b30e}.d{color:#52c7c7}.e{color:#e82f36}.f{color:#929292}\u003c/style\u003e\n\n\u003cb class=a\u003eまどか\u003c/b\u003e「まどまどまど」\u003cbr\u003e\n\u003cbr\u003e\n\u003cb class=b\u003eほむら\u003c/b\u003e「ほむほむほむ」\u003cbr\u003e\n\u003cbr\u003e\n\u003cb class=a\u003eまどか\u003c/b\u003e(ほむらちゃほむほむ)\u003cb class=b\u003e ほむら\u003c/b\u003e「まどか」\u003cbr\u003e\n\u003cbr\u003e\n\u003cb class=a\u003eまどか(神)\u003c/b\u003e「ほむ」\u003cb class=b\u003e ほむらA\u003c/b\u003e「ほ」\u003cb class=b\u003e ほむらB\u003c/b\u003e「む」\u003cbr\u003e\n\u003cbr\u003e\n\u003cb class=c\u003eマミ\u003c/b\u003e・\u003cb class=d\u003eさやか\u003c/b\u003e・\u003cb class=e\u003eあんこ\u003c/b\u003e「まみまみさやさやあんあん」\u003cbr\u003e\n\u003cbr\u003e\n\u003cb class=c\u003eマミ\u003c/b\u003e\u003cb class=d\u003eさや\u003c/b\u003e\u003cb class=e\u003eあん\u003c/b\u003e「まみまみさやさやあんあん」\u003cbr\u003e\n\u003cbr\u003e\n\u003cb class=c\u003eマミ\u003c/b\u003e「暁美さn\u003cb class=a\u003eまどか\u003c/b\u003e「ほむらちゃほむほむ」\n```\n↑ Yeah! ↓\n\n![](./docs/assets/example.png)\n\nFeatures :sparkles:\n-------------------\n* Origin inference\n* Characters statistics\n* Compile to HTML\n* Thread utilities\n  * Anchor tracking\n  * Extract trips\n  * Extract master posts\n\nInstall :package:\n-----------------\n``` bash\nnpm install homula\n```\n\nUsage :bulb:\n------------\n\n### Basic\n\n``` js\nimport * as homula from 'homula';\n\n// Init a novel instance\nconst novel = new homula.Novel({\n\ttitle: '櫻子「ナデナデシテー」',\n\ttext: '＜向日葵の家＞\\n\\n櫻子「向日葵～……」\\n\\n向日葵「何ですの？」\\n\\n...',\n\tcharacters: [{\n\t\tname: ['向日葵', 'ひま'],\n\t\tcolor: '#416798'\n\t}, {\n\t\tname: ['櫻子', 'さく'],\n\t\tcolor: '#e2b03a'\n\t}]\n});\n\n// Compile\nconst html = novel.toHtml();\n```\n\n### Detect origin\nHomula can detect a origin(ゆるゆり, まどマギ, ごちうさ, etc etc...) of any contents.\nTo do the detect, you must have a database of all of the origin.\n\n**Database definition:**\n``` js\nconst allorigin = [\n\t{\n\t\tid: 'a',\n\t\ttitle: ['魔法少女まどか☆マギカ', 'まどか☆マギカ', 'まどマギ']\n\t}, {\n\t\tid: 'b',\n\t\ttitle: ['ゆるゆり']\n\t}, {\n\t\tid: 'c',\n\t\ttitle: ['ご注文はうさぎですか？', 'ごちうさ']\n\t},\n\t...\n];\n\nconst allchars = [\n\t{\n\t\torigin: 'a',\n\t\tname: ['まどか', 'まど'],\n\t\tcolor: '#f79286'\n\t}, {\n\t\torigin: 'a',\n\t\tname: ['ほむら', 'ほむ', 'ほむほむ'],\n\t\tcolor: '#8f5ab5'\n\t}, {\n\t\torigin: 'b',\n\t\tname: ['あかり', 'あか'],\n\t\tcolor: '#ff2445'\n\t}, {\n\t\torigin: 'b',\n\t\tname: ['向日葵', 'ひま'],\n\t\tcolor: '#416798'\n\t}, {\n\t\torigin: 'b',\n\t\tname: ['櫻子', 'さく'],\n\t\tcolor: '#e2b03a'\n\t},\n\t...\n];\n\nconst world = new homula.Utility.World(allorigin, allchars);\n```\n\n**Now, we can detect origin of a novel:**\n``` js\nconst title = '櫻子「ナデナデシテー」';\nconst text = '＜向日葵の家＞\\n\\n櫻子「向日葵～……」\\n\\n向日葵「何ですの？」\\n\\n...';\n\nconst [origin] = homula.Utility.detectOrigin(world, title, text);\n\nconsole.log(origin.id); // \u003c- b\n```\n\nLicense :copyright:\n-------------------\n[MIT](LICENSE)\n\n[npm-link]: https://www.npmjs.com/package/homula\n[npm-badge]: https://img.shields.io/npm/v/homula.svg?style=flat-square\n[travis-link]: https://travis-ci.org/syuilo/homula\n[travis-badge]: https://img.shields.io/travis/syuilo/homula.svg?style=flat-square\n[david-runtime-link]: https://david-dm.org/syuilo/homula#info=dependencies\u0026view=table\n[david-runtime-badge]: https://img.shields.io/david/syuilo/homula.svg?style=flat-square\n[david-dev-link]: https://david-dm.org/syuilo/homula#info=devDependencies\u0026view=table\n[david-dev-badge]: https://img.shields.io/david/dev/syuilo/homula.svg?style=flat-square\n[mit-link]:  http://opensource.org/licenses/MIT\n[mit-badge]: https://img.shields.io/badge/license-MIT-444444.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyuilo%2Fhomula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyuilo%2Fhomula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyuilo%2Fhomula/lists"}