54 lines
4.4 KiB
Python
54 lines
4.4 KiB
Python
import os, sys
|
|
|
|
sys.stdout.reconfigure(encoding='utf-8')
|
|
|
|
ch13_path = "resources/knowledge/original/원가계산/건설공사_표준품셈/04_기계설비부문/제13장_플랜트설비공사.md"
|
|
with open(ch13_path, 'r', encoding='utf-8') as f:
|
|
text = f.read()
|
|
|
|
# 1. Line 83
|
|
old_l83 = "| 배 관 용 탄 소 강 관 KS D3507 | 600 〃 650 〃 〃 〃 〃 700 〃 〃 〃 〃 750 〃 〃 〃 800 〃 〃 〃 850 〃 | 609.6 〃 660.4 〃 〃 〃 〃 711.2 〃 〃 〃 〃 762.0 〃 〃 〃 812.8 〃 〃 〃 863.6 〃 | 9.5 10.3 6.0 6.4 7.1 7.9 11.1 6.0 6.4 7.1 7.9 11.9 6.4 7.1 7.9 11.9 6.4 7.1 7.9 11.9 6.4 7.1 | 141 152 96.8 103 114 127 178 104 111 123 137 205 119 132 147 220 127 141 157 235 135 150 | 15.1 14.5 19.0 18.4 17.5 16.6 14.0 19.0 18.4 17.5 16.5 13.5 18.4 17.5 16.5 13.5 18.3 17.4 16.5 13.5 18.3 17.4 | 7.6 7.3 9.5 9.2 8.8 8.3 7.0 9.5 9.2 8.7 8.3 6.7 9.2 8.7 8.3 6.7 9.2 8.7 8.2 6.7 9.2 8.7 | 7.6 7.3 9.5 9.2 8.8 8.3 7.0 9.5 9.2 8.7 8.3 6.7 9.2 8.7 8.3 6.7 9.2 8.7 8.2 6.7 9.2 8.7 | 15.1 14.5 19.0 18.4 17.5 16.6 14.0 19.0 18.4 17.5 16.5 13.5 18.4 17.5 16.5 13.5 18.3 17.4 16.5 13.5 18.3 17.4 |"
|
|
|
|
c_specs = "600 〃 650 〃 〃 〃 〃 700 〃 〃 〃 〃 750 〃 〃 〃 800 〃 〃 〃 850 〃".split()
|
|
c_out = "609.6 〃 660.4 〃 〃 〃 〃 711.2 〃 〃 〃 〃 762.0 〃 〃 〃 812.8 〃 〃 〃 863.6 〃".split()
|
|
c_th = "9.5 10.3 6.0 6.4 7.1 7.9 11.1 6.0 6.4 7.1 7.9 11.9 6.4 7.1 7.9 11.9 6.4 7.1 7.9 11.9 6.4 7.1".split()
|
|
c_wt = "141 152 96.8 103 114 127 178 104 111 123 137 205 119 132 147 220 127 141 157 235 135 150".split()
|
|
c_yw = "15.1 14.5 19.0 18.4 17.5 16.6 14.0 19.0 18.4 17.5 16.5 13.5 18.4 17.5 16.5 13.5 18.3 17.4 16.5 13.5 18.3 17.4".split()
|
|
c_yb = "7.6 7.3 9.5 9.2 8.8 8.3 7.0 9.5 9.2 8.7 8.3 6.7 9.2 8.7 8.3 6.7 9.2 8.7 8.2 6.7 9.2 8.7".split()
|
|
c_yi = "7.6 7.3 9.5 9.2 8.8 8.3 7.0 9.5 9.2 8.7 8.3 6.7 9.2 8.7 8.3 6.7 9.2 8.7 8.2 6.7 9.2 8.7".split()
|
|
c_nb = "15.1 14.5 19.0 18.4 17.5 16.6 14.0 19.0 18.4 17.5 16.5 13.5 18.4 17.5 16.5 13.5 18.3 17.4 16.5 13.5 18.3 17.4".split()
|
|
|
|
rows_l83 = []
|
|
for i in range(len(c_specs)):
|
|
div_name = "배관용 탄소강관 KS D3507" if i == 0 else ""
|
|
row = f"| {div_name} | {c_specs[i]} | {c_out[i]} | {c_th[i]} | {c_wt[i]} | {c_yw[i]} | {c_yb[i]} | {c_yi[i]} | {c_nb[i]} |"
|
|
rows_l83.append(row)
|
|
new_l83 = "\n".join(rows_l83)
|
|
|
|
text = text.replace(old_l83, new_l83)
|
|
|
|
# 2. Line 176
|
|
old_l176 = "| 압력배관용 탄 소 강 관 KSD3562 SCH#40 | 15 20 25 32 40 50 65 80 90 100 125 150 200 250 300 350 400 450 500 | 21.7 27.2 34.0 42.7 48.6 60.5 76.3 89.1 101.6 114.3 139.8 165.2 216.3 267.4 318.5 355.6 406.4 457.2 508.0 | 2.8 2.9 3.4 3.6 3.7 3.9 5.2 5.5 5.7 6.0 6.6 7.1 8.2 9.3 10.3 11.1 12.7 14.3 15.1 | 1.31 1.74 2.57 3.47 4.10 5.44 9.12 11.3 13.5 16.0 21.7 27.7 42.1 59.2 78.3 94.3 123 156 184 | 47.0 41.8 35.2 32.0 30.4 28.2 23.4 22.2 21.5 20.7 19.3 18.4 16.0 15.7 14.8 14.2 13.3 12.5 12.1 | 23.5 20.9 17.6 16.0 15.2 14.1 11.7 11.1 10.7 10.3 9.7 9.2 8.0 7.8 7.4 7.1 6.6 6.2 6.0 | 23.5 20.9 17.6 16.0 15.2 14.1 11.7 11.1 10.7 10.3 9.7 9.2 8.0 7.8 7.4 7.1 6.6 6.2 6.0 | 47.0 41.8 35.2 32.0 30.4 28.2 23.4 22.2 21.5 20.7 19.3 18.4 16.0 15.7 14.8 14.2 13.3 12.5 12.1 |"
|
|
|
|
p_specs = "15 20 25 32 40 50 65 80 90 100 125 150 200 250 300 350 400 450 500".split()
|
|
p_out = "21.7 27.2 34.0 42.7 48.6 60.5 76.3 89.1 101.6 114.3 139.8 165.2 216.3 267.4 318.5 355.6 406.4 457.2 508.0".split()
|
|
p_th = "2.8 2.9 3.4 3.6 3.7 3.9 5.2 5.5 5.7 6.0 6.6 7.1 8.2 9.3 10.3 11.1 12.7 14.3 15.1".split()
|
|
p_wt = "1.31 1.74 2.57 3.47 4.10 5.44 9.12 11.3 13.5 16.0 21.7 27.7 42.1 59.2 78.3 94.3 123 156 184".split()
|
|
p_yw = "47.0 41.8 35.2 32.0 30.4 28.2 23.4 22.2 21.5 20.7 19.3 18.4 16.0 15.7 14.8 14.2 13.3 12.5 12.1".split()
|
|
p_yb = "23.5 20.9 17.6 16.0 15.2 14.1 11.7 11.1 10.7 10.3 9.7 9.2 8.0 7.8 7.4 7.1 6.6 6.2 6.0".split()
|
|
p_yi = "23.5 20.9 17.6 16.0 15.2 14.1 11.7 11.1 10.7 10.3 9.7 9.2 8.0 7.8 7.4 7.1 6.6 6.2 6.0".split()
|
|
p_nb = "47.0 41.8 35.2 32.0 30.4 28.2 23.4 22.2 21.5 20.7 19.3 18.4 16.0 15.7 14.8 14.2 13.3 12.5 12.1".split()
|
|
|
|
rows_l176 = []
|
|
for i in range(len(p_specs)):
|
|
div_name = "압력배관용 탄소강관 KSD3562 SCH#40" if i == 0 else ""
|
|
row = f"| {div_name} | {p_specs[i]} | {p_out[i]} | {p_th[i]} | {p_wt[i]} | {p_yw[i]} | {p_yb[i]} | {p_yi[i]} | {p_nb[i]} |"
|
|
rows_l176.append(row)
|
|
new_l176 = "\n".join(rows_l176)
|
|
|
|
text = text.replace(old_l176, new_l176)
|
|
|
|
with open(ch13_path, 'w', encoding='utf-8') as f:
|
|
f.write(text)
|
|
print("Updated L83 and L176 in 제13장_플랜트설비공사.md successfully.")
|