cornhsu-polymigrate 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +15 -5
- package/THIRD-PARTY-NOTICES.md +49 -0
- package/package.json +9 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 許彧銘 Hsu Yu-Ming (Cornhsu)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -13,12 +13,16 @@ PolyMigrate turns legacy dynamic sites (old PHP sites and the like) into clean,
|
|
|
13
13
|
Markdown — and it treats multilingual content as a first-class concern, not an afterthought.
|
|
14
14
|
Config-driven, fully offline-rerunnable, built on .NET.
|
|
15
15
|
|
|
16
|
-
**Status: 2.
|
|
16
|
+
**Status: 2.2.** The extraction pipeline, pairing, verification, thumbnails and orphan-page
|
|
17
17
|
recovery are complete and validated against a real full-site migration (see below). The **CLI
|
|
18
18
|
surface and the Phase output contracts remain stable** (unchanged since 1.0): new features bump
|
|
19
|
-
the minor version, fixes bump the patch. 2.0
|
|
19
|
+
the minor version, fixes bump the patch. 2.0 was an engineering release — it narrowed the
|
|
20
20
|
`Cornhsu.PolyMigrate.Core` public .NET API to its intended entry points and removed unused
|
|
21
|
-
config fields;
|
|
21
|
+
config fields; 2.1 fixed up the release pipeline (arm64 npm packages, symbol packages).
|
|
22
|
+
2.2 closed a blind spot in `verify` — pages nothing links to were reported as fine, because a
|
|
23
|
+
link-following audit never reaches them — and added `slugs` for keeping up with a source site
|
|
24
|
+
that is still being updated. **Upgrading to 2.2 can turn a passing `verify` into exit 1**;
|
|
25
|
+
see the [CHANGELOG](CHANGELOG.md) for that and the other migration notes.
|
|
22
26
|
|
|
23
27
|
## Why
|
|
24
28
|
|
|
@@ -94,10 +98,11 @@ dotnet tool install -g Cornhsu.PolyMigrate # .NET
|
|
|
94
98
|
```
|
|
95
99
|
dotnet tool install -g Cornhsu.PolyMigrate
|
|
96
100
|
polymigrate extract site.yaml # mirror HTML -> frontmatter Markdown + inventories
|
|
97
|
-
polymigrate verify out/ # link/media/frontmatter audit, CI
|
|
101
|
+
polymigrate verify out/ # link/media/frontmatter/unlinked-page audit, CI exit codes
|
|
98
102
|
polymigrate thumbs site.yaml # EXIF-corrected, width-capped thumbnails
|
|
99
103
|
polymigrate probe-orphans site.yaml --section news --years 2021-2023
|
|
100
104
|
polymigrate fetch-orphans site.yaml --section news
|
|
105
|
+
polymigrate slugs . --section news # slugs already mirrored under ./raw (pipeable)
|
|
101
106
|
```
|
|
102
107
|
|
|
103
108
|
> No .NET? Every command above also runs with **zero install** via npm — just prefix it:
|
|
@@ -160,4 +165,9 @@ dotnet run --project src/PolyMigrate.Cli -- --help
|
|
|
160
165
|
|
|
161
166
|
License: [MIT](LICENSE). All dependencies are MIT/BSD/Apache-2.0
|
|
162
167
|
(imaging via **Magick.NET**; ImageSharp was dropped when its 4.x line began requiring a
|
|
163
|
-
license key at build time).
|
|
168
|
+
license key at build time). See [THIRD-PARTY-NOTICES](THIRD-PARTY-NOTICES.md).
|
|
169
|
+
|
|
170
|
+
PolyMigrate fetches pages from the site you point it at, and can be configured to send
|
|
171
|
+
cookies past a bot challenge. **It assumes the site is yours, or that you are migrating
|
|
172
|
+
it with the owner's permission** — that is what it is for. Check the source site's terms
|
|
173
|
+
before pointing it at anything else.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
PolyMigrate itself is licensed under the [MIT License](LICENSE). It builds on the
|
|
4
|
+
following third-party packages. All of their licences are compatible with MIT, and
|
|
5
|
+
none of them are copyleft.
|
|
6
|
+
|
|
7
|
+
| Package | Licence | Project |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| AngleSharp | MIT | https://anglesharp.github.io/ |
|
|
10
|
+
| ReverseMarkdown | MIT | https://github.com/mysticmind/reversemarkdown-net |
|
|
11
|
+
| YamlDotNet | MIT | https://github.com/aaubry/YamlDotNet |
|
|
12
|
+
| Magick.NET (`Magick.NET-Q8-AnyCPU`, `Magick.NET.Core`) | Apache-2.0 | https://github.com/dlemstra/Magick.NET |
|
|
13
|
+
|
|
14
|
+
## Why this file exists
|
|
15
|
+
|
|
16
|
+
For the NuGet packages (`Cornhsu.PolyMigrate`, `Cornhsu.PolyMigrate.Core`) the
|
|
17
|
+
dependencies are resolved by NuGet and each package carries its own licence — nothing
|
|
18
|
+
further is required from us.
|
|
19
|
+
|
|
20
|
+
**The npm channel is different.** `cornhsu-polymigrate` ships a self-contained native
|
|
21
|
+
binary that embeds `Magick.Native-Q8-*` directly, which makes it a redistribution of
|
|
22
|
+
Magick.NET and of ImageMagick. Magick.NET is Apache-2.0 and its package includes a
|
|
23
|
+
`Notice.txt`, so section 4(d) of the Apache License applies: that notice must travel
|
|
24
|
+
with the redistribution.
|
|
25
|
+
|
|
26
|
+
## Magick.NET / ImageMagick
|
|
27
|
+
|
|
28
|
+
> Copyright Dirk Lemstra, https://github.com/dlemstra/Magick.NET
|
|
29
|
+
> Licensed under the Apache License, Version 2.0.
|
|
30
|
+
>
|
|
31
|
+
> Bundles ImageMagick, used under the ImageMagick License —
|
|
32
|
+
> https://imagemagick.org/license/
|
|
33
|
+
|
|
34
|
+
The full, authoritative notice ships inside the Magick.NET package as `Notice.txt`
|
|
35
|
+
(and covers the exact ImageMagick version bundled by that release). Reproduce that
|
|
36
|
+
file, not this summary, when redistributing.
|
|
37
|
+
|
|
38
|
+
**This is automated, not a checklist item.** `npm/prepare.mjs` resolves the actual
|
|
39
|
+
Magick.NET version from `project.assets.json`, reads `Notice.txt` from the NuGet cache,
|
|
40
|
+
and writes it into every platform package as `NOTICE.txt` — **aborting the build if it
|
|
41
|
+
cannot find it**. `release.yml` then verifies the built packages really carry it. A
|
|
42
|
+
licence obligation that depends on someone remembering a checklist is one that will
|
|
43
|
+
eventually be missed.
|
|
44
|
+
|
|
45
|
+
## Keeping this current
|
|
46
|
+
|
|
47
|
+
This file lists licences as of the versions pinned in `src/*/*.csproj`. **When a
|
|
48
|
+
dependency is added, removed, or bumped to a version with a different licence, update
|
|
49
|
+
this file in the same commit** — Dependabot bumps will not do it for you.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cornhsu-polymigrate",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "The i18n-first static-site migrator — the only one that pairs your multilingual pages automatically. Mirrors a legacy site into frontmatter Markdown, auto-matches language versions, and honestly lists what it could not pair.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -29,15 +29,18 @@
|
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"bin/polymigrate.js",
|
|
32
|
-
"README.md"
|
|
32
|
+
"README.md",
|
|
33
|
+
"THIRD-PARTY-NOTICES.md"
|
|
33
34
|
],
|
|
34
35
|
"engines": {
|
|
35
36
|
"node": ">=18"
|
|
36
37
|
},
|
|
37
38
|
"optionalDependencies": {
|
|
38
|
-
"@cornhsu/polymigrate-win32-x64": "2.0
|
|
39
|
-
"@cornhsu/polymigrate-
|
|
40
|
-
"@cornhsu/polymigrate-
|
|
41
|
-
"@cornhsu/polymigrate-
|
|
39
|
+
"@cornhsu/polymigrate-win32-x64": "2.2.0",
|
|
40
|
+
"@cornhsu/polymigrate-win32-arm64": "2.2.0",
|
|
41
|
+
"@cornhsu/polymigrate-linux-x64": "2.2.0",
|
|
42
|
+
"@cornhsu/polymigrate-linux-arm64": "2.2.0",
|
|
43
|
+
"@cornhsu/polymigrate-darwin-x64": "2.2.0",
|
|
44
|
+
"@cornhsu/polymigrate-darwin-arm64": "2.2.0"
|
|
42
45
|
}
|
|
43
46
|
}
|