修改为东南天坐标系

This commit is contained in:
2026-01-20 09:49:52 +08:00
parent 9538757047
commit 333fad40ac
7201 changed files with 1030888 additions and 85410 deletions

View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2024 Steve Canny, https://github.com/scanny
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.

View File

@@ -0,0 +1,142 @@
Metadata-Version: 2.2
Name: python-oxmsg
Version: 0.0.2
Summary: Extract attachments from Outlook .msg files.
Author-email: Steve Canny <stcanny@gmail.com>
License: MIT
Project-URL: Changelog, https://github.com/scanny/python-oxmsg/blob/master/CHANGELOG.md
Project-URL: Documentation, https://scanny.github.io/python-oxmsg/
Project-URL: Homepage, https://github.com/scanny/python-oxmsg
Project-URL: Repository, https://github.com/scanny/python-oxmsg
Keywords: ms-oxmsg,outlook,email
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications :: Email
Classifier: Topic :: File Formats
Classifier: Topic :: Office/Business :: Office Suites
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: click
Requires-Dist: olefile
Requires-Dist: typing_extensions>=4.9.0
[![MIT License](https://img.shields.io/badge/License-MIT-orange.svg)](LICENSE.txt)
[![on PyPI](https://img.shields.io/badge/pypi-0.0.1-blue.svg)](https://pypi.org/project/python-oxmsg/0.0.1/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-brightgreen.svg)](https://www.python.org/downloads/)
# python-oxmsg
Parse Outlook MSG (.msg) files to extract email messages and attachments.
The target use case is extracting Outlook message text and accessing attachments. There is no support for modifying messages or creating them from scratch. In addition to message text, other message properties such as sent-date, etc. are also accessible.
## Documentation
Documentation for this project is on [GitHub Pages](https://scanny.github.io/python-oxmsg).
## Installation
```bash
pip install python-oxmsg
```
Occasionally it can be useful to install from a GitHub branch, perhaps to try out a version that has not yet been released. This command would install from the `develop` branch:
```bash
pip install git+https://github.com/scanny/python-oxmsg@develop
```
## Usage
```python
>>> from oxmsg import Message
>>> msg = Message.load("message.msg")
>>> msg.message_class
'IPM.Note'
>>> msg.attachment_count
1
>>> attachment = msg.attachments[0]
>>> attachment.attached_by_value # -- attachment bytes only available when True --
True
>>> attachment.file_name
'q1-objectives.pptx'
>>> attachment.mime_type
'application/vnd.openxmlformats-officedocument.presentationml.presentation'
>>> attachment.size
96407
>>> attachment.last_modified.isoformat()
'2023-11-18T16:08:17+00:00'
>>> with open(attachment.file_name, "wb") as f:
... f.write(attachment.file_bytes)
```
## CLI
`python-oxmsg` includes a CLI that may be useful for diagnostic purposes.
```bash
$ oxmsg
Usage: oxmsg [OPTIONS] COMMAND [ARGS]...
Utility CLI for `python-oxmsg`.
Provides the subcommands listed below, useful for exploratory or diagnostic
purposes.
Options:
--help Show this message and exit.
Commands:
dump Write a summary of the MSG file's properties to stdout.
storage Summarize low-level "directories and files" structure of MSG...
```
The `dump` sub-command displays all properties available in the message along with the
PID and PTYP information required to access those properties from a `Properties` object.
```bash
$ oxmsg dump message.msg
------------------
Message Properties
------------------
header-properties
-----------------
recipient_count: 1
distinguished-properties
------------------------
attachment_count: 0
internet_code_page: utf-8
message_class: IPM.Note
sender: from@domain.com
...
other properties
-----------------------------------------+---------------+--------------------
property-id | type | value
-----------------------------------------+---------------+--------------------
0x0017 - PidTagImportance | PtypInteger32 | 00 00 00 01
0x001A - PidTagMessageClass | PtypString8 | 'IPM.Note'
0x0036 - PidTagSensitivity | PtypInteger32 | 00 00 00 00
0x0037 - PidTagSubject | PtypString8 | 'A test message'
0x003B - PidTagSentRepresentingSearchKey | PtypBinary | 21 bytes
0x003D - PidTagSubjectPrefix | PtypString8 | ''
0x0042 - PidTagSentRepresentingName | PtypString8 | 'from@domain.com'
...
```
## Changelog
The release history including a chronicle of notable changes with each release is
recorded in [CHANGELOG.md](https://github.com/scanny/python-oxmsg/blob/master/CHANGELOG.md).

View File

@@ -0,0 +1,35 @@
../../../bin/oxmsg,sha256=SmFBanWk6-rY_7XKyvM7rNlSBzRKomm6q8XMJzka8Y4,229
oxmsg/__init__.py,sha256=zUoNkhN50X0nqwqOLEwVShVotpVKZVZTBEy7N3K383M,106
oxmsg/__pycache__/__init__.cpython-313.pyc,,
oxmsg/__pycache__/attachment.cpython-313.pyc,,
oxmsg/__pycache__/cli.cpython-313.pyc,,
oxmsg/__pycache__/message.cpython-313.pyc,,
oxmsg/__pycache__/properties.cpython-313.pyc,,
oxmsg/__pycache__/recipient.cpython-313.pyc,,
oxmsg/__pycache__/storage.cpython-313.pyc,,
oxmsg/__pycache__/util.cpython-313.pyc,,
oxmsg/attachment.py,sha256=fP2KoYRDKjSRqLbHlhpjndRstZnpQXWipbj2jLOo3uo,2674
oxmsg/cli.py,sha256=uVrLjKVq2Oajt6jhEE_jRRe_6q4oconoiKQM33GJMlY,6369
oxmsg/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
oxmsg/domain/__pycache__/__init__.cpython-313.pyc,,
oxmsg/domain/__pycache__/constants.cpython-313.pyc,,
oxmsg/domain/__pycache__/encodings.cpython-313.pyc,,
oxmsg/domain/__pycache__/model.cpython-313.pyc,,
oxmsg/domain/__pycache__/reference.cpython-313.pyc,,
oxmsg/domain/constants.py,sha256=mDpl77ftOoveJrfi8T1q6bcJ5pP8m687juMlR4xvIdU,7118
oxmsg/domain/encodings.py,sha256=Rxz1ph2TtD1yFEGbxT675UWn5dDPRe1wwrV9gZvZcSA,10000
oxmsg/domain/model.py,sha256=6aupDULf3sdW2oELQj1TygGkFbaVWdfBByTFd7N5uFw,5398
oxmsg/domain/reference.py,sha256=SXlGHW0kQuU_b6k_H3s2qcVRSpaHFQiDwenGmVlZW1I,28783
oxmsg/message.py,sha256=Q4G8K-71_GfaMhf3X2CRofS6_OC-mNzk6czq5rj2Ogg,6925
oxmsg/properties.py,sha256=-I8C97MFTpfWpWvqA1tAOEOrGm5r0gJaWgxldGJi0TI,15735
oxmsg/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
oxmsg/recipient.py,sha256=FMXHBDm8mOPElGZgmTh0ejqWlWW5FnN4_9101cTxUjU,1474
oxmsg/storage.py,sha256=SErzFN3Kn94RHvgKi2c4YsFoINzW3K8yEwdvQj14mc8,4341
oxmsg/util.py,sha256=1rCfMIJO5irIoE54vT0FgD-gC1bx4yN3xYdC4USnX6c,5609
python_oxmsg-0.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
python_oxmsg-0.0.2.dist-info/LICENSE.txt,sha256=wkWK_FJ-l4qPEutLV3bKt0-u3pjgnFdoTVRzXhQ54Iw,1104
python_oxmsg-0.0.2.dist-info/METADATA,sha256=eOmEV6oYaP_GvH3adAWhty_VPL0x-nv_epkQpEW-sbM,4961
python_oxmsg-0.0.2.dist-info/RECORD,,
python_oxmsg-0.0.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
python_oxmsg-0.0.2.dist-info/entry_points.txt,sha256=NWdSx7b8frTzyFbgwex1ofrY13xNROcL1nuDgWsCzB8,42
python_oxmsg-0.0.2.dist-info/top_level.txt,sha256=EuQR_ohX7cFxqUixHqhdE2-yGzArCIw1Wyc5i7DtLCw,6

View File

@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: setuptools (75.8.0)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,2 @@
[console_scripts]
oxmsg = oxmsg.cli:oxmsg