DO Hurr
This commit is contained in:
parent
d24f316a28
commit
585bef4d26
38 changed files with 18316 additions and 8 deletions
66
xml/event/dummy_layout_promotion.py
Normal file
66
xml/event/dummy_layout_promotion.py
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
print( "dir= " + directory_to_process + "/page_catalog_group_recommend.xml");
|
||||
file_xml = open(directory_to_process + "/page_catalog_group_recommend.xml", 'r')
|
||||
file_content_main = file_xml.read()
|
||||
#print(file_xml.read())
|
||||
# ; include-file=dummy_layout.inc
|
||||
file_inc = open(directory_to_process + "/dummy_layout.inc", 'r')
|
||||
file_inc_content = file_inc.read()
|
||||
file_inc2 = open(directory_to_process + "/big_logo.inc", 'r')
|
||||
file_inc2_content = file_inc2.read()
|
||||
#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_xml.close()
|
||||
|
||||
|
||||
file_inc2 = open(directory_to_process + "/event/big_logo_back_to_school.inc", 'r')
|
||||
file_inc2_content = file_inc2.read()
|
||||
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 = open(directory_to_process + "/event/page_recommend_backToSchool.xml", 'w')
|
||||
file_xml3.write( content_data)
|
||||
file_xml3.close()
|
||||
|
||||
#############################################
|
||||
file_inc2 = open(directory_to_process + "/event/big_logo_oreo_buy2_save_movel.inc", 'r')
|
||||
file_inc2_content = file_inc2.read()
|
||||
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 = open(directory_to_process + "/event/page_recommend_oreo_buy2_save_more.xml", 'w')
|
||||
file_xml3.write( content_data)
|
||||
file_xml3.close()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue