fix: resolve review feedback I1-I7 including ISO 8601 dates, footer address, readme routes, and strict verify_counts gate

This commit is contained in:
2026-07-30 10:44:41 +09:00
parent ea26ef503e
commit 7943b9390f
11 changed files with 267 additions and 180 deletions
@@ -7,6 +7,67 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__fil
ISL_DIR = os.path.join(BASE_DIR, "..", "ISL-2026")
CONTENT_DIR = os.path.join(BASE_DIR, "content")
MONTH_MAP = {
"january": "01", "jan": "01",
"february": "02", "feb": "02",
"march": "03", "mar": "03",
"april": "04", "apr": "04",
"may": "05",
"june": "06", "jun": "06",
"july": "07", "jul": "07",
"august": "08", "aug": "08",
"september": "09", "sep": "09", "sept": "09",
"october": "10", "oct": "10",
"november": "11", "nov": "11",
"december": "12", "dec": "12",
}
def to_iso(raw):
if not raw or "in progress" in raw.lower():
return None
raw = raw.strip()
# 1) YYYY-MM-DD or YYYY.MM.DD
m = re.search(r'(\d{4})[. /\\-]?(\d{1,2})[. /\\-]?(\d{1,2})', raw)
if m:
yr = int(m.group(1))
mo = int(m.group(2))
day = int(m.group(3))
if mo <= 12 and day <= 31:
return f"{yr:04d}-{mo:02d}-{day:02d}"
# 2) "May 2026", "Feb. 2008", "August 2018"
m_txt = re.search(r'([A-Za-z]+)\.?\s*(\d{4})', raw)
if m_txt:
mo_str = m_txt.group(1).lower().rstrip('.')
yr_str = m_txt.group(2)
if mo_str in MONTH_MAP:
return f"{yr_str}-{MONTH_MAP[mo_str]}"
# 3) "2019년 12월", "9월, 1999"
m_kor = re.search(r'(\d{4})년\s*(\d{1,2})월', raw)
if m_kor:
return f"{int(m_kor.group(1)):04d}-{int(m_kor.group(2)):02d}"
m_kor2 = re.search(r'(\d{1,2})월.*?,?\s*(\d{4})', raw)
if m_kor2:
return f"{int(m_kor2.group(2)):04d}-{int(m_kor2.group(1)):02d}"
# 4) YYYY-MM or YYYY.MM
m_ym = re.search(r'(\d{4})[. /\\-]?(\d{1,2})', raw)
if m_ym:
yr = int(m_ym.group(1))
mo = int(m_ym.group(2))
if mo <= 12:
return f"{yr:04d}-{mo:02d}"
# 5) YYYY only
m_y = re.search(r'(\d{4})', raw)
if m_y:
return f"{int(m_y.group(1)):04d}"
return raw
def read_file(filename):
path = os.path.join(ISL_DIR, filename)
with open(path, "r", encoding="utf-8-sig") as f:
@@ -120,7 +181,6 @@ def parse_publications():
intl_html = read_file("paper-international.html")
dom_html = read_file("paper-domestic.html")
pat_html = read_file("patent.html")
month_map = {"January":"01","February":"02","March":"03","April":"04","May":"05","June":"06","July":"07","August":"08","September":"09","October":"10","November":"11","December":"12"}
intl_pubs = []
intl_items = re.findall(r'<LI>(.*?)</LI>', intl_html, flags=re.S | re.I)
@@ -137,12 +197,7 @@ def parse_publications():
rest_clean = re.sub(r'<.*?>', '', rest).replace('\n', ' ').strip()
rest_clean = re.sub(r'^\s*,\s*', '', rest_clean)
m_date = re.search(r'([A-Za-z]+)\s+(\d{4})', rest_clean)
pub_date = "2026-01"
if m_date:
mo, yr = m_date.group(1), m_date.group(2)
if mo in month_map:
pub_date = f"{yr}-{month_map[mo]}"
pub_date = to_iso(rest_clean) or "2026-01"
intl_pubs.append({
"category": "intl-journal-conf",
@@ -168,12 +223,7 @@ def parse_publications():
rest_clean = re.sub(r'^\s*,\s*', '', rest_clean)
is_kci = "(KCI)" in item or "(KCI)" in rest_clean
m_date = re.search(r'(\d{4})년\s*(\d{1,2})월', rest_clean)
if m_date:
pub_date = f"{m_date.group(1)}-{int(m_date.group(2)):02d}"
else:
pub_date = "2026-01"
pub_date = to_iso(rest_clean) or "2026-01"
dom_pubs.append({
"category": "domestic-journal-conf",
@@ -194,7 +244,7 @@ def parse_publications():
title = lines[0]
inventors = ""
app_no = ""
app_date = ""
app_date = None
reg_no = None
reg_date = None
country = "한국"
@@ -207,14 +257,14 @@ def parse_publications():
if m:
app_no = m.group(1)
country = m.group(2)
app_date = m.group(3).replace('.', '-')
app_date = to_iso(m.group(3))
else:
app_no = l.replace("출원번호:", "").strip()
elif l.startswith("등록번호:"):
m = re.search(r'등록번호:\s*([\d-]+)\s*\((.*?),\s*([\d.]+)\)', l)
if m:
reg_no = m.group(1)
reg_date = m.group(3).replace('.', '-')
reg_date = to_iso(m.group(3))
else:
reg_no = l.replace("등록번호:", "").strip()
@@ -287,7 +337,6 @@ def parse_standards():
role = "Convenor" if "Convenor" in header or "Convenor" in body else None
projects = []
# If 'o ' exists, split by 'o '
if re.search(r'^\s*o\s+', body, flags=re.M):
proj_blocks = re.split(r'\s*o\s+', body)
for proj_b in proj_blocks:
@@ -319,7 +368,7 @@ def parse_standards():
elif "TS" in d_rest: status = "TS"
m_date = re.search(r'\((.*?)\)', d_rest)
pub_date = m_date.group(1) if m_date and "In Progress" not in m_date.group(1) else None
pub_date = to_iso(m_date.group(1)) if m_date else None
docs.append({
"title": d_title,
@@ -334,7 +383,6 @@ def parse_standards():
"documents": docs
})
else:
# Single project body
doc_items = re.findall(r'<LI>(.*?)</LI>', body, flags=re.S | re.I)
docs = []
for d_item in doc_items:
@@ -353,7 +401,7 @@ def parse_standards():
elif "TS" in d_rest: status = "TS"
m_date = re.search(r'\((.*?)\)', d_rest)
pub_date = m_date.group(1) if m_date and "In Progress" not in m_date.group(1) else None
pub_date = to_iso(m_date.group(1)) if m_date else None
docs.append({
"title": d_title,