Skip to content

Commit

Permalink
supresses warnings about multiple Fingering_text
Browse files Browse the repository at this point in the history
  • Loading branch information
johentsch committed Jun 13, 2023
1 parent 8130ce6 commit 14c9376
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Version 1.2.10
* refrains from calling ``logging.basicConfig()``
* unknown TSV types now default to ``labels``
* ``conti`` now recognized as abbreviation for "continuation idea"
* suppresses warnings about multiple "Fingering_text" values


Version 1.2.9
Expand Down
7 changes: 5 additions & 2 deletions src/ms3/bs4_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,10 @@ def parse_measures(self):
for text_tag in event_node.find_all('text'):
parent_name = text_tag.parent.name
text = text_tag2str(text_tag)
if parent_name == 'Lyrics':
if parent_name == 'Fingering':
# fingerings occur within <Note> tags, if they are to be extracted, they should go into the notes table
continue
elif parent_name == 'Lyrics':
lyrics_tag = text_tag.parent
no_tag = lyrics_tag.find('no')
if no_tag is None:
Expand All @@ -376,7 +379,7 @@ def parse_measures(self):
else:
column_name = parent_name + '_text'
if column_name in event:
self.logger.warning(f"Event already contained a '{column_name}': {event[column_name]}")
self.logger.warning(f"MC {mc}@{current_position}, staff {staff_id}, {event_name!r} already contained a '{column_name}': {event[column_name]}")
else:
event[column_name] = text
event_list.append(event)
Expand Down

0 comments on commit 14c9376

Please sign in to comment.