コード例 #1
0
ファイル: www_post.py プロジェクト: sightreader/lilypond
</head>
<body>Redirecting to the documentation index...</body>
</html>
''' % sys.argv[0],
    os.path.join(outdir, 'VERSION'):
    package_version + '\n',
}

for f, contents in list(static_files.items()):
    open(f, 'w').write(contents)

sys.stderr.write("Mirroring...\n")
dirs, symlinks, files = mirrortree.walk_tree (
    tree_roots = doc_dirs,
    process_dirs = outdir,
    exclude_dirs = '(^|/)((' + \
        r'po|xref-maps|out|out-test(-baseline)?|out-cov|.*?[.]t2d|\w*?-root)|^Documentation/(' + \
        '|'.join ([l.code for l in langdefs.LANGUAGES]) + '))(/|$)',
    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)')
# extra files: info and tex output from lilypond-book regtests
extra_files = mirrortree.walk_tree(
    tree_roots=['input/regression/lilypond-book'],
    process_dirs=outdir,
    exclude_dirs=r'(^|/)(out|out-test(-baseline)?)(/|$)',
    find_files=r'.+\.(info|tex)$',
    exclude_files=r'lily-[0-9a-f]+.*\.tex')[2]
files.extend(extra_files)

# actual mirrorring stuff
html_files = []
hardlinked_files = []
コード例 #2
0
ファイル: www_post.py プロジェクト: avm/lilypond
</head>
<body>Redirecting to the documentation index...</body>
</html>
''' % sys.argv[0],
    os.path.join (outdir, 'VERSION'):
        package_version + '\n',
    }

for f, contents in static_files.items ():
    open (f, 'w').write (contents)

sys.stderr.write ("Mirroring...\n")
dirs, symlinks, files = mirrortree.walk_tree (
    tree_roots = doc_dirs,
    process_dirs = outdir,
    exclude_dirs = '(^|/)((' + \
        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|jpe?g|txt|i?ly|signature|css|zip|js|..\.idx|php)$|VERSION',
    exclude_files = r'lily-[0-9a-f]+.*\.(pdf|txt)')
# extra files: info and tex output from lilypond-book regtests
extra_files = mirrortree.walk_tree (
    tree_roots = ['input/regression/lilypond-book'],
    process_dirs = outdir,
    exclude_dirs = r'(^|/)(out|out-test)(/|$)',
    find_files = r'.+\.(info|tex)$',
    exclude_files = r'lily-[0-9a-f]+.*\.tex')[2]
files.extend(extra_files)

# actual mirrorring stuff
html_files = []
hardlinked_files = []
コード例 #3
0
ファイル: www_post.py プロジェクト: angeleyes/lilypond
static_files = {
    os.path.join (outdir, 'index.html'):
        '''<META HTTP-EQUIV="refresh" content="0;URL=Documentation/web/index.html">
<html><body>Redirecting to the documentation index...</body></html>\n''',
    os.path.join (outdir, 'VERSION'):
        package_version + '\n',
    }

for f, contents in static_files.items ():
    open (f, 'w').write (contents)

sys.stderr.write ("Mirroring...\n")
dirs, symlinks, files = mirrortree.walk_tree (
    tree_roots = doc_dirs,
    process_dirs = outdir,
    exclude_dirs = '(^|/)((' + \
        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|jpe?g|txt|i?ly|signature|css|zip)$|VERSION',
    exclude_files = r'lily-[0-9a-f]+.*\.(pdf|txt)')

# actual mirrorring stuff
html_files = []
hardlinked_files = []
for f in files:
    if f.endswith ('.html'):
        html_files.append (f)
    else:
        hardlinked_files.append (f)
dirs = [re.sub ('/' + outdir, '', d) for d in dirs]
while outdir in dirs:
    dirs.remove (outdir)