Mercurial > dottes
comparison abcfield.py @ 701:972d3dab1142
Nerys next: L'Inconnu de Limoise.
No chords. Also fix up title field display to not put a space between
items if 'The' item isn't all alphanumeric. So , L' works.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Sun, 24 Sep 2017 23:12:03 +0100 |
parents | 82e818c41e81 |
children | f620323ff96d |
comparison
equal
deleted
inserted
replaced
697:de5bbf98b1c5 | 701:972d3dab1142 |
---|---|
135 def convertTitleToDisplay(t): | 135 def convertTitleToDisplay(t): |
136 p = t.rpartition(',') | 136 p = t.rpartition(',') |
137 if p[1] == "": | 137 if p[1] == "": |
138 return t | 138 return t |
139 else: | 139 else: |
140 return p[2].strip() + " " + p[0].strip() | 140 first = p[2].strip() |
141 second = p[0].strip() | |
142 return (first + " " if first.isalnum() else first) + second | |
141 | 143 |
142 # Convert Key field from ABC to display, so G#dor->G# Dorian. | 144 # Convert Key field from ABC to display, so G#dor->G# Dorian. |
143 def convertKeyToDisplay(t): | 145 def convertKeyToDisplay(t): |
144 letter = t[0].upper() | 146 letter = t[0].upper() |
145 accidental = "" | 147 accidental = "" |