{"id":13695002,"url":"https://github.com/easychen/h2webreader","last_synced_at":"2025-04-29T23:30:42.762Z","repository":{"id":24047934,"uuid":"100475319","full_name":"easychen/h2webreader","owner":"easychen","description":"h2book web reader","archived":false,"fork":false,"pushed_at":"2024-01-09T17:28:13.000Z","size":1779,"stargazers_count":78,"open_issues_count":6,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T20:11:15.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/easychen.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}},"created_at":"2017-08-16T09:58:42.000Z","updated_at":"2024-03-04T04:54:28.000Z","dependencies_parsed_at":"2024-01-14T19:12:38.026Z","dependency_job_id":"8a16b6c6-c85f-4d0a-ba2a-57afe33e2637","html_url":"https://github.com/easychen/h2webreader","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/easychen%2Fh2webreader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fh2webreader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fh2webreader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easychen%2Fh2webreader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easychen","download_url":"https://codeload.github.com/easychen/h2webreader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599726,"owners_count":21615572,"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-08-02T17:01:56.066Z","updated_at":"2025-04-29T23:30:40.549Z","avatar_url":"https://github.com/easychen.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## 方糖氢小说阅读器\n\n⚠️ 已经更新为V2，内置了头像和小说元信息，不再兼容之前的格式，\n\n- [V1版本见这里](https://github.com/easychen/h2webreader/tree/v1)\n- 支持 PHP 上传的版本 https://github.com/easychen/h2reader-host\n\n---\n\n氢小说(H2 Book)是一种对话体、类剧本式的图书格式。它采用对话和场景来展现故事、描述事实，又非常接近于我们平时使用的聊天软件，所以读起来更为轻松。\n\n[点这里感受下](http://du.ftqq.com)  \u0026\u0026 [使用帮助](http://du.ftqq.com/read/1)\n\n访问 [qing.ftqq.com](https://qing.ftqq.com) 可以在线编辑 H2 Book的内容。通过右下角最末的导出按钮，可以下载为 h2book 格式的文件。方糖氢小说阅读器（即本项目）则负责读取 h2book 并提供阅读界面。\n\n### 使用方法\n\n#### 创作内容\n\n- 到 [qing.ftqq.com](https://qing.ftqq.com) 编写书籍内容。\n- 右下角最末的导出按钮，获得 `*.h2book` 文件。\n\n#### 制作阅读器\n\n```\ngit clone https://github.com/easychen/h2webreader\ncd h2webreader\nyarn \n```\n\n然后将之前下载 `*.h2book` 文件改名为 `2.h2zip` 放入 `public/books` 目录下。\n\n```\nyarn start\n```\n\n打开浏览器访问 `http://localhost:3000/2` 就可以阅读了。注意目录名称要和 `.h2book` 文件名一致（不包括后缀）。这时候可以修改 `index.scss` 来定制阅读界面的样式。\n\n#### 文章列表\n\n修改 books/index.json 可以修改首页显示的文章列表。\n\n#### 发布阅读器\n\n定制完成后，运行 \n\n```\nyarn build\n```\n\n会在根下生成一个 `build` 目录，将目录下所有内容放到一个服务器的 web 目录下就OK了。注意本项目只附带了 apache 的 rewrite 文件，其他服务器需自己添加。\n\nNginx 参考：\n\nhttps://stackoverflow.com/questions/36304302/how-can-i-configure-react-router-to-with-nginx-cherrypy-and-my-current-reactjs-a\n```\nlocation / {\n    root /var/www;\n    index index.html;\n\n    try_files $uri $uri/ /index.html;\n}\n```  \n\n#### 追加图书\n\n新写了图书，只要将 `.h2book` 文件放到服务器 web 目录下的 `books` 之下，就可以通过 url （ http://domian/bookname ） 进行访问了。\n\n### License\n\nMIT \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasychen%2Fh2webreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasychen%2Fh2webreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasychen%2Fh2webreader/lists"}