- # quesitonable
- if (link.endswith(".html")):
- langlink = addLangExt(link[:-5], lang, "html")
- line = line.replace(link, langlink)
- if (link.endswith(".pdf")):
- langlink = addLangExt(link[:-4], lang, "pdf")
- line = line.replace(link, langlink)
+ # questionable
+ if (not link.startswith("../doc/")):
+ if (link.endswith(".html")):
+ langlink = addLangExt(link[:-5], lang, "html")
+ line = line.replace(link, langlink)
+ if (link.endswith(".pdf")):
+ langlink = addLangExt(link[:-4], lang, "pdf")
+ line = line.replace(link, langlink)
+ ### add google tracker header
+ if (line.find("</head>") >= 0):
+ outfile.write("""<!-- Google tracking !-->
+<script src="http://www.google-analytics.com/urchin.js"
+type="text/javascript">
+</script>
+<script type="text/javascript">
+_uacct = "UA-68969-1";
+urchinTracker();
+</script>
+""");
+ #### add google tracker goals
+ if (line.find("href=\"http://download.linuxaudio.org") >= 0):
+ # TODO: more ugly hardcoding to make releases hard. :(
+ if (line.find('2.16') >= 0):
+ line = line.replace('a href=', 'a onClick=\"javascript:urchinTracker(\'/download/v2.16\');\" href=')
+ elif (line.find('2.17') >= 0):
+ line = line.replace('a href=', 'a onClick=\"javascript:urchinTracker(\'/download/v2.17\');\" href=')