X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=buildscripts%2Fmutopia-index.py;h=50e4ebbf29b5b9355694937acbf228dde47fdd1e;hb=8e5dfd23357c99c5e8312d40bdb070c87b636681;hp=388697874e1adc51d62467411da0a9a494c8cdae;hpb=f180f4eea2526fda518da202c2c3310cc796f5df;p=lilypond.git diff --git a/buildscripts/mutopia-index.py b/buildscripts/mutopia-index.py index 388697874e..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. @@ -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 ('