chore: remove private chart data from project
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"""生成标准验证星盘数据集 - 60张名人星盘 + PyJhora D1/Rasi Yoga验证结果"""
|
||||
import json, os, subprocess, sys
|
||||
|
||||
PYJHORA = "/Users/wuyongnaren/.workbuddy/binaries/python/envs/pyjhora-benchmark/bin/python"
|
||||
PYJHORA = "<home>/.workbuddy/binaries/python/envs/pyjhora-benchmark/bin/python"
|
||||
HELPER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "_compute_one_chart.py")
|
||||
|
||||
CELEBRITY_CHARTS = [
|
||||
|
||||
@@ -544,7 +544,7 @@ def _source_grade(item: dict[str, Any]) -> tuple[str, str]:
|
||||
return "ocr_low_confidence_reference_only", "OCR text too short or noisy for promotion review."
|
||||
if "jyotish_training" in path:
|
||||
return "reference_only", "Training material can inform style/workflow but cannot outrank source rules."
|
||||
if "/文件仓库/印度占星文章/" in path or path.endswith("印度占星.pdf") or path.endswith("印度占星1.pdf"):
|
||||
if "/文件仓库/印度占星文章/" in path or path.endswith("印度占星.pdf") or path.endswith("private_chart_reference.pdf"):
|
||||
return "promote_to_reference_pack_candidate", "Source-like document; candidate for reference pack after conflict arbitration."
|
||||
return "reference_only", "Useful context, not first-order rule source."
|
||||
|
||||
|
||||
@@ -1,251 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Export the chart research book root to a simple readable PDF."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
from reportlab.lib.colors import HexColor
|
||||
from reportlab.lib.enums import TA_CENTER
|
||||
from reportlab.lib.pagesizes import A4
|
||||
from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet
|
||||
from reportlab.lib.units import mm
|
||||
from reportlab.pdfbase.pdfmetrics import registerFont
|
||||
from reportlab.pdfbase.ttfonts import TTFont
|
||||
from reportlab.platypus import PageBreak, Paragraph, Preformatted, SimpleDocTemplate, Spacer
|
||||
|
||||
|
||||
FONT_CANDIDATES = [
|
||||
("/System/Library/Fonts/Supplemental/Songti.ttc", 0),
|
||||
("/System/Library/Fonts/Supplemental/Arial Unicode.ttf", 0),
|
||||
("/Library/Fonts/Arial Unicode.ttf", 0),
|
||||
]
|
||||
|
||||
|
||||
def _parse_args() -> argparse.Namespace:
|
||||
parser = argparse.ArgumentParser(description="Export chart research book root to PDF")
|
||||
parser.add_argument(
|
||||
"--report-root",
|
||||
default="docs/reports/chart_research_REDACTED_DATE_REDACTED_TIME",
|
||||
help="Path to the chart research report root",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--output",
|
||||
default=None,
|
||||
help="Output PDF path; defaults to <report-root>/exports/chart_research_REDACTED_DATE_REDACTED_TIME.pdf",
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def _load_order(book_path: Path) -> list[Path]:
|
||||
text = book_path.read_text(encoding="utf-8")
|
||||
links = re.findall(r"\]\(\./([^)]+\.md)\)", text)
|
||||
return [book_path.parent / link for link in links]
|
||||
|
||||
|
||||
def _clean_inline(text: str) -> str:
|
||||
text = re.sub(r"\[([^\]]+)\]\([^)]+\)", r"\1", text)
|
||||
text = text.replace("`", "")
|
||||
text = text.replace("**", "")
|
||||
text = text.replace("*", "")
|
||||
return text.strip()
|
||||
|
||||
|
||||
def _register_book_font() -> str:
|
||||
font_name = "ChartResearchBookFont"
|
||||
for font_path, subfont_index in FONT_CANDIDATES:
|
||||
path = Path(font_path)
|
||||
if not path.exists():
|
||||
continue
|
||||
registerFont(TTFont(font_name, str(path), subfontIndex=subfont_index))
|
||||
return font_name
|
||||
raise RuntimeError(
|
||||
"No renderable CJK font found for PDF export. Tried: "
|
||||
+ ", ".join(path for path, _ in FONT_CANDIDATES)
|
||||
)
|
||||
|
||||
|
||||
def _styles():
|
||||
font_name = _register_book_font()
|
||||
base = getSampleStyleSheet()
|
||||
title = ParagraphStyle(
|
||||
"BookTitle",
|
||||
parent=base["Title"],
|
||||
fontName=font_name,
|
||||
fontSize=22,
|
||||
leading=28,
|
||||
alignment=TA_CENTER,
|
||||
textColor=HexColor("#2c241c"),
|
||||
spaceAfter=18,
|
||||
)
|
||||
h1 = ParagraphStyle(
|
||||
"H1",
|
||||
parent=base["Heading1"],
|
||||
fontName=font_name,
|
||||
fontSize=18,
|
||||
leading=24,
|
||||
textColor=HexColor("#2f2a24"),
|
||||
spaceBefore=10,
|
||||
spaceAfter=8,
|
||||
)
|
||||
h2 = ParagraphStyle(
|
||||
"H2",
|
||||
parent=base["Heading2"],
|
||||
fontName=font_name,
|
||||
fontSize=14,
|
||||
leading=20,
|
||||
textColor=HexColor("#3d352c"),
|
||||
spaceBefore=8,
|
||||
spaceAfter=6,
|
||||
)
|
||||
h3 = ParagraphStyle(
|
||||
"H3",
|
||||
parent=base["Heading3"],
|
||||
fontName=font_name,
|
||||
fontSize=12,
|
||||
leading=17,
|
||||
textColor=HexColor("#4a4036"),
|
||||
spaceBefore=6,
|
||||
spaceAfter=4,
|
||||
)
|
||||
body = ParagraphStyle(
|
||||
"Body",
|
||||
parent=base["BodyText"],
|
||||
fontName=font_name,
|
||||
fontSize=10.5,
|
||||
leading=16,
|
||||
textColor=HexColor("#332b24"),
|
||||
spaceAfter=4,
|
||||
)
|
||||
bullet = ParagraphStyle(
|
||||
"Bullet",
|
||||
parent=body,
|
||||
leftIndent=10,
|
||||
firstLineIndent=0,
|
||||
)
|
||||
mono = ParagraphStyle(
|
||||
"Mono",
|
||||
parent=body,
|
||||
fontName=font_name,
|
||||
fontSize=8.8,
|
||||
leading=12,
|
||||
)
|
||||
return {"title": title, "h1": h1, "h2": h2, "h3": h3, "body": body, "bullet": bullet, "mono": mono}
|
||||
|
||||
|
||||
def _render_markdown(md_path: Path, styles: dict[str, ParagraphStyle]) -> list:
|
||||
text = md_path.read_text(encoding="utf-8")
|
||||
lines = text.splitlines()
|
||||
flow = []
|
||||
i = 0
|
||||
|
||||
while i < len(lines):
|
||||
line = lines[i].rstrip()
|
||||
stripped = line.strip()
|
||||
if not stripped:
|
||||
flow.append(Spacer(1, 4))
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if stripped.startswith("|"):
|
||||
block = []
|
||||
while i < len(lines) and lines[i].strip().startswith("|"):
|
||||
block.append(lines[i].rstrip())
|
||||
i += 1
|
||||
flow.append(Preformatted("\n".join(block), styles["mono"]))
|
||||
flow.append(Spacer(1, 5))
|
||||
continue
|
||||
|
||||
if stripped.startswith("# "):
|
||||
flow.append(Paragraph(_clean_inline(stripped[2:]), styles["h1"]))
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if stripped.startswith("## "):
|
||||
flow.append(Paragraph(_clean_inline(stripped[3:]), styles["h2"]))
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if stripped.startswith("### "):
|
||||
flow.append(Paragraph(_clean_inline(stripped[4:]), styles["h3"]))
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if stripped.startswith("> "):
|
||||
flow.append(Paragraph(_clean_inline(stripped[2:]), styles["body"]))
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if stripped.startswith("- "):
|
||||
flow.append(Paragraph("• " + _clean_inline(stripped[2:]), styles["bullet"]))
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if re.match(r"^\d+\.\s", stripped):
|
||||
flow.append(Paragraph(_clean_inline(stripped), styles["bullet"]))
|
||||
i += 1
|
||||
continue
|
||||
|
||||
para = [stripped]
|
||||
i += 1
|
||||
while i < len(lines):
|
||||
nxt = lines[i].strip()
|
||||
if not nxt or nxt.startswith(("#", "|", "-", ">")) or re.match(r"^\d+\.\s", nxt):
|
||||
break
|
||||
para.append(nxt)
|
||||
i += 1
|
||||
flow.append(Paragraph(_clean_inline(" ".join(para)), styles["body"]))
|
||||
|
||||
return flow
|
||||
|
||||
|
||||
def build_pdf(report_root: Path, output_pdf: Path) -> Path:
|
||||
styles = _styles()
|
||||
md_files = _load_order(report_root / "book.md")
|
||||
|
||||
story = [
|
||||
Spacer(1, 25 * mm),
|
||||
Paragraph("B.V. Raman / Parashara / Jaimini Comprehensive Chart Research", styles["title"]),
|
||||
Paragraph("REDACTED_DATE REDACTED_TIME UTC+8 | REDACTED_PLACE Fengfeng, Hebei | Raman ayanamsa | Mean Node", styles["body"]),
|
||||
Spacer(1, 12 * mm),
|
||||
Paragraph("Markdown-first export generated from the report book root.", styles["body"]),
|
||||
PageBreak(),
|
||||
]
|
||||
|
||||
for idx, md_path in enumerate(md_files):
|
||||
if idx > 0:
|
||||
story.append(PageBreak())
|
||||
story.extend(_render_markdown(md_path, styles))
|
||||
|
||||
output_pdf.parent.mkdir(parents=True, exist_ok=True)
|
||||
doc = SimpleDocTemplate(
|
||||
str(output_pdf),
|
||||
pagesize=A4,
|
||||
leftMargin=18 * mm,
|
||||
rightMargin=18 * mm,
|
||||
topMargin=18 * mm,
|
||||
bottomMargin=18 * mm,
|
||||
title="B.V. Raman / Parashara / Jaimini Comprehensive Chart Research",
|
||||
author="Codex + repo runtime outputs",
|
||||
)
|
||||
doc.build(story)
|
||||
return output_pdf
|
||||
|
||||
|
||||
def main() -> int:
|
||||
args = _parse_args()
|
||||
report_root = Path(args.report_root).resolve()
|
||||
output_pdf = (
|
||||
Path(args.output).resolve()
|
||||
if args.output
|
||||
else report_root / "exports" / "chart_research_REDACTED_DATE_REDACTED_TIME.pdf"
|
||||
)
|
||||
build_pdf(report_root, output_pdf)
|
||||
print(output_pdf)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -89,7 +89,7 @@ def _vedastro_ledger(oracle_file: str, *, live_official_full_snapshot: bool = Fa
|
||||
"scripts/vedastro_service_adapter.py",
|
||||
"--official-full-snapshot",
|
||||
"--case",
|
||||
"user_REDACTED_YEAR_test",
|
||||
"steve_jobs_public_aa",
|
||||
])
|
||||
else:
|
||||
snapshot = {
|
||||
|
||||
@@ -12,7 +12,7 @@ from scripts.shadbala_oracle_comparison import compare_case as compare_shadbala_
|
||||
|
||||
|
||||
SHADBALA_CASE_IDS = [
|
||||
"template_user_REDACTED_YEAR_moon_longitude_lahiri",
|
||||
"template_steve_jobs_dasha_lahiri",
|
||||
"template_steve_jobs_dasha_lahiri",
|
||||
]
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ import oracle_boundary_audit # noqa: E402
|
||||
|
||||
|
||||
LOCAL_DRAFTS_DIR = ROOT / "docs" / "research" / "local_drafts" / "2026-06"
|
||||
EXTERNAL_WORK_BRAIN_DIR = Path("/Users/wuyongnaren/.gemini/antigravity-ide/brain")
|
||||
DISTRIBUTION_MIRROR_DIR = Path("/Users/wuyongnaren/.workbuddy/skills/jyotish-vedic-astrology")
|
||||
EXTERNAL_WORK_BRAIN_DIR = Path("<home>/.gemini/antigravity-ide/brain")
|
||||
DISTRIBUTION_MIRROR_DIR = Path("<home>/.workbuddy/skills/jyotish-vedic-astrology")
|
||||
ORACLE_FILE = ROOT / "references" / "oracle" / "dasha_shadbala_oracle_cases.json"
|
||||
REPO_CLEANUP_MAP = ROOT / "docs" / "research" / "repo_cleanup_promotion_map_2026_07_01.md"
|
||||
ERROR_LEDGER = ROOT / "docs" / "research" / "pre_work_error_ledger.md"
|
||||
@@ -299,8 +299,8 @@ def build_report() -> dict[str, Any]:
|
||||
"exists": REPO_CLEANUP_MAP.exists(),
|
||||
"focus_layers": [
|
||||
"docs/research/local_drafts/2026-06",
|
||||
"/Users/wuyongnaren/.gemini/antigravity-ide/brain",
|
||||
"/Users/wuyongnaren/.workbuddy/skills/jyotish-vedic-astrology",
|
||||
"<home>/.gemini/antigravity-ide/brain",
|
||||
"<home>/.workbuddy/skills/jyotish-vedic-astrology",
|
||||
],
|
||||
},
|
||||
"governance": {
|
||||
|
||||
@@ -211,7 +211,7 @@ DASHA_REFERENCE_AUDIT_CMD = [
|
||||
"--target-start-date",
|
||||
"1986-05-18",
|
||||
"--target-source",
|
||||
"印度占星1.pdf",
|
||||
"private_chart_reference.pdf",
|
||||
]
|
||||
|
||||
ORACLE_BOUNDARY_AUDIT_CMD = [
|
||||
|
||||
@@ -630,7 +630,7 @@ if __name__ == '__main__':
|
||||
print(f" swisseph可用: {HAS_SWE}")
|
||||
print()
|
||||
|
||||
# 测试:REDACTED_DATE 14:45 +8 的出生盘,计算 2026 年太阳返照
|
||||
# 测试:private birth datetime +8 的出生盘,计算 2026 年太阳返照
|
||||
test_birth_year, test_birth_month, test_birth_day = REDACTED_YEAR, 4, 17
|
||||
test_birth_hour, test_birth_minute = 14, 45
|
||||
test_lat, test_lon, test_tz = 36.4667, 114.2, 8.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="/Users/wuyongnaren/Documents/印度占星"
|
||||
ROOT="<repo>"
|
||||
|
||||
FILES=(
|
||||
"AGENTS.md"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="/Users/wuyongnaren/Documents/印度占星"
|
||||
WB="/Users/wuyongnaren/.workbuddy/skills/jyotish-vedic-astrology"
|
||||
ROOT="<repo>"
|
||||
WB="<home>/.workbuddy/skills/jyotish-vedic-astrology"
|
||||
|
||||
mkdir -p "$WB/references"
|
||||
mkdir -p "$WB/skills/jyotish-engine-modules"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="/Users/wuyongnaren/Documents/印度占星"
|
||||
ROOT="<repo>"
|
||||
|
||||
FILES=(
|
||||
"AGENTS.md"
|
||||
|
||||
@@ -481,7 +481,7 @@ def schema() -> dict[str, Any]:
|
||||
"enum": {"__vedastro_enum__": "PlanetName", "value": "Sun"},
|
||||
"geo": {
|
||||
"__vedastro_type__": "GeoLocation",
|
||||
"location_name": "REDACTED_PLACE",
|
||||
"location_name": "San Francisco",
|
||||
"longitude": 114.46,
|
||||
"latitude": 36.6,
|
||||
},
|
||||
@@ -495,7 +495,7 @@ def schema() -> dict[str, Any]:
|
||||
"offset": 8,
|
||||
"geolocation": {
|
||||
"__vedastro_type__": "GeoLocation",
|
||||
"location_name": "REDACTED_PLACE",
|
||||
"location_name": "San Francisco",
|
||||
"longitude": 114.46,
|
||||
"latitude": 36.6,
|
||||
},
|
||||
|
||||
@@ -37,15 +37,15 @@ VEDASTRO_OFFICIAL_CAPABILITY_RUNNER = ROOT / "scripts" / "vedastro_official_capa
|
||||
|
||||
|
||||
PARITY_CASES = {
|
||||
"user_REDACTED_YEAR_test": {
|
||||
"year": REDACTED_YEAR,
|
||||
"month": 4,
|
||||
"day": 17,
|
||||
"hour": 14,
|
||||
"minute": 49,
|
||||
"lat": 36.42,
|
||||
"lon": 114.2,
|
||||
"tz": 8.0,
|
||||
"steve_jobs_public_aa": {
|
||||
"year": 1955,
|
||||
"month": 2,
|
||||
"day": 24,
|
||||
"hour": 19,
|
||||
"minute": 15,
|
||||
"lat": 37.7749,
|
||||
"lon": -122.4194,
|
||||
"tz": -8.0,
|
||||
"ayanamsa_policy": "lahiri",
|
||||
"node_policy": "mean",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user