MCPcopy Index your code
hub / github.com/NanBox/PiPiName

github.com/NanBox/PiPiName @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
100 symbols 356 edges 14 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PiPiName

PiPiName 是一个本地中文取名候选工具。它根据三才五格筛选笔画组合,再从诗经、楚辞、论语、周易、唐诗、宋诗、宋词和常见姓名库中生成双字名候选。

相关阅读可以看这里

结果只作为文化出处和候选筛选辅助,不承诺命理正确性,也不替代人工判断。

安装

需要先安装 Python 3.10 或更高版本。

pipx install .

启动

pipiname web --open

打开 http://localhost:9191 使用页面,打开 http://localhost:9191/docs 使用 API 文档。

网页里可以直接生成名字,也可以在“查看姓名”区域输入三字姓名查看三才五格和名字来源。

API

GET /api/health

返回索引状态和记录数。

GET /api/sources

返回可用词库。

POST /api/names/generate

请求示例:

{
  "last_name": "林",
  "source": "shijing",
  "gender": "",
  "min_stroke": 3,
  "max_stroke": 30,
  "allow_general": false,
  "validate_name": true,
  "dislike_words": [],
  "limit": 100,
  "offset": 0
}

响应字段包含:

  • full_name
  • first_name
  • gender
  • first_char
  • second_char
  • stroke1
  • stroke2
  • source_type
  • source_title
  • author
  • sentence

POST /api/names/check

请求示例:

{
  "name": "林蛋大",
  "with_resource": true
}

数据来源

许可

本项目使用 MIT 许可。请同时遵守所引用数据源的许可和署名要求。

Core symbols most depended-on inside this repo

get_stroke_number
called by 15
src/pipiname/stroke.py
generate_names
called by 7
src/pipiname/core.py
to_traditional
called by 6
src/pipiname/text.py
as_dict
called by 6
src/pipiname/models.py
get_stroke_number_traditional
called by 6
src/pipiname/stroke.py
main
called by 5
src/pipiname/cli.py
get_stroke_type
called by 5
src/pipiname/wuge.py
connect
called by 5
src/pipiname/index.py

Shape

Function 68
Method 16
Class 11
Route 5

Languages

Python100%

Modules by API surface

src/pipiname/index.py13 symbols
src/pipiname/api.py13 symbols
src/pipiname/models.py10 symbols
src/pipiname/cli.py10 symbols
scripts/build_index.py10 symbols
tests/test_core_api_cli.py9 symbols
src/pipiname/stroke.py9 symbols
src/pipiname/wuge.py8 symbols
src/pipiname/core.py7 symbols
src/pipiname/text.py6 symbols
main.py3 symbols
tests/test_wuge_stroke.py2 symbols

For agents

$ claude mcp add PiPiName \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact