X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=buildscripts%2Fmutopia-index.py;h=50e4ebbf29b5b9355694937acbf228dde47fdd1e;hb=43f9d1a1edfa1a15600f7b8f52d32f7c10b591c6;hp=c73481aabad094643f2451c76a230d1efd92aa35;hpb=af770f3440264c18ce01525dce1aa76b86ace0d5;p=lilypond.git diff --git a/buildscripts/mutopia-index.py b/buildscripts/mutopia-index.py index c73481aaba..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 ('