First commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import re
|
||||
|
||||
# 1. Read 'pertemuan fix/index.html'
|
||||
with open(r"D:\laragon\www\WebGIS\pertemuan fix\index.html", "r", encoding="utf-8") as f:
|
||||
ref_content = f.read()
|
||||
|
||||
# Extract CSS
|
||||
css_match = re.search(r'<style>(.*?)</style>', ref_content, re.DOTALL)
|
||||
css_content = css_match.group(1) if css_match else ""
|
||||
|
||||
# Replace specific variables in CSS for the new context
|
||||
css_content = css_content.replace('--kemiskinan', '--jalan')
|
||||
css_content = css_content.replace('--masjid', '--parsil')
|
||||
|
||||
# We'll save the CSS as style.css
|
||||
with open(r"D:\laragon\www\WebGIS\WebGIS\style.css", "w", encoding="utf-8") as f:
|
||||
f.write(css_content)
|
||||
|
||||
print("Extracted style.css")
|
||||
Reference in New Issue
Block a user