with open('/workspace/prds/generate_template.py', 'r', encoding='utf-8') as f: c = f.read() dev_donut_replacement = """ const stop1 = pDone; const stop2 = Math.min(100, pDone + pInProg); container.innerHTML = `
${s.completionRate}٪
نرخ موفقیت
""" idx_start = c.find("const C = 238.76;") idx_end = c.find("\n ", idx_start) + 14 if idx_start != -1 and idx_end != -1: c = c[:idx_start] + dev_donut_replacement + c[idx_end:] print("Dev donut updated to conic-gradient!") else: print("Dev donut boundaries not found!", idx_start, idx_end) with open('/workspace/prds/generate_template.py', 'w', encoding='utf-8') as f: f.write(c)