From: Graham Percival Date: Fri, 5 Mar 2010 19:28:47 +0000 (+0000) Subject: Web build: translation and pdf links. X-Git-Tag: release/2.13.16-1~52^2~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=28d94949600ba846608ce541928235b34aeb1304;p=lilypond.git Web build: translation and pdf links. --- diff --git a/scripts/build/website_post.py b/scripts/build/website_post.py index 4475b467fc..1f573910d4 100644 --- a/scripts/build/website_post.py +++ b/scripts/build/website_post.py @@ -46,14 +46,15 @@ for file in html_files: langs = list(langs_set) langs.sort() -def makeFooter(currentLang): +def makeFooter(currentLang, currentPage): text = "

\n" text += lang_other_langs[currentLang] for i in range(len(langs)): l = langs[i] if (l == currentLang): continue - text += "" @@ -89,7 +90,8 @@ for file in html_files: # ick os.remove(file) - lang_footer = makeFooter(lang) + # ick + lang_footer = makeFooter(lang, out_filename.split('.')[0]) outfile = open( os.path.join(outdir, out_filename), 'w') for line in lines: @@ -103,6 +105,16 @@ for file in html_files: text += "." + lang text += ".html" line = line.replace(".html", text) + if ((line.find("href") >= 0) and + (line.find("http")==-1) and + (line.find("pdf") >= 0)): + text = "" + if (not (lang=="")): + text += "." + lang + text += ".pdf" + line = line.replace(".pdf", text) + + if (line.find("") >= 0): outfile.write( lang_footer ) outfile.write(line)