Skip to content

Commit 15788a5

Browse files
feat: add HTML file types to FileType enumUpdate file_types.py
Add support for HTML file extensions to the FileType enum: - Add html file type for standard HTML files - Add htm file type for legacy HTML files - Add class documentation for the FileType enum This enables Harmony to recognize and process both .html and .htm file extensions when using load_instruments_from_local_file function.
1 parent bf960d7 commit 15788a5

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
11
'''
22
MIT License
3-
43
Copyright (c) 2023 Ulster University (https://www.ulster.ac.uk).
54
Project: Harmony (https://harmonydata.ac.uk)
65
Maintainer: Thomas Wood (https://fastdatascience.com)
7-
86
Permission is hereby granted, free of charge, to any person obtaining a copy
97
of this software and associated documentation files (the "Software"), to deal
108
in the Software without restriction, including without limitation the rights
119
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1210
copies of the Software, and to permit persons to whom the Software is
1311
furnished to do so, subject to the following conditions:
14-
1512
The above copyright notice and this permission notice shall be included in all
1613
copies or substantial portions of the Software.
17-
1814
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1915
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2016
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2117
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2218
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2319
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2420
SOFTWARE.
25-
2621
'''
2722

2823
from enum import Enum
2924

3025

3126
class FileType(str, Enum):
27+
"""Enumeration of supported file types for Harmony parsing."""
3228
pdf: str = 'pdf'
3329
xlsx: str = 'xlsx'
3430
txt: str = 'txt'
3531
csv: str = 'csv'
3632
docx: str = 'docx'
33+
html: str = 'html'
34+
htm: str = 'htm'

0 commit comments

Comments
 (0)