cink 0.2.0__tar.gz → 0.2.2__tar.gz
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.
- cink-0.2.2/.gitignore +13 -0
- {cink-0.2.0 → cink-0.2.2}/PKG-INFO +43 -22
- {cink-0.2.0 → cink-0.2.2}/README.md +39 -17
- {cink-0.2.0 → cink-0.2.2}/pyproject.toml +4 -4
- {cink-0.2.0 → cink-0.2.2}/scripts/conformance.py +2 -1
- cink-0.2.0/.gitignore +0 -10
- cink-0.2.0/LICENSES/LGPL-3.0-only WITH LGPL-3.0-linking-exception.txt +0 -16
- {cink-0.2.0 → cink-0.2.2}/LICENSES/Apache-2.0.txt +0 -0
- {cink-0.2.0 → cink-0.2.2}/LICENSES/GPL-3.0-only.txt +0 -0
- {cink-0.2.0 → cink-0.2.2}/LICENSES/LGPL-3.0-linking-exception.txt +0 -0
- {cink-0.2.0 → cink-0.2.2}/LICENSES/LGPL-3.0-only.txt +0 -0
- {cink-0.2.0 → cink-0.2.2}/cink/__init__.py +0 -0
- {cink-0.2.0 → cink-0.2.2}/cink/__main__.py +0 -0
- {cink-0.2.0 → cink-0.2.2}/cink/_tables.py +0 -0
- {cink-0.2.0 → cink-0.2.2}/cink/py.typed +0 -0
- {cink-0.2.0 → cink-0.2.2}/scripts/consumer.py +0 -0
cink-0.2.2/.gitignore
ADDED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cink
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Handwritten signature image rendering for correspondence. Pixels, not signatures
|
|
5
|
-
Project-URL: Homepage, https://github.com/corbet-
|
|
6
|
-
Project-URL: Repository, https://github.com/corbet-
|
|
7
|
-
Project-URL: Issues, https://github.com/corbet-
|
|
5
|
+
Project-URL: Homepage, https://github.com/corbet-foss/cink#readme
|
|
6
|
+
Project-URL: Repository, https://github.com/corbet-foss/cink
|
|
7
|
+
Project-URL: Issues, https://github.com/corbet-foss/cink/issues
|
|
8
8
|
License-Expression: LGPL-3.0-only WITH LGPL-3.0-linking-exception
|
|
9
9
|
License-File: LICENSES/Apache-2.0.txt
|
|
10
10
|
License-File: LICENSES/GPL-3.0-only.txt
|
|
11
11
|
License-File: LICENSES/LGPL-3.0-linking-exception.txt
|
|
12
|
-
License-File: LICENSES/LGPL-3.0-only WITH LGPL-3.0-linking-exception.txt
|
|
13
12
|
License-File: LICENSES/LGPL-3.0-only.txt
|
|
14
13
|
Keywords: correspondence,i18n,locale
|
|
15
14
|
Classifier: Operating System :: OS Independent
|
|
@@ -62,7 +61,7 @@ const { imageSnippet } = require('@corbet-labs/cink');
|
|
|
62
61
|
```
|
|
63
62
|
|
|
64
63
|
Python 3.10+ packages are available on [PyPI](https://pypi.org/project/cink/).
|
|
65
|
-
See the [installation guide](https://github.com/corbet-
|
|
64
|
+
See the [installation guide](https://github.com/corbet-foss/cink/blob/main/docs/installation.md)
|
|
66
65
|
for CLI commands and other distribution options.
|
|
67
66
|
JSR publication and Typst availability are listed there explicitly.
|
|
68
67
|
|
|
@@ -74,6 +73,28 @@ use cink::image_snippet;
|
|
|
74
73
|
assert_eq!(image_snippet("/signature.png", 31.5, None), "#image(\"/signature.png\", height: 31.5pt)");
|
|
75
74
|
```
|
|
76
75
|
|
|
76
|
+
### Typst in Rust hosts
|
|
77
|
+
|
|
78
|
+
The crate also ships the Typst package. Applications that embed the Typst
|
|
79
|
+
compiler can register it from `cink::typst` instead of downloading or
|
|
80
|
+
vendoring a copy, so Rust and Typst always come from the same release.
|
|
81
|
+
`FILES` holds package-relative paths (`typst.toml`, `typst/ink.typ`, and the `tables/` the Typst sources read)
|
|
82
|
+
with their bytes; `spec()` is the import specification.
|
|
83
|
+
|
|
84
|
+
```rust
|
|
85
|
+
use cink::typst::{FILES, NAME, NAMESPACE, VERSION, spec};
|
|
86
|
+
|
|
87
|
+
assert_eq!((NAMESPACE, NAME), ("preview", "cink"));
|
|
88
|
+
assert_eq!(spec(), format!("@preview/cink:{VERSION}"));
|
|
89
|
+
for (path, bytes) in FILES {
|
|
90
|
+
// Serve `bytes` for `path` inside the package `spec()` in your Typst world.
|
|
91
|
+
let _ = (path, bytes.len());
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Documents then import the package as usual, for example
|
|
96
|
+
`#import "@preview/cink:0.2.2": signature-image`.
|
|
97
|
+
|
|
77
98
|
## Python
|
|
78
99
|
|
|
79
100
|
```python
|
|
@@ -100,37 +121,37 @@ PNG and JPEG dimensions are read from headers; this is not a full raster integri
|
|
|
100
121
|
|
|
101
122
|
| Library | Responsibility |
|
|
102
123
|
| --- | --- |
|
|
103
|
-
| [cletter](https://github.com/corbet-
|
|
104
|
-
| [cgreet](https://github.com/corbet-
|
|
105
|
-
| [cfarewell](https://github.com/corbet-
|
|
106
|
-
| [cdate](https://github.com/corbet-
|
|
107
|
-
| [cink](https://github.com/corbet-
|
|
124
|
+
| [cletter](https://github.com/corbet-foss/cletter) | Compose the correspondence helpers |
|
|
125
|
+
| [cgreet](https://github.com/corbet-foss/cgreet) | German salutations and titles |
|
|
126
|
+
| [cfarewell](https://github.com/corbet-foss/cfarewell) | Locale-specific closings |
|
|
127
|
+
| [cdate](https://github.com/corbet-foss/cdate) | Calendar-date formatting |
|
|
128
|
+
| [cink](https://github.com/corbet-foss/cink) | Handwritten signature images |
|
|
108
129
|
|
|
109
130
|
|
|
110
131
|
## Development
|
|
111
132
|
|
|
112
|
-
Behavior is defined by [the
|
|
113
|
-
and [shared conformance vectors](https://github.com/corbet-
|
|
133
|
+
Behavior is defined by [the signature limits](https://github.com/corbet-foss/cink/tree/main/tables)
|
|
134
|
+
and [shared conformance vectors](https://github.com/corbet-foss/cink/tree/main/tests/vectors).
|
|
114
135
|
Rust, JavaScript, and Python run the same vectors. Selected CI checks exercise
|
|
115
136
|
installed JavaScript tarballs, Python wheels and command-line entrypoints, and
|
|
116
137
|
Typst packages. Release validation records the actual runtime and platform;
|
|
117
138
|
Linux results do not establish native Windows or macOS coverage.
|
|
118
139
|
All five Rust crates forbid unsafe code in their own source.
|
|
119
140
|
|
|
120
|
-
See [the release guide](https://github.com/corbet-
|
|
141
|
+
See [the release guide](https://github.com/corbet-foss/cink/blob/main/docs/releasing.md)
|
|
121
142
|
for generation, verification, and publication commands.
|
|
122
143
|
|
|
123
144
|
## License
|
|
124
145
|
|
|
125
|
-
Copyright 2026 Julian Y. Richard Corbet. The 0.2.
|
|
126
|
-
under [LGPL-3.0-only](https://github.com/corbet-
|
|
127
|
-
[WITH LGPL-3.0-linking-exception](https://github.com/corbet-
|
|
128
|
-
with the incorporated [GPL version 3](https://github.com/corbet-
|
|
146
|
+
Copyright 2026 Julian Y. Richard Corbet. The 0.2.2 release line is licensed
|
|
147
|
+
under [LGPL-3.0-only](https://github.com/corbet-foss/cink/blob/main/LICENSES/LGPL-3.0-only.txt)
|
|
148
|
+
[WITH LGPL-3.0-linking-exception](https://github.com/corbet-foss/cink/blob/main/LICENSES/LGPL-3.0-linking-exception.txt),
|
|
149
|
+
with the incorporated [GPL version 3](https://github.com/corbet-foss/cink/blob/main/LICENSES/GPL-3.0-only.txt).
|
|
129
150
|
Combined works may link statically or dynamically without relinking duties;
|
|
130
151
|
library modifications stay LGPL. Applications can use a different license
|
|
131
152
|
subject to the LGPL's conditions.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
0.2.0 has not yet been published to registries.
|
|
153
|
+
Version 0.1.4 retains Apache-2.0. The installation examples above refer to those available
|
|
154
|
+
releases; 0.2.2 is published to registries.
|
|
135
155
|
|
|
136
|
-
See the [licensing notes](https://github.com/corbet-
|
|
156
|
+
See the [licensing notes](https://github.com/corbet-foss/cink/blob/main/LICENSE.md) for distribution conditions and retained notices.
|
|
157
|
+
Contributions use the [Contributor License Agreement](https://github.com/corbet-foss/cink/blob/main/CLA.md).
|
|
@@ -43,7 +43,7 @@ const { imageSnippet } = require('@corbet-labs/cink');
|
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Python 3.10+ packages are available on [PyPI](https://pypi.org/project/cink/).
|
|
46
|
-
See the [installation guide](https://github.com/corbet-
|
|
46
|
+
See the [installation guide](https://github.com/corbet-foss/cink/blob/main/docs/installation.md)
|
|
47
47
|
for CLI commands and other distribution options.
|
|
48
48
|
JSR publication and Typst availability are listed there explicitly.
|
|
49
49
|
|
|
@@ -55,6 +55,28 @@ use cink::image_snippet;
|
|
|
55
55
|
assert_eq!(image_snippet("/signature.png", 31.5, None), "#image(\"/signature.png\", height: 31.5pt)");
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
### Typst in Rust hosts
|
|
59
|
+
|
|
60
|
+
The crate also ships the Typst package. Applications that embed the Typst
|
|
61
|
+
compiler can register it from `cink::typst` instead of downloading or
|
|
62
|
+
vendoring a copy, so Rust and Typst always come from the same release.
|
|
63
|
+
`FILES` holds package-relative paths (`typst.toml`, `typst/ink.typ`, and the `tables/` the Typst sources read)
|
|
64
|
+
with their bytes; `spec()` is the import specification.
|
|
65
|
+
|
|
66
|
+
```rust
|
|
67
|
+
use cink::typst::{FILES, NAME, NAMESPACE, VERSION, spec};
|
|
68
|
+
|
|
69
|
+
assert_eq!((NAMESPACE, NAME), ("preview", "cink"));
|
|
70
|
+
assert_eq!(spec(), format!("@preview/cink:{VERSION}"));
|
|
71
|
+
for (path, bytes) in FILES {
|
|
72
|
+
// Serve `bytes` for `path` inside the package `spec()` in your Typst world.
|
|
73
|
+
let _ = (path, bytes.len());
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Documents then import the package as usual, for example
|
|
78
|
+
`#import "@preview/cink:0.2.2": signature-image`.
|
|
79
|
+
|
|
58
80
|
## Python
|
|
59
81
|
|
|
60
82
|
```python
|
|
@@ -81,37 +103,37 @@ PNG and JPEG dimensions are read from headers; this is not a full raster integri
|
|
|
81
103
|
|
|
82
104
|
| Library | Responsibility |
|
|
83
105
|
| --- | --- |
|
|
84
|
-
| [cletter](https://github.com/corbet-
|
|
85
|
-
| [cgreet](https://github.com/corbet-
|
|
86
|
-
| [cfarewell](https://github.com/corbet-
|
|
87
|
-
| [cdate](https://github.com/corbet-
|
|
88
|
-
| [cink](https://github.com/corbet-
|
|
106
|
+
| [cletter](https://github.com/corbet-foss/cletter) | Compose the correspondence helpers |
|
|
107
|
+
| [cgreet](https://github.com/corbet-foss/cgreet) | German salutations and titles |
|
|
108
|
+
| [cfarewell](https://github.com/corbet-foss/cfarewell) | Locale-specific closings |
|
|
109
|
+
| [cdate](https://github.com/corbet-foss/cdate) | Calendar-date formatting |
|
|
110
|
+
| [cink](https://github.com/corbet-foss/cink) | Handwritten signature images |
|
|
89
111
|
|
|
90
112
|
|
|
91
113
|
## Development
|
|
92
114
|
|
|
93
|
-
Behavior is defined by [the
|
|
94
|
-
and [shared conformance vectors](https://github.com/corbet-
|
|
115
|
+
Behavior is defined by [the signature limits](https://github.com/corbet-foss/cink/tree/main/tables)
|
|
116
|
+
and [shared conformance vectors](https://github.com/corbet-foss/cink/tree/main/tests/vectors).
|
|
95
117
|
Rust, JavaScript, and Python run the same vectors. Selected CI checks exercise
|
|
96
118
|
installed JavaScript tarballs, Python wheels and command-line entrypoints, and
|
|
97
119
|
Typst packages. Release validation records the actual runtime and platform;
|
|
98
120
|
Linux results do not establish native Windows or macOS coverage.
|
|
99
121
|
All five Rust crates forbid unsafe code in their own source.
|
|
100
122
|
|
|
101
|
-
See [the release guide](https://github.com/corbet-
|
|
123
|
+
See [the release guide](https://github.com/corbet-foss/cink/blob/main/docs/releasing.md)
|
|
102
124
|
for generation, verification, and publication commands.
|
|
103
125
|
|
|
104
126
|
## License
|
|
105
127
|
|
|
106
|
-
Copyright 2026 Julian Y. Richard Corbet. The 0.2.
|
|
107
|
-
under [LGPL-3.0-only](https://github.com/corbet-
|
|
108
|
-
[WITH LGPL-3.0-linking-exception](https://github.com/corbet-
|
|
109
|
-
with the incorporated [GPL version 3](https://github.com/corbet-
|
|
128
|
+
Copyright 2026 Julian Y. Richard Corbet. The 0.2.2 release line is licensed
|
|
129
|
+
under [LGPL-3.0-only](https://github.com/corbet-foss/cink/blob/main/LICENSES/LGPL-3.0-only.txt)
|
|
130
|
+
[WITH LGPL-3.0-linking-exception](https://github.com/corbet-foss/cink/blob/main/LICENSES/LGPL-3.0-linking-exception.txt),
|
|
131
|
+
with the incorporated [GPL version 3](https://github.com/corbet-foss/cink/blob/main/LICENSES/GPL-3.0-only.txt).
|
|
110
132
|
Combined works may link statically or dynamically without relinking duties;
|
|
111
133
|
library modifications stay LGPL. Applications can use a different license
|
|
112
134
|
subject to the LGPL's conditions.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
0.2.0 has not yet been published to registries.
|
|
135
|
+
Version 0.1.4 retains Apache-2.0. The installation examples above refer to those available
|
|
136
|
+
releases; 0.2.2 is published to registries.
|
|
116
137
|
|
|
117
|
-
See the [licensing notes](https://github.com/corbet-
|
|
138
|
+
See the [licensing notes](https://github.com/corbet-foss/cink/blob/main/LICENSE.md) for distribution conditions and retained notices.
|
|
139
|
+
Contributions use the [Contributor License Agreement](https://github.com/corbet-foss/cink/blob/main/CLA.md).
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cink"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Handwritten signature image rendering for correspondence. Pixels, not signatures"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "LGPL-3.0-only WITH LGPL-3.0-linking-exception"
|
|
@@ -15,9 +15,9 @@ classifiers = ["Programming Language :: Python :: 3", "Operating System :: OS In
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
[project.urls]
|
|
18
|
-
Homepage = "https://github.com/corbet-
|
|
19
|
-
Repository = "https://github.com/corbet-
|
|
20
|
-
Issues = "https://github.com/corbet-
|
|
18
|
+
Homepage = "https://github.com/corbet-foss/cink#readme"
|
|
19
|
+
Repository = "https://github.com/corbet-foss/cink"
|
|
20
|
+
Issues = "https://github.com/corbet-foss/cink/issues"
|
|
21
21
|
|
|
22
22
|
[project.scripts]
|
|
23
23
|
cink = "cink.__main__:main"
|
|
@@ -22,7 +22,8 @@ ARGUMENTS = {
|
|
|
22
22
|
"medium_date": ["locale", "year", "month", "day"],
|
|
23
23
|
"short_date": ["locale", "year", "month", "day"],
|
|
24
24
|
"month_year": ["locale", "year", "month"], "is_supported": ["locale"],
|
|
25
|
-
"
|
|
25
|
+
"is_valid_date": ["year", "month", "day"],
|
|
26
|
+
"default_max_pixels": [], "supported_formats": [], "normalize": ["input"],
|
|
26
27
|
"exceeds_limits": ["image", "max_pixels"], "scale_to_fit": ["image", "max_pixels"],
|
|
27
28
|
"signature_size": ["image", "height_pt", "max_width_pt"],
|
|
28
29
|
"image_snippet": ["path", "height_pt", "width_pt"],
|
cink-0.2.0/.gitignore
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
As a special exception to the GNU Lesser General Public License version 3
|
|
2
|
-
("LGPL3"), the copyright holders of this Library give you permission to
|
|
3
|
-
convey to a third party a Combined Work that links statically or dynamically
|
|
4
|
-
to this Library without providing any Minimal Corresponding Source or
|
|
5
|
-
Minimal Application Code as set out in 4d or providing the installation
|
|
6
|
-
information set out in section 4e, provided that you comply with the other
|
|
7
|
-
provisions of LGPL3 and provided that you meet, for the Application the
|
|
8
|
-
terms and conditions of the license(s) which apply to the Application.
|
|
9
|
-
|
|
10
|
-
Except as stated in this special exception, the provisions of LGPL3 will
|
|
11
|
-
continue to comply in full to this Library. If you modify this Library, you
|
|
12
|
-
may apply this exception to your version of this Library, but you are not
|
|
13
|
-
obliged to do so. If you do not wish to do so, delete this exception
|
|
14
|
-
statement from your version. This exception does not (and cannot) modify any
|
|
15
|
-
license terms which apply to the Application, with which you must still
|
|
16
|
-
comply.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|