Add just
This commit is contained in:
parent
6cb54114d6
commit
3f60f3d5fd
22 changed files with 889 additions and 670 deletions
|
|
@ -15,7 +15,59 @@ else:
|
|||
|
||||
file_inc2 = open(directory_to_process + "/event/promotion_template1.inc", 'r')
|
||||
file_inc2_content = file_inc2.read()
|
||||
file_inc_img = open(directory_to_process + "../image/event/image_template", 'r')
|
||||
file_inc_img = open(directory_to_process + "../image/event/image_template1", 'r')
|
||||
file_inc2_img_content = file_inc_img.read()
|
||||
|
||||
# replace key.
|
||||
|
||||
sp_key = file_inc2_img_content.split("\n")
|
||||
print("sp_key = " + str(len( sp_key)))
|
||||
for sp_line in sp_key:
|
||||
sp_line = sp_line.strip()
|
||||
key_val = sp_line.split("=")
|
||||
if len( key_val) == 2:
|
||||
print("k = " + key_val[0] + " val=" + key_val[1])
|
||||
file_inc2_content = file_inc2_content.replace( "###" + key_val[0], '"' + key_val[1].strip() + '"')
|
||||
|
||||
|
||||
file_inc_event_click = open(directory_to_process + "/event/promotion_onclick.inc", 'r')
|
||||
file_inc_event_click_content = file_inc_event_click.read()
|
||||
|
||||
file_inc2_content = file_inc2_content.replace("###EventOnClick", file_inc_event_click_content)
|
||||
|
||||
|
||||
print(file_inc2_content)
|
||||
|
||||
#print( file_inc_content)
|
||||
content_data_was_repack = file_content_main.replace(";dummy_layout.inc", file_inc_content)
|
||||
content_data = content_data_was_repack.replace(";BigLogoLayout", file_inc2_content)
|
||||
|
||||
begin_text = content_data.index(";TAGESP")
|
||||
end_text = content_data.index(";TAGESP", begin_text + 7)
|
||||
#print("sub text = " + str(begin_text) + " end = " + str(end_text))
|
||||
tmp1 = content_data[: begin_text - 7]
|
||||
|
||||
tmp2 = content_data[ end_text:-1]
|
||||
#print("tmp1=" + tmp1)
|
||||
#print("tmp2=" + tmp2)
|
||||
|
||||
content_data = tmp1 + tmp2
|
||||
|
||||
file_xml3_out = open(directory_to_process + "/event/out_put_file.txt", 'r')
|
||||
file_xml3_out_content = file_xml3_out.read()
|
||||
file_xml3_out_content = file_xml3_out_content.strip()
|
||||
file_xml3_out_content = file_xml3_out_content.replace("\r", "")
|
||||
file_xml3_out_content = file_xml3_out_content.replace("\n", "")
|
||||
|
||||
file_xml3 = open(directory_to_process + file_xml3_out_content, 'w')
|
||||
file_xml3.write( content_data)
|
||||
file_xml3.close()
|
||||
|
||||
if "template2" in param:
|
||||
|
||||
file_inc2 = open(directory_to_process + "/event/promotion_template1.inc", 'r')
|
||||
file_inc2_content = file_inc2.read()
|
||||
file_inc_img = open(directory_to_process + "../image/event/image_template1", 'r')
|
||||
file_inc2_img_content = file_inc_img.read()
|
||||
|
||||
# replace key.
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Open "ROOT/taobin_project/xml/page_catalog_group_pepsi_pro.xml"
|
||||
Loading…
Add table
Add a link
Reference in a new issue