From 88fae1fae48023a9518a673082d95ebef90b2462 Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Fri, 5 Sep 2025 08:47:28 +0200 Subject: [PATCH] add acknowledgement for mimeData.json --- README.md | 4 ++++ THIRD-PARTY-NOTICES | 17 +++++++++++++++++ docs/index.md | 4 ++++ src/mime_enum/mimetype.py | 2 ++ src/mime_enum/scripts/generate_mimetypes.py | 2 ++ 5 files changed, 29 insertions(+) create mode 100644 THIRD-PARTY-NOTICES diff --git a/README.md b/README.md index 3014232..11f10cc 100644 --- a/README.md +++ b/README.md @@ -103,3 +103,7 @@ mime_type = from_path("/path/to/document.pdf") # MimeType.APPLICATION_PDF For detailed usage examples, see the [Usage Guide](docs/usage.md). For complete API documentation, see the [API Reference](docs/api.md). + +## Acknowledgments + +This project uses the `mimeData.json` file from [mimetype-io](https://github.com/patrickmccallum/mimetype-io) by Patrick McCallum. diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES new file mode 100644 index 0000000..3d0e9f0 --- /dev/null +++ b/THIRD-PARTY-NOTICES @@ -0,0 +1,17 @@ +mime-enum Third-Party Notices +================================ + +This project incorporates components from third-party projects. The original copyright notices and licenses under which the mime-enum library received such components are set forth below. + +mimetype-io +----------- +Source: https://github.com/patrickmccallum/mimetype-io +License: MIT License + +Copyright (c) 2023 Patrick McCallum + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs/index.md b/docs/index.md index 60d5dbc..95086ba 100644 --- a/docs/index.md +++ b/docs/index.md @@ -103,3 +103,7 @@ mime_type = from_path("/path/to/document.pdf") # MimeType.APPLICATION_PDF For detailed usage examples, see the [Usage Guide](usage.md). For complete API documentation, see the [API Reference](api.md). + +## Acknowledgments + +This project uses the `mimeData.json` file from [mimetype-io](https://github.com/patrickmccallum/mimetype-io) by Patrick McCallum. diff --git a/src/mime_enum/mimetype.py b/src/mime_enum/mimetype.py index a000d5f..574f3dd 100644 --- a/src/mime_enum/mimetype.py +++ b/src/mime_enum/mimetype.py @@ -1,4 +1,6 @@ # Auto-generated by scripts/generate_mimetypes.py — DO NOT EDIT. +# Data source: mimetype-io (https://github.com/patrickmccallum/mimetype-io) + from __future__ import annotations from enum import StrEnum diff --git a/src/mime_enum/scripts/generate_mimetypes.py b/src/mime_enum/scripts/generate_mimetypes.py index 480c9cc..1cd277f 100644 --- a/src/mime_enum/scripts/generate_mimetypes.py +++ b/src/mime_enum/scripts/generate_mimetypes.py @@ -102,6 +102,8 @@ def py_tuple_str(items: list[str]) -> str: lines = [] lines.append("# Auto-generated by scripts/generate_mimetypes.py — DO NOT EDIT.") +lines.append("# Data source: mimetype-io (https://github.com/patrickmccallum/mimetype-io)") +lines.append("") lines.append("from __future__ import annotations") lines.append("from enum import StrEnum") lines.append("")