___ _ _ _ |_ | | | ( ) | | | | __ _ _ __ ___| | _|/ ___ __ _____| |__ | |/ _` | '__/ _ \ |/ / / __| \ \ /\ / / _ \ '_ \ /\__/ / (_| | | | __/ < \__ \ \ V V / __/ |_) | \____/ \__,_|_| \___|_|\_\ |___/ \_/\_/ \___|_.__/ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
MAKEWEB.PY
--
--
This is the source of my python script, which i use to create additional pages for this webpage.
It simplifies the process of making a page from my template and automatically adds a hyperlink to the main page.
def replace_line(file_name, line_num, text): lines = open(file_name, 'r') lines = lines.readlines() lines.insert( 30, "\n") lines[line_num] = text out = open(file_name, 'w') out.writelines(lines) out.close() def makemenuodkaz(odkaz, tag, name, iswww, opt): www = "" optional = "" if opt == "1": optional = 'target="_blank" ' if iswww == "1": www = "http://" elif iswww == "2": www = "https://" menufile = open("index.html","r+") ref = '
--
BY JAREK
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------