Initial project upload

This commit is contained in:
Kim.KANGHEE
2026-05-05 17:14:11 +09:00
commit 122b73d254
282 changed files with 72135 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
from html.parser import HTMLParser
class DivStructurePrinter(HTMLParser):
def __init__(self):
super().__init__()
self.stack = []
def handle_starttag(self, tag, attrs):
if tag == 'div':
attr_dict = dict(attrs)
ident = attr_dict.get('id', '')
if ident in ['fileTabsContent', 'processed', 'repository', 'repoTabsContent', 'pills-backup']:
print(f"OPEN {ident:15} at line {self.getpos()[0]} (Stack depth: {len(self.stack)})")
self.stack.append(ident)
def handle_endtag(self, tag):
if tag == 'div':
if self.stack:
ident = self.stack.pop()
if ident in ['fileTabsContent', 'processed', 'repository', 'repoTabsContent', 'pills-backup']:
print(f"CLOSE {ident:15} at line {self.getpos()[0]} (Stack depth: {len(self.stack)})")
with open(r"d:\Code\iDRAC_Info\idrac_info\backend\templates\index.html", "r", encoding="utf-8") as f:
content = f.read()
parser = DivStructurePrinter()
parser.feed(content)