mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-08-16 13:09:53 +02:00
🧹 MODS: Remove extra attributes in mods:titleInfo
This commit is contained in:
parent
2f00dfcce0
commit
231f53eb7a
2 changed files with 9 additions and 0 deletions
|
@ -194,6 +194,14 @@ class TagGroup:
|
|||
warnings.warn("Added type='text')")
|
||||
return self
|
||||
|
||||
def remove_attributes(self, attribs) -> TagGroup:
|
||||
if not isinstance(attribs, Sequence):
|
||||
attribs = [attribs]
|
||||
for e in self.group:
|
||||
for a in attribs:
|
||||
e.attrib.pop(a, None)
|
||||
return self
|
||||
|
||||
def merge_sub_tags_to_set(self) -> dict:
|
||||
from .mods4pandas import mods_to_dict
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue