19 lines
567 B
Python
19 lines
567 B
Python
import re
|
|
|
|
with open('eid_orders.php', 'r') as f:
|
|
content = f.read()
|
|
|
|
colors = ['bg-primary-subtle', 'bg-info-subtle', 'bg-warning-subtle', 'bg-success-subtle']
|
|
parts = content.split('<div class="card border-0 p-2 bg-primary-subtle">')
|
|
|
|
if len(parts) == 5:
|
|
new_content = parts[0]
|
|
for i in range(4):
|
|
new_content += f'<div class="card border-0 p-3 {colors[i]}">' + parts[i+1]
|
|
|
|
with open('eid_orders.php', 'w') as f:
|
|
f.write(new_content)
|
|
print("Patched successfully")
|
|
else:
|
|
print(f"Found {len(parts)} parts, expected 5.")
|