|
@@ -68,6 +68,139 @@ def send_p(d):
|
|
|
|
|
|
|
|
return(d)
|
|
return(d)
|
|
|
|
|
|
|
|
|
|
+def table_p(d, d2):
|
|
|
|
|
+ alltable = 'style="'
|
|
|
|
|
+ celstyle = 'style="'
|
|
|
|
|
+ rowstyle = 'style="'
|
|
|
|
|
+ row = ''
|
|
|
|
|
+ cel = ''
|
|
|
|
|
+
|
|
|
|
|
+ q = re.search("<table\s?width=((?:(?!>).)*)>", d)
|
|
|
|
|
+ w = re.search("<table\s?height=((?:(?!>).)*)>", d)
|
|
|
|
|
+ e = re.search("<table\s?align=((?:(?!>).)*)>", d)
|
|
|
|
|
+ if(q):
|
|
|
|
|
+ resultss = q.groups()
|
|
|
|
|
+ alltable += 'width:' + resultss[0] + ';'
|
|
|
|
|
+ if(w):
|
|
|
|
|
+ resultss = w.groups()
|
|
|
|
|
+ alltable += 'height:' + resultss[0] + ';'
|
|
|
|
|
+ if(e):
|
|
|
|
|
+ resultss = e.groups()
|
|
|
|
|
+ if(resultss[0] == 'right'):
|
|
|
|
|
+ alltable += 'float:right;'
|
|
|
|
|
+ elif(resultss[0] == 'center'):
|
|
|
|
|
+ alltable += 'margin:auto;'
|
|
|
|
|
+
|
|
|
|
|
+ ee = re.search("<table\s?textalign=((?:(?!>).)*)>", d)
|
|
|
|
|
+ if(ee):
|
|
|
|
|
+ resultss = ee.groups()
|
|
|
|
|
+ if(resultss[0] == 'right'):
|
|
|
|
|
+ alltable += 'text-align:right;'
|
|
|
|
|
+ elif(resultss[0] == 'center'):
|
|
|
|
|
+ alltable += 'text-align:center;'
|
|
|
|
|
+
|
|
|
|
|
+ r = re.search("<-((?:(?!>).)*)>", d)
|
|
|
|
|
+ if(r):
|
|
|
|
|
+ resultss = r.groups()
|
|
|
|
|
+ cel = 'colspan="' + resultss[0] + '"'
|
|
|
|
|
+ else:
|
|
|
|
|
+ cel = 'colspan="' + str(round(len(d2) / 2)) + '"'
|
|
|
|
|
+
|
|
|
|
|
+ t = re.search("<\|((?:(?!>).)*)>", d)
|
|
|
|
|
+ if(t):
|
|
|
|
|
+ resultss = t.groups()
|
|
|
|
|
+ row = 'rowspan="' + resultss[0] + '"'
|
|
|
|
|
+
|
|
|
|
|
+ ba = re.search("<rowbgcolor=(#[0-9a-f-A-F]{6})>", d)
|
|
|
|
|
+ bb = re.search("<rowbgcolor=(#[0-9a-f-A-F]{3})>", d)
|
|
|
|
|
+ bc = re.search("<rowbgcolor=(\w+)>", d)
|
|
|
|
|
+ if(ba):
|
|
|
|
|
+ resultss = ba.groups()
|
|
|
|
|
+ rowstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+ elif(bb):
|
|
|
|
|
+ resultss = bb.groups()
|
|
|
|
|
+ rowstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+ elif(bc):
|
|
|
|
|
+ resultss = bc.groups()
|
|
|
|
|
+ rowstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+
|
|
|
|
|
+ z = re.search("<table\s?bordercolor=(#[0-9a-f-A-F]{6})>", d)
|
|
|
|
|
+ x = re.search("<table\s?bordercolor=(#[0-9a-f-A-F]{3})>", d)
|
|
|
|
|
+ c = re.search("<table\s?bordercolor=(\w+)>", d)
|
|
|
|
|
+ if(z):
|
|
|
|
|
+ resultss = z.groups()
|
|
|
|
|
+ alltable += 'border:' + resultss[0] + ' 2px solid;'
|
|
|
|
|
+ elif(x):
|
|
|
|
|
+ resultss = x.groups()
|
|
|
|
|
+ alltable += 'border:' + resultss[0] + ' 2px solid;'
|
|
|
|
|
+ elif(c):
|
|
|
|
|
+ resultss = c.groups()
|
|
|
|
|
+ alltable += 'border:' + resultss[0] + ' 2px solid;'
|
|
|
|
|
+
|
|
|
|
|
+ aq = re.search("<table\s?bgcolor=(#[0-9a-f-A-F]{6})>", d)
|
|
|
|
|
+ aw = re.search("<table\s?bgcolor=(#[0-9a-f-A-F]{3})>", d)
|
|
|
|
|
+ ae = re.search("<table\s?bgcolor=(\w+)>", d)
|
|
|
|
|
+ if(aq):
|
|
|
|
|
+ resultss = aq.groups()
|
|
|
|
|
+ alltable += 'background:' + resultss[0] + ';'
|
|
|
|
|
+ elif(aw):
|
|
|
|
|
+ resultss = aw.groups()
|
|
|
|
|
+ alltable += 'background:' + resultss[0] + ';'
|
|
|
|
|
+ elif(ae):
|
|
|
|
|
+ resultss = ae.groups()
|
|
|
|
|
+ alltable += 'background:' + resultss[0] + ';'
|
|
|
|
|
+
|
|
|
|
|
+ j = re.search("<bgcolor=(#[0-9a-f-A-F]{6})>", d)
|
|
|
|
|
+ k = re.search("<bgcolor=(#[0-9a-f-A-F]{3})>", d)
|
|
|
|
|
+ l = re.search("<bgcolor=(\w+)>", d)
|
|
|
|
|
+ if(j):
|
|
|
|
|
+ resultss = j.groups()
|
|
|
|
|
+ celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+ elif(k):
|
|
|
|
|
+ resultss = k.groups()
|
|
|
|
|
+ celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+ elif(l):
|
|
|
|
|
+ resultss = l.groups()
|
|
|
|
|
+ celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+
|
|
|
|
|
+ aa = re.search("<(#[0-9a-f-A-F]{6})>", d)
|
|
|
|
|
+ ab = re.search("<(#[0-9a-f-A-F]{3})>", d)
|
|
|
|
|
+ ac = re.search("<(\w+)>", d)
|
|
|
|
|
+ if(aa):
|
|
|
|
|
+ resultss = aa.groups()
|
|
|
|
|
+ celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+ elif(ab):
|
|
|
|
|
+ resultss = ab.groups()
|
|
|
|
|
+ celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+ elif(ac):
|
|
|
|
|
+ resultss = ac.groups()
|
|
|
|
|
+ celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
+
|
|
|
|
|
+ qa = re.search("<width=((?:(?!>).)*)>", d)
|
|
|
|
|
+ qb = re.search("<height=((?:(?!>).)*)>", d)
|
|
|
|
|
+ if(qa):
|
|
|
|
|
+ resultss = qa.groups()
|
|
|
|
|
+ celstyle += 'width:' + resultss[0] + ';'
|
|
|
|
|
+ if(qb):
|
|
|
|
|
+ resultss = qb.groups()
|
|
|
|
|
+ celstyle += 'height:' + resultss[0] + ';'
|
|
|
|
|
+
|
|
|
|
|
+ i = re.search("<\)>", d)
|
|
|
|
|
+ o = re.search("<:>", d)
|
|
|
|
|
+ p = re.search("<\(>", d)
|
|
|
|
|
+ if(i):
|
|
|
|
|
+ celstyle += 'text-align:right;'
|
|
|
|
|
+ elif(o):
|
|
|
|
|
+ celstyle += 'text-align:center;'
|
|
|
|
|
+ elif(p):
|
|
|
|
|
+ celstyle += 'text-align:left;'
|
|
|
|
|
+
|
|
|
|
|
+ alltable += '"'
|
|
|
|
|
+ celstyle += '"'
|
|
|
|
|
+ rowstyle += '"'
|
|
|
|
|
+
|
|
|
|
|
+ return([alltable, celstyle, rowstyle, row, cel])
|
|
|
|
|
+
|
|
|
def html_pas(data):
|
|
def html_pas(data):
|
|
|
data = re.sub("%phtml%(?P<in>(?:\/)?(?:a|div|span|embed|iframe)(?:\s[^%]*)?)%phtml%", "<\g<in>>", data)
|
|
data = re.sub("%phtml%(?P<in>(?:\/)?(?:a|div|span|embed|iframe)(?:\s[^%]*)?)%phtml%", "<\g<in>>", data)
|
|
|
while(1):
|
|
while(1):
|
|
@@ -244,7 +377,7 @@ def mid_pas(data, fol_num, include):
|
|
|
else:
|
|
else:
|
|
|
break
|
|
break
|
|
|
|
|
|
|
|
- return((data, fol_num))
|
|
|
|
|
|
|
+ return([data, fol_num])
|
|
|
|
|
|
|
|
def toc_pas(data, title):
|
|
def toc_pas(data, title):
|
|
|
i = [0, 0, 0, 0, 0, 0, 0]
|
|
i = [0, 0, 0, 0, 0, 0, 0]
|
|
@@ -852,133 +985,12 @@ def namumark(title, data, num):
|
|
|
alltable = ''
|
|
alltable = ''
|
|
|
result = a.groups()
|
|
result = a.groups()
|
|
|
if(result[1]):
|
|
if(result[1]):
|
|
|
- alltable = 'style="'
|
|
|
|
|
- celstyle = 'style="'
|
|
|
|
|
- rowstyle = 'style="'
|
|
|
|
|
-
|
|
|
|
|
- q = re.search("<table\s?width=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- w = re.search("<table\s?height=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- e = re.search("<table\s?align=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(q):
|
|
|
|
|
- resultss = q.groups()
|
|
|
|
|
- alltable += 'width:' + resultss[0] + ';'
|
|
|
|
|
- if(w):
|
|
|
|
|
- resultss = w.groups()
|
|
|
|
|
- alltable += 'height:' + resultss[0] + ';'
|
|
|
|
|
- if(e):
|
|
|
|
|
- resultss = e.groups()
|
|
|
|
|
- if(resultss[0] == 'right'):
|
|
|
|
|
- alltable += 'float:right;'
|
|
|
|
|
- elif(resultss[0] == 'center'):
|
|
|
|
|
- alltable += 'margin:auto;'
|
|
|
|
|
-
|
|
|
|
|
- ee = re.search("<table\s?textalign=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(ee):
|
|
|
|
|
- resultss = ee.groups()
|
|
|
|
|
- if(resultss[0] == 'right'):
|
|
|
|
|
- alltable += 'text-align:right;'
|
|
|
|
|
- elif(resultss[0] == 'center'):
|
|
|
|
|
- alltable += 'text-align:center;'
|
|
|
|
|
-
|
|
|
|
|
- r = re.search("<-((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(r):
|
|
|
|
|
- resultss = r.groups()
|
|
|
|
|
- cel = 'colspan="' + resultss[0] + '"'
|
|
|
|
|
- else:
|
|
|
|
|
- cel = 'colspan="' + str(round(len(result[0]) / 2)) + '"'
|
|
|
|
|
-
|
|
|
|
|
- t = re.search("<\|((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(t):
|
|
|
|
|
- resultss = t.groups()
|
|
|
|
|
- row = 'rowspan="' + resultss[0] + '"'
|
|
|
|
|
-
|
|
|
|
|
- ba = re.search("<rowbgcolor=(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- bb = re.search("<rowbgcolor=(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- bc = re.search("<rowbgcolor=(\w+)>", result[1])
|
|
|
|
|
- if(ba):
|
|
|
|
|
- resultss = ba.groups()
|
|
|
|
|
- rowstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(bb):
|
|
|
|
|
- resultss = bb.groups()
|
|
|
|
|
- rowstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(bc):
|
|
|
|
|
- resultss = bc.groups()
|
|
|
|
|
- rowstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- z = re.search("<table\s?bordercolor=(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- x = re.search("<table\s?bordercolor=(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- c = re.search("<table\s?bordercolor=(\w+)>", result[1])
|
|
|
|
|
- if(z):
|
|
|
|
|
- resultss = z.groups()
|
|
|
|
|
- alltable += 'border:' + resultss[0] + ' 2px solid;'
|
|
|
|
|
- elif(x):
|
|
|
|
|
- resultss = x.groups()
|
|
|
|
|
- alltable += 'border:' + resultss[0] + ' 2px solid;'
|
|
|
|
|
- elif(c):
|
|
|
|
|
- resultss = c.groups()
|
|
|
|
|
- alltable += 'border:' + resultss[0] + ' 2px solid;'
|
|
|
|
|
-
|
|
|
|
|
- aq = re.search("<table\s?bgcolor=(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- aw = re.search("<table\s?bgcolor=(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- ae = re.search("<table\s?bgcolor=(\w+)>", result[1])
|
|
|
|
|
- if(aq):
|
|
|
|
|
- resultss = aq.groups()
|
|
|
|
|
- alltable += 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(aw):
|
|
|
|
|
- resultss = aw.groups()
|
|
|
|
|
- alltable += 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(ae):
|
|
|
|
|
- resultss = ae.groups()
|
|
|
|
|
- alltable += 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- j = re.search("<bgcolor=(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- k = re.search("<bgcolor=(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- l = re.search("<bgcolor=(\w+)>", result[1])
|
|
|
|
|
- if(j):
|
|
|
|
|
- resultss = j.groups()
|
|
|
|
|
- celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(k):
|
|
|
|
|
- resultss = k.groups()
|
|
|
|
|
- celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(l):
|
|
|
|
|
- resultss = l.groups()
|
|
|
|
|
- celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- aa = re.search("<(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- ab = re.search("<(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- ac = re.search("<(\w+)>", result[1])
|
|
|
|
|
- if(aa):
|
|
|
|
|
- resultss = aa.groups()
|
|
|
|
|
- celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(ab):
|
|
|
|
|
- resultss = ab.groups()
|
|
|
|
|
- celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(ac):
|
|
|
|
|
- resultss = ac.groups()
|
|
|
|
|
- celstyle += 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- qa = re.search("<width=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- qb = re.search("<height=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(qa):
|
|
|
|
|
- resultss = qa.groups()
|
|
|
|
|
- celstyle += 'width:' + resultss[0] + ';'
|
|
|
|
|
- if(qb):
|
|
|
|
|
- resultss = qb.groups()
|
|
|
|
|
- celstyle += 'height:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- i = re.search("<\)>", result[1])
|
|
|
|
|
- o = re.search("<:>", result[1])
|
|
|
|
|
- p = re.search("<\(>", result[1])
|
|
|
|
|
- if(i):
|
|
|
|
|
- celstyle += 'text-align:right;'
|
|
|
|
|
- elif(o):
|
|
|
|
|
- celstyle += 'text-align:center;'
|
|
|
|
|
- elif(p):
|
|
|
|
|
- celstyle += 'text-align:left;'
|
|
|
|
|
-
|
|
|
|
|
- alltable += '"'
|
|
|
|
|
- celstyle += '"'
|
|
|
|
|
- rowstyle += '"'
|
|
|
|
|
|
|
+ table_d = table_p(result[1], result[0])
|
|
|
|
|
+ alltable = table_d[0]
|
|
|
|
|
+ rowstyle = table_d[1]
|
|
|
|
|
+ celstyle = table_d[2]
|
|
|
|
|
+ row = table_d[3]
|
|
|
|
|
+ cel = table_d[4]
|
|
|
|
|
|
|
|
table = re.sub("^(\|\|(?:(?:\|\|)+)?)((?:<(?:(?:(?!>).)*)>)+)?", "<table " + alltable + "> \
|
|
table = re.sub("^(\|\|(?:(?:\|\|)+)?)((?:<(?:(?:(?!>).)*)>)+)?", "<table " + alltable + "> \
|
|
|
<tbody> \
|
|
<tbody> \
|
|
@@ -1008,81 +1020,11 @@ def namumark(title, data, num):
|
|
|
|
|
|
|
|
result = b.groups()
|
|
result = b.groups()
|
|
|
if(result[1]):
|
|
if(result[1]):
|
|
|
- celstyle = 'style="'
|
|
|
|
|
- rowstyle = 'style="'
|
|
|
|
|
-
|
|
|
|
|
- r = re.search("<-((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(r):
|
|
|
|
|
- resultss = r.groups()
|
|
|
|
|
- cel = 'colspan="' + resultss[0] + '"'
|
|
|
|
|
- else:
|
|
|
|
|
- cel = 'colspan="' + str(round(len(result[0]) / 2)) + '"'
|
|
|
|
|
-
|
|
|
|
|
- t = re.search("<\|((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(t):
|
|
|
|
|
- resultss = t.groups()
|
|
|
|
|
- row = 'rowspan="' + resultss[0] + '"'
|
|
|
|
|
-
|
|
|
|
|
- ba = re.search("<rowbgcolor=(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- bb = re.search("<rowbgcolor=(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- bc = re.search("<rowbgcolor=(\w+)>", result[1])
|
|
|
|
|
- if(ba):
|
|
|
|
|
- resultss = ba.groups()
|
|
|
|
|
- rowstyle = rowstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(bb):
|
|
|
|
|
- resultss = bb.groups()
|
|
|
|
|
- rowstyle = rowstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(bc):
|
|
|
|
|
- resultss = bc.groups()
|
|
|
|
|
- rowstyle = rowstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- j = re.search("<bgcolor=(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- k = re.search("<bgcolor=(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- l = re.search("<bgcolor=(\w+)>", result[1])
|
|
|
|
|
- if(j):
|
|
|
|
|
- resultss = j.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(k):
|
|
|
|
|
- resultss = k.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(l):
|
|
|
|
|
- resultss = l.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- aa = re.search("<(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- ab = re.search("<(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- ac = re.search("<(\w+)>", result[1])
|
|
|
|
|
- if(aa):
|
|
|
|
|
- resultss = aa.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(ab):
|
|
|
|
|
- resultss = ab.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(ac):
|
|
|
|
|
- resultss = ac.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- qa = re.search("<width=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- qb = re.search("<height=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(qa):
|
|
|
|
|
- resultss = qa.groups()
|
|
|
|
|
- celstyle = celstyle + 'width:' + resultss[0] + ';'
|
|
|
|
|
- if(qb):
|
|
|
|
|
- resultss = qb.groups()
|
|
|
|
|
- celstyle = celstyle + 'height:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- i = re.search("<\)>", result[1])
|
|
|
|
|
- o = re.search("<:>", result[1])
|
|
|
|
|
- p = re.search("<\(>", result[1])
|
|
|
|
|
- if(i):
|
|
|
|
|
- celstyle = celstyle + 'text-align:right;'
|
|
|
|
|
- elif(o):
|
|
|
|
|
- celstyle = celstyle + 'text-align:center;'
|
|
|
|
|
- elif(p):
|
|
|
|
|
- celstyle = celstyle + 'text-align:left;'
|
|
|
|
|
-
|
|
|
|
|
- celstyle = celstyle + '"'
|
|
|
|
|
- rowstyle = rowstyle + '"'
|
|
|
|
|
|
|
+ table_d = table_p(result[1], result[0])
|
|
|
|
|
+ rowstyle = table_d[1]
|
|
|
|
|
+ celstyle = table_d[2]
|
|
|
|
|
+ row = table_d[3]
|
|
|
|
|
+ cel = table_d[4]
|
|
|
|
|
|
|
|
table = re.sub("\|\|\r\n(\|\|(?:(?:\|\|)+)?)((?:<(?:(?:(?!>).)*)>)+)?", "</td> \
|
|
table = re.sub("\|\|\r\n(\|\|(?:(?:\|\|)+)?)((?:<(?:(?:(?!>).)*)>)+)?", "</td> \
|
|
|
</tr> \
|
|
</tr> \
|
|
@@ -1106,66 +1048,11 @@ def namumark(title, data, num):
|
|
|
|
|
|
|
|
result = c.groups()
|
|
result = c.groups()
|
|
|
if(result[1]):
|
|
if(result[1]):
|
|
|
- celstyle = 'style="'
|
|
|
|
|
-
|
|
|
|
|
- r = re.search("<-((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(r):
|
|
|
|
|
- resultss = r.groups()
|
|
|
|
|
- cel = 'colspan="' + resultss[0] + '"'
|
|
|
|
|
- else:
|
|
|
|
|
- cel = 'colspan="' + str(round(len(result[0]) / 2)) + '"'
|
|
|
|
|
- t = re.search("<\|((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(t):
|
|
|
|
|
- resultss = t.groups()
|
|
|
|
|
- row = 'rowspan="' + resultss[0] + '"'
|
|
|
|
|
-
|
|
|
|
|
- j = re.search("<bgcolor=(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- k = re.search("<bgcolor=(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- l = re.search("<bgcolor=(\w+)>", result[1])
|
|
|
|
|
- if(j):
|
|
|
|
|
- resultss = j.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(k):
|
|
|
|
|
- resultss = k.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(l):
|
|
|
|
|
- resultss = l.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- aa = re.search("<(#[0-9a-f-A-F]{6})>", result[1])
|
|
|
|
|
- ab = re.search("<(#[0-9a-f-A-F]{3})>", result[1])
|
|
|
|
|
- ac = re.search("<(\w+)>", result[1])
|
|
|
|
|
- if(aa):
|
|
|
|
|
- resultss = aa.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(ab):
|
|
|
|
|
- resultss = ab.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
- elif(ac):
|
|
|
|
|
- resultss = ac.groups()
|
|
|
|
|
- celstyle = celstyle + 'background:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- qa = re.search("<width=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- qb = re.search("<height=((?:(?!>).)*)>", result[1])
|
|
|
|
|
- if(qa):
|
|
|
|
|
- resultss = qa.groups()
|
|
|
|
|
- celstyle = celstyle + 'width:' + resultss[0] + ';'
|
|
|
|
|
- if(qb):
|
|
|
|
|
- resultss = qb.groups()
|
|
|
|
|
- celstyle = celstyle + 'height:' + resultss[0] + ';'
|
|
|
|
|
-
|
|
|
|
|
- i = re.search("<\)>", result[1])
|
|
|
|
|
- o = re.search("<:>", result[1])
|
|
|
|
|
- p = re.search("<\(>", result[1])
|
|
|
|
|
- if(i):
|
|
|
|
|
- celstyle = celstyle + 'text-align:right;'
|
|
|
|
|
- elif(o):
|
|
|
|
|
- celstyle = celstyle + 'text-align:center;'
|
|
|
|
|
- elif(p):
|
|
|
|
|
- celstyle = celstyle + 'text-align:left;'
|
|
|
|
|
|
|
+ table_d = table_p(result[1], result[0])
|
|
|
|
|
+ celstyle = table_d[2]
|
|
|
|
|
+ row = table_d[3]
|
|
|
|
|
+ cel = table_d[4]
|
|
|
|
|
|
|
|
- celstyle = celstyle + '"'
|
|
|
|
|
-
|
|
|
|
|
table = re.sub("(\|\|(?:(?:\|\|)+)?)((?:<(?:(?:(?!>).)*)>)+)?", "</td> \
|
|
table = re.sub("(\|\|(?:(?:\|\|)+)?)((?:<(?:(?:(?!>).)*)>)+)?", "</td> \
|
|
|
<td " + cel + " " + row + " " + celstyle + ">", table, 1)
|
|
<td " + cel + " " + row + " " + celstyle + ">", table, 1)
|
|
|
else:
|
|
else:
|