Mercurial > dottes
comparison abctemplate.py @ 598:ed823ea54c83
Add Dottes History to notes. Currently appears after notes with a gap.
This is intended for longer exposition about a tune.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Wed, 02 Nov 2016 18:36:31 +0000 |
parents | 60749c792cde |
children | 7da70e8900ab |
comparison
equal
deleted
inserted
replaced
597:60da844ec261 | 598:ed823ea54c83 |
---|---|
59 fname = input_path.stem | 59 fname = input_path.stem |
60 fdir = input_path.parent | 60 fdir = input_path.parent |
61 | 61 |
62 vars = dict() | 62 vars = dict() |
63 vars["notesvisibility"] = "no" | 63 vars["notesvisibility"] = "no" |
64 vars["historyvisibility"] = "no" | |
64 | 65 |
65 vars["name"] = fname | 66 vars["name"] = fname |
66 vars["title"] = getFieldDisplayText(lines, fdir, "T", latex=args.latex) | 67 vars["title"] = getFieldDisplayText(lines, fdir, "T", latex=args.latex) |
67 vars["subtitle"] = getFieldDisplayText(lines, fdir, "T", n=2, latex=args.latex) | 68 vars["subtitle"] = getFieldDisplayText(lines, fdir, "T", n=2, latex=args.latex) |
68 vars["composer"] = getFieldDisplayText(lines, fdir, "C", latex=args.latex) | 69 vars["composer"] = getFieldDisplayText(lines, fdir, "C", latex=args.latex) |
69 vars["key"] = getFieldDisplayText(lines, fdir, "K", latex=args.latex) | 70 vars["key"] = getFieldDisplayText(lines, fdir, "K", latex=args.latex) |
70 vars["notes"] = getFieldDisplayText(lines, fdir, "N", starts="Dottes:", latex=args.latex) | 71 vars["notes"] = getFieldDisplayText(lines, fdir, "N", starts="Dottes:", latex=args.latex) |
71 if vars["notes"]: | 72 if vars["notes"]: |
72 vars["notesvisibility"] = "yes" | 73 vars["notesvisibility"] = "yes" |
74 vars["history"] = getFieldDisplayText(lines, fdir, "H", starts="Dottes:", latex=args.latex) | |
75 if vars["history"]: | |
76 vars["historyvisibility"] = "yes" | |
73 | 77 |
74 for val in args.values: | 78 for val in args.values: |
75 keyval = val.partition("=") | 79 keyval = val.partition("=") |
76 vars[keyval[0]] = keyval[2] | 80 vars[keyval[0]] = keyval[2] |
77 | 81 |