X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fbuild%2Fwww_post.py;fp=scripts%2Fbuild%2Fwww_post.py;h=17af63109edf3d3728ed44c5a49a1e77452cf21f;hb=e90f0536f9be39ada0bef0aeb0d275dec3b2fb5b;hp=c568734c1b8e16a63f5065de4a57a3acd86d09d9;hpb=a8c9e8a7ca320ab0df5fd32e717fd62cd7635ce6;p=lilypond.git diff --git a/scripts/build/www_post.py b/scripts/build/www_post.py index c568734c1b..17af63109e 100644 --- a/scripts/build/www_post.py +++ b/scripts/build/www_post.py @@ -25,24 +25,12 @@ target_pattern = os.path.join (outdir, '%s-root') # from HTML manuals/snippets page static_files = { os.path.join (outdir, 'index.html'): - ''' + ''' Redirecting to the documentation index...\n''', os.path.join (outdir, 'VERSION'): package_version + '\n', - os.path.join ('input', 'lsr', outdir, 'index.html'): - ''' -Redirecting to the documentation index...\n''' } -for l in langdefs.LANGUAGES: - static_files[os.path.join ( - 'Documentation', - 'user', - outdir, - l.file_name ('index', '.html'))] = \ - '\nRedirecting to the documentation index...\n' - for f, contents in static_files.items (): open (f, 'w').write (contents) @@ -51,9 +39,9 @@ dirs, symlinks, files = mirrortree.walk_tree ( tree_roots = doc_dirs, process_dirs = outdir, exclude_dirs = '(^|/)((' + \ - r'po|out|out-test|out-cov|.*?[.]t2d|\w*?-root)|^Documentation/(' + \ + r'po|xref-maps|out|out-test|out-cov|.*?[.]t2d|\w*?-root)|^Documentation/(' + \ '|'.join ([l.code for l in langdefs.LANGUAGES]) + '))(/|$)', - find_files = r'.*?\.(?:midi|html|pdf|png|txt|i?ly|signature|css|zip)$|VERSION', + find_files = r'.*?\.(?:midi|html|pdf|png|jpe?g|txt|i?ly|signature|css|zip|js|..\.idx|php)$|VERSION', exclude_files = r'lily-[0-9a-f]+.*\.(pdf|txt)') # actual mirrorring stuff @@ -61,7 +49,8 @@ html_files = [] hardlinked_files = [] for f in files: if f.endswith ('.html'): - html_files.append (f) + if not 'UNTRANSLATED NODE: IGNORE ME' in open (f).read (): + html_files.append (f) else: hardlinked_files.append (f) dirs = [re.sub ('/' + outdir, '', d) for d in dirs] @@ -85,9 +74,6 @@ for t in targets: if not os.path.exists (dest): os.symlink (p, dest) - ## ad-hoc renaming to make xrefs between PDFs work - os.rename (os.path.join (out_root, 'input/lsr/lilypond-snippets.pdf'), - os.path.join (out_root, 'Documentation/user/lilypond-snippets.pdf')) # need this for content negotiation with documentation index if 'online' in targets: