bazi.calendar.hko_data.encoder
HKO 原始历书的离线下载与编码。
do_download 获取原始材料,do_encode 编码数据;安装后缺表应重装包,不调用此模块修补。
-
bazi.calendar.hko_data.encoder.download_one_year_data(txt_path, year)[源代码]
- 参数:
txt_path (Path)
year (int)
- 返回类型:
bool
-
bazi.calendar.hko_data.encoder.do_download()[源代码]
- 返回类型:
None
读取全部原始 TXT 文件,提取所需数据行。
- 返回类型:
dict[int, list[str]]
-
bazi.calendar.hko_data.encoder.encode_jieqi()[源代码]
- 返回类型:
None
-
bazi.calendar.hko_data.encoder.parse_lines_in_lunar_years()[源代码]
- 返回类型:
dict[int, list[str]]
-
bazi.calendar.hko_data.encoder.parse_ganzhis_in_lunar_years()[源代码]
- 返回类型:
dict[int, Ganzhi]
-
bazi.calendar.hko_data.encoder.encode_one_lunar_year_lines(lunar_year, lines, ganzhi)[源代码]
- 参数:
lunar_year (int)
lines (list[str])
ganzhi (Ganzhi)
- 返回类型:
bytes
-
bazi.calendar.hko_data.encoder.encode_lunardate()[源代码]
- 返回类型:
None
-
bazi.calendar.hko_data.encoder.do_encode()[源代码]
- 返回类型:
None