X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=buildscripts%2Fmutopia-index.py;h=50e4ebbf29b5b9355694937acbf228dde47fdd1e;hb=d664f5a7153ec2b1a1c4c9fba2d2174bf3140695;hp=82f5bf007fb4709cd6c07aabf6caef1dcb53dba6;hpb=e63dac8853909a52de02b480bcf3f1718433d09f;p=lilypond.git diff --git a/buildscripts/mutopia-index.py b/buildscripts/mutopia-index.py index 82f5bf007f..50e4ebbf29 100644 --- a/buildscripts/mutopia-index.py +++ b/buildscripts/mutopia-index.py @@ -1,10 +1,9 @@ -#!@PYTHON@ +#!/usr/bin/env python # mutopia-index.py import fnmatch import getopt import os -import os import re import stat import sys @@ -25,7 +24,7 @@ headertext= r"""
You're looking at a page with some LilyPond samples. These files +
You are looking at a page with some LilyPond samples. These files are also included in the distribution. The output is completely generated from the source file, without any further touch up. @@ -36,7 +35,7 @@ For a good impression of the quality print out the PDF file. """ headertext_nopics= r""" -
Nothing to be seen here, move along. +
No examples were found in this directory. """ # @@ -113,15 +112,9 @@ hr { border:0; height:1; color: #000000; background-color: #000000; }\n ext = ext2 + ext header = read_lilypond_header (ex) - def read_dict (s, default, h = header): - try: - ret = h[s] - except KeyError: - ret = default - return ret - head = read_dict ('title', os.path.basename (base)) - composer = read_dict ('composer', '') - desc = read_dict ('description', '') + head = header.get ('title', os.path.basename (base)) + composer = header.get ('composer', '') + desc = header.get ('description', '') list.write ('