From f2274c841b7286b7249931f5e3cf4b95022e9d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=B3=E5=87=BA=E7=BD=91=E5=90=8D=E5=95=A6?= Date: Sat, 31 Oct 2026 18:52:33 +0800 Subject: [PATCH 1/6] =?UTF-8?q?chore(license):=20pyproject=20=E6=A0=87?= =?UTF-8?q?=E6=B3=A8=20MIT=20AND=20MPL-2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0c7faf6..65d10e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ version = "0.1.0" description = "Print Japan Post ClickPost labels on a DeTong DP-series label printer" readme = "README.md" requires-python = ">=3.10" -license = { text = "MIT" } +license = { text = "MIT AND MPL-2.0" } authors = [{ name = "clickpost-printer contributors" }] keywords = ["clickpost", "japan-post", "label-printer", "thermal-printer", "ble", "web-bluetooth"] classifiers = [ @@ -16,6 +16,7 @@ classifiers = [ "Environment :: Console", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", From 1e2ee510158d339a0e5bfe4b9683de6fee779f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=B3=E5=87=BA=E7=BD=91=E5=90=8D=E5=95=A6?= Date: Sat, 31 Oct 2026 18:52:44 +0800 Subject: [PATCH 2/6] =?UTF-8?q?chore(license):=20web=20=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E5=99=A8=E8=A1=A5=20MPL=20=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/protocol.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/src/protocol.ts b/web/src/protocol.ts index cc9ee7e..4199b5c 100644 --- a/web/src/protocol.ts +++ b/web/src/protocol.ts @@ -1,3 +1,11 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. +// +// Derived from dz-print (MPL-2.0) +// via src/dzpost/protocol.py. Only this file is under MPL-2.0; the rest of +// this project stays MIT. + /** * DeTong DP-series label printer command stream. * From a25e82a51f2673156cfbb45e8c5117f8428dfda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=B3=E5=87=BA=E7=BD=91=E5=90=8D=E5=95=A6?= Date: Sat, 31 Oct 2026 18:53:03 +0800 Subject: [PATCH 3/6] =?UTF-8?q?chore(license):=20=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E6=B5=81=E7=BC=96=E7=A0=81=E5=99=A8=E8=A1=A5=20MPL=20=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dzpost/protocol.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/dzpost/protocol.py b/src/dzpost/protocol.py index f709f3e..b4dd0e6 100644 --- a/src/dzpost/protocol.py +++ b/src/dzpost/protocol.py @@ -1,8 +1,16 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. +# +# Derived from dz-print (MPL-2.0), +# notably src/image_proc/cmd_parser.rs and src/command/. Only this file is +# under MPL-2.0; the rest of this project stays MIT. + """DeTong DP-series label printer command stream. Everything here was reverse-engineered against a DeTong DP305P (``3533:5C32``, 300 dpi, 960-dot head) and is byte-compatible with the -reference implementation in ``dz-print`` (MIT). +reference implementation in ``dz-print`` (MPL-2.0). Two layers of framing exist on the wire: From ff855908b6f6c06f99c193e34a573065428efa71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=B3=E5=87=BA=E7=BD=91=E5=90=8D=E5=95=A6?= Date: Sat, 31 Oct 2026 18:53:26 +0800 Subject: [PATCH 4/6] =?UTF-8?q?docs:=20=E4=B8=AD=E6=96=87=20README=20?= =?UTF-8?q?=E5=86=99=E6=98=8E=E6=B7=B7=E5=90=88=E8=AE=B8=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.zh-CN.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 100755 => 100644 README.zh-CN.md diff --git a/README.zh-CN.md b/README.zh-CN.md old mode 100755 new mode 100644 index 73ddbbd..cb37ddf --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -114,4 +114,9 @@ CI(GitHub Actions)会跑两边的测试和构建。 ## 许可 -MIT。命令流编码参考了 [dz-print](https://github.com/sb-child/dz-print)(MIT)。 +本项目整体为 **MIT**。但命令流编码器(`src/dzpost/protocol.py` / `web/src/protocol.ts`) +是 [dz-print](https://github.com/sb-child/dz-print)(**MPL-2.0**)的衍生作品, +这两个文件单独适用 **MPL-2.0**(文件级 copyleft)。 + +- `LICENSE` — MIT(上述两个文件之外) +- MPL-2.0 全文 — From d5add9079ca673f7419cfcb4d50cb59e02005b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=B3=E5=87=BA=E7=BD=91=E5=90=8D=E5=95=A6?= Date: Sat, 31 Oct 2026 18:53:39 +0800 Subject: [PATCH 5/6] =?UTF-8?q?docs:=20=E5=8D=8F=E8=AE=AE=E9=80=9F?= =?UTF-8?q?=E6=9F=A5=E9=87=8C=E4=BF=AE=E6=AD=A3=20dz-print=20=E7=9A=84?= =?UTF-8?q?=E8=AE=B8=E5=8F=AF=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/PROTOCOL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 docs/PROTOCOL.md diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md old mode 100755 new mode 100644 index 5b27f5a..40d96cc --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -1,7 +1,7 @@ # 协议速查 来源:DeTong DP305P(`3533:5C32`,序列号 `DP305P-Y60870279`)真机逆向, -以及 `dz-print`(MIT)的参考实现。完整逆向记录见原工作区 +以及 `dz-print`(**MPL-2.0**)的参考实现。完整逆向记录见原工作区 `DeTong/REPORT.md`、`DeTong/analysis/ble.md`、`DeTong/dz-print/protocol.md`。 ## 命令帧(USB / BLE 相同) From b1ca1b8ab1361ad6cfd2f00a473290ad3fb8b7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=B3=E5=87=BA=E7=BD=91=E5=90=8D=E5=95=A6?= Date: Sat, 31 Oct 2026 18:53:56 +0800 Subject: [PATCH 6/6] =?UTF-8?q?docs:=20=E6=97=A5=E6=96=87=20README=20?= =?UTF-8?q?=E5=86=99=E6=98=8E=E6=B7=B7=E5=90=88=E8=AE=B8=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) mode change 100755 => 100644 README.md diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 74d6271..b273a56 --- a/README.md +++ b/README.md @@ -123,5 +123,10 @@ CI(GitHub Actions)は両方のテストと `npm run build` を回します ## ライセンス -MIT。コマンド列エンコーダは [dz-print](https://github.com/sb-child/dz-print)(MIT)の -実装を参照しています。 +本プロジェクトは **MIT** です。ただしコマンド列エンコーダ +(`src/dzpost/protocol.py` / `web/src/protocol.ts`)は +[dz-print](https://github.com/sb-child/dz-print)(**MPL-2.0**)の派生物なので、 +この 2 ファイルだけ **MPL-2.0** が適用されます(ファイル単位のコピーレフト)。 + +- `LICENSE` — MIT(上記 2 ファイル以外) +- MPL-2.0 の全文 —