diff --git a/update_html.py b/update_html.py deleted file mode 100644 index 414fc8d..0000000 --- a/update_html.py +++ /dev/null @@ -1,39 +0,0 @@ -import os - -files = ['kemiskinan.html', 'spbu.html', 'jalan.html', 'persil.html'] -tabs = ['kemiskinan', 'spbu', 'jalan', 'persil'] - -old_nav = ''' ''' - -for file, active_tab in zip(files, tabs): - with open(file, 'r', encoding='utf-8') as f: - content = f.read() - - new_nav_lines = [' ') - new_nav = '\n'.join(new_nav_lines) - - content = content.replace(old_nav, new_nav) - - old_init = '''''' - new_init = f'''''' - content = content.replace(old_init, new_init) - - content = content.replace('
WebGIS Poverty
', '
WebGIS Poverty
') - - with open(file, 'w', encoding='utf-8') as f: - f.write(content) diff --git a/update_ui.py b/update_ui.py deleted file mode 100644 index 6e2f994..0000000 --- a/update_ui.py +++ /dev/null @@ -1,28 +0,0 @@ -import os -import re - -files = ['kemiskinan.html', 'spbu.html', 'jalan.html', 'persil.html'] - -for file in files: - with open(file, 'r', encoding='utf-8') as f: - content = f.read() - - # 1. Remove nav-tabs block - # Use regex to find and remove the div with class="nav-tabs" and its contents - nav_tabs_pattern = re.compile(r'', re.DOTALL) - content = nav_tabs_pattern.sub('', content) - - # 2. Add back button in panel-head - panel_head_str = '
\n

' - back_btn_html = '''
- - Kembali ke Beranda - -

''' - - # Only replace if not already replaced - if 'Kembali ke Beranda' not in content: - content = content.replace(panel_head_str, back_btn_html) - - with open(file, 'w', encoding='utf-8') as f: - f.write(content)