{"id":13468424,"url":"https://github.com/zhengkai/zebra","last_synced_at":"2026-04-04T07:31:43.160Z","repository":{"id":141602677,"uuid":"572802366","full_name":"zhengkai/zebra","owner":"zhengkai","description":"基于 Book Searcher 的 Web 界面","archived":false,"fork":false,"pushed_at":"2023-07-20T11:58:15.000Z","size":1174,"stargazers_count":50,"open_issues_count":2,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T22:56:27.634Z","etag":null,"topics":["z-lib"],"latest_commit_sha":null,"homepage":"https://zebra.9farm.com/","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/zhengkai.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":"2022-12-01T03:57:42.000Z","updated_at":"2024-05-10T10:47:59.000Z","dependencies_parsed_at":"2024-01-13T18:10:26.692Z","dependency_job_id":"a1c1df5b-d837-48e4-b6e2-e1296a6e0609","html_url":"https://github.com/zhengkai/zebra","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/zhengkai%2Fzebra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengkai%2Fzebra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengkai%2Fzebra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhengkai%2Fzebra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhengkai","download_url":"https://codeload.github.com/zhengkai/zebra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245597232,"owners_count":20641859,"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":["z-lib"],"created_at":"2024-07-31T15:01:10.559Z","updated_at":"2026-04-04T07:31:43.112Z","avatar_url":"https://github.com/zhengkai.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"Zebra：基于 [Book Searcher](https://github.com/book-searcher-org/book-searcher) 的 Web 界面\n======\n\n\u003chttps://zebra.9farm.com/\u003e\n\n\u003ca href=\"https://zebra.9farm.com/\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/zhengkai/zebra/master/misc/logo/readme.webp\" width=\"256\" height=\"256\" alt=\"Zebra Logo\" /\u003e\u003c/a\u003e\n\n[plan](https://github.com/zhengkai/zebra/blob/master/PLAN.md)\n\n最近没时间搞了，简单描述一下\n\n安装\n------\n\n在本地跑所需要的脚本在 `client/Makefile`，在 `client/` 目录下直接敲 `make` 可以启动 angular 开发环境，修改 `misc/nginx/dev.conf` 为自己的（尤其是 `/search` 里对应的 Book Bearcher 端口）并添加到 nginx 里\n\n特别是，如果你没有安装自己的 Book Searcher，我的 nginx 配置文件里已经写了 \n\n```\nadd_header Access-Control-Allow-Origin *;\n```\n\n不检查跨站谁都能用，也就是你把 `/client/src/app/search/search.service.ts` 里 `SearchService` 的 `baseURL` 加上我的域名前缀，最终为\n\n```\nbaseURL = 'https://zebra.9farm.com/search?limit=100\u0026query=';\n```\n\n就可以让前端能跑起来，当然如果你有能力架 Book Searcher 希望也能关闭跨站检查（上面那行 `add_header`）\n\n部署可以参考 `Makefile` 里的 `prod` 段内容，在 `client/` 目录直接 `./dist/build.sh 你的域名 prod`，并修改 `misc/nginx/dev.conf` 对应你的部署目录\n\n缓存\n------\n\n在我的 nginx 配置 `misc/nginx/prod.conf` 里，有这么两段，开头的\n\n```\nproxy_cache_path /www/zlib/nginx-cache levels=2:2 keys_zone=zlib:50m inactive=48h max_size=1g;\n```\n\n以及 `server` 的定义中有\n\n```\n\tlocation /search {\n\t\tadd_header Access-Control-Allow-Origin *;\n\t\tproxy_cache zlib;\n\t\tproxy_cache_key $uri$is_args$args;\n\t\tproxy_cache_valid 200 304 10m;\n\t\tproxy_pass http://127.0.0.1:7070;\n\t}\n```\n\n这些可以让搜索结果缓存为静态文件，应该可以降低不少负载，可以参考一下\n\nTODO:\n------\n\n* ~~自定义搜索项/结果字段~~ (2022.12.05)\n* ~~自定义下载按钮~~ (2022.12.05)\n* 导入导出设置\n* ~~搜索历史~~ (2022.12.07)\n* 保存单本书\n* 保存搜索历史页\n* 分享书单\n* 离线也能查看已搜过页面\n* 多个后台汇总，防止单点\n* 对单个下载的评价/打分\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhengkai%2Fzebra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhengkai%2Fzebra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhengkai%2Fzebra/lists"}