Skip to content

Commit b620491

Browse files
committed
Added a warning about editing the files
1 parent 7fc1be3 commit b620491

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/extending_polyfile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def parse_example(file_stream, match):
143143

144144
### Kaitai Struct Parsers
145145

146-
The majority of PolyFile’s parsers are automatically generated from the [Kaitai Struct format gallery](https://formats.kaitai.io/). They are compiled at build-time (in [`setup.py`](../setup.py)) to produce the pure-Python parsers in [`polyfile/kaitai/parsers/*.py`](../polyfile/kaitai/parsers/).
146+
The majority of PolyFile’s parsers are automatically generated from the [Kaitai Struct format gallery](https://formats.kaitai.io/). They are compiled at build-time (in [`setup.py`](../setup.py)) to produce the pure-Python parsers in [`polyfile/kaitai/parsers/*.py`](../polyfile/kaitai/parsers/). These parsers should not be edited since they are automatically generated and will be overwritten the next time PolyFile is rebuilt.
147147

148148
Unfortunately, the Kaitai Struct parsers are not currently tagged based upon the MIME type of the files they parse. Therefore, PolyFile maintains a manual mapping from MIME types to Kaitai parsers. This mapping lives in [`polyfile.kaitaimatcher.KAITAI_MIME_MAPPING`](../polyfile/kaitaimatcher.py):
149149
```python

polyfile/kaitai/parsers/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Auto-Generated Parsers
2+
3+
The parsers in this directory are automatically generated from the [Kaitai Struct format gallery](https://formats.kaitai.io/). They are rebuilt every time PolyFile is installed or packaged, and therefore **THESE FILES SHOULD NOT BE EDITED**.

0 commit comments

Comments
 (0)