21 lines
766 B
Python
21 lines
766 B
Python
import os, sys
|
|
sys.path.append('scratch')
|
|
from find_strict_grouped_tables import true_grouped_tables
|
|
|
|
sys.stdout.reconfigure(encoding='utf-8')
|
|
maint_tables = [t for t in true_grouped_tables if t['file'] == '제2장_토목.md']
|
|
|
|
fpath = 'resources/knowledge/original/원가계산/건설공사_표준품셈/05_유지관리부문/제2장_토목.md'
|
|
with open(fpath, 'r', encoding='utf-8') as f:
|
|
lines = f.readlines()
|
|
|
|
for t in maint_tables:
|
|
lno = t['line']
|
|
print(f"\n=======================================================")
|
|
print(f"L{lno}: {t['title']}")
|
|
print(f"Groups: {t['groups']}")
|
|
start = max(0, lno - 1)
|
|
end = min(len(lines), lno + t['total_rows'] + 2)
|
|
for i in range(start, end):
|
|
print(f"{i+1:4d}: {lines[i].rstrip()}")
|