woolpack 0.1.0__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.
woolpack-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 woolroom contributors
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.
@@ -0,0 +1,121 @@
1
+ Creative Commons Legal Code
2
+
3
+ CC0 1.0 Universal
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: woolpack
3
+ Version: 0.1.0
4
+ Summary: Standalone validation and authoring tools for Woolroom content packs.
5
+ License-Expression: MIT AND CC0-1.0
6
+ Project-URL: Homepage, https://www.minglongpan.com/projects/woolroom
7
+ Project-URL: Documentation, https://github.com/minglong51/woolroom/blob/main/docs/packs.md
8
+ Project-URL: Issues, https://github.com/minglong51/woolroom/issues
9
+ Project-URL: Repository, https://github.com/minglong51/woolroom
10
+ Project-URL: Pack index, https://github.com/minglong51/woolroom-packs
11
+ Keywords: cli,content-packs,woolroom,yaml
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ License-File: LICENSE-CC0
20
+ Requires-Dist: PyYAML>=6.0
21
+ Dynamic: license-file
22
+
23
+ # Woolpack
24
+
25
+ Woolpack is the standalone authoring toolkit for
26
+ [Woolroom](https://github.com/minglong51/woolroom) content packs. It scaffolds
27
+ version 1 packs, renders their coats, poses, and hitboxes to a static review
28
+ board, and validates the same fail-closed data contract Woolroom loads at boot.
29
+
30
+ Packs are local YAML and SVG data. Woolpack does not execute pack code or upload
31
+ pack contents.
32
+
33
+ ## Quick start
34
+
35
+ Run Woolpack without installing it permanently:
36
+
37
+ ```sh
38
+ uvx woolpack new mole --author "Your Name" --license MIT
39
+ uvx woolpack render packs/mole -o mole-board.html
40
+ uvx woolpack lint packs/mole --strict
41
+ ```
42
+
43
+ The scaffold starts from the bundled Pebble template and renames the species,
44
+ phrase, and quirk identifiers for you. Edit the generated YAML and SVG between
45
+ render and lint runs. Strict lint exits nonzero for either an error or a warning,
46
+ which is the bar intended for registry submissions.
47
+
48
+ The bundled Pebble template declares `CC0-1.0`. If `--license` is omitted, a
49
+ new pack inherits its source template's license, so choose the intended license
50
+ explicitly when scaffolding original work.
51
+
52
+ For repeated use, install the command with `uv tool install woolpack`. See the
53
+ [pack format reference](https://github.com/minglong51/woolroom/blob/main/docs/packs.md)
54
+ for the file contract, SVG rig hooks, phrase overlays, and Woolroom boot command.
55
+ The [pack index](https://github.com/minglong51/woolroom-packs) tracks compatible
56
+ pack repositories and defines its submission contract.
57
+
58
+ ## Commands
59
+
60
+ - `woolpack new <species-id>` scaffolds a pack from the bundled template or a
61
+ local pack supplied with `--from`.
62
+ - `woolpack render <pack-dir>` validates the pack and writes a self-contained
63
+ HTML review board.
64
+ - `woolpack lint <pack-dir>` reports contract and authoring-quality findings;
65
+ `--strict` treats warnings as failures.
66
+
67
+ Lint checks one pack against Woolpack's bundled format-v1 environment. Woolroom
68
+ revalidates all configured packs together at boot, so cross-pack identifier
69
+ collisions can still make an individually clean pack fail to load.
70
+
71
+ Woolpack requires Python 3.11 or newer. Its code is licensed under the MIT
72
+ License; the bundled Pebble template is `CC0-1.0`. Both license texts ship with
73
+ the distribution.
@@ -0,0 +1,51 @@
1
+ # Woolpack
2
+
3
+ Woolpack is the standalone authoring toolkit for
4
+ [Woolroom](https://github.com/minglong51/woolroom) content packs. It scaffolds
5
+ version 1 packs, renders their coats, poses, and hitboxes to a static review
6
+ board, and validates the same fail-closed data contract Woolroom loads at boot.
7
+
8
+ Packs are local YAML and SVG data. Woolpack does not execute pack code or upload
9
+ pack contents.
10
+
11
+ ## Quick start
12
+
13
+ Run Woolpack without installing it permanently:
14
+
15
+ ```sh
16
+ uvx woolpack new mole --author "Your Name" --license MIT
17
+ uvx woolpack render packs/mole -o mole-board.html
18
+ uvx woolpack lint packs/mole --strict
19
+ ```
20
+
21
+ The scaffold starts from the bundled Pebble template and renames the species,
22
+ phrase, and quirk identifiers for you. Edit the generated YAML and SVG between
23
+ render and lint runs. Strict lint exits nonzero for either an error or a warning,
24
+ which is the bar intended for registry submissions.
25
+
26
+ The bundled Pebble template declares `CC0-1.0`. If `--license` is omitted, a
27
+ new pack inherits its source template's license, so choose the intended license
28
+ explicitly when scaffolding original work.
29
+
30
+ For repeated use, install the command with `uv tool install woolpack`. See the
31
+ [pack format reference](https://github.com/minglong51/woolroom/blob/main/docs/packs.md)
32
+ for the file contract, SVG rig hooks, phrase overlays, and Woolroom boot command.
33
+ The [pack index](https://github.com/minglong51/woolroom-packs) tracks compatible
34
+ pack repositories and defines its submission contract.
35
+
36
+ ## Commands
37
+
38
+ - `woolpack new <species-id>` scaffolds a pack from the bundled template or a
39
+ local pack supplied with `--from`.
40
+ - `woolpack render <pack-dir>` validates the pack and writes a self-contained
41
+ HTML review board.
42
+ - `woolpack lint <pack-dir>` reports contract and authoring-quality findings;
43
+ `--strict` treats warnings as failures.
44
+
45
+ Lint checks one pack against Woolpack's bundled format-v1 environment. Woolroom
46
+ revalidates all configured packs together at boot, so cross-pack identifier
47
+ collisions can still make an individually clean pack fail to load.
48
+
49
+ Woolpack requires Python 3.11 or newer. Its code is licensed under the MIT
50
+ License; the bundled Pebble template is `CC0-1.0`. Both license texts ship with
51
+ the distribution.
@@ -0,0 +1,47 @@
1
+ [project]
2
+ name = "woolpack"
3
+ version = "0.1.0"
4
+ description = "Standalone validation and authoring tools for Woolroom content packs."
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = "MIT AND CC0-1.0"
8
+ license-files = ["LICENSE", "LICENSE-CC0"]
9
+ keywords = ["cli", "content-packs", "woolroom", "yaml"]
10
+ dependencies = ["PyYAML>=6.0"]
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Environment :: Console",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3 :: Only",
16
+ ]
17
+
18
+ [project.urls]
19
+ Homepage = "https://www.minglongpan.com/projects/woolroom"
20
+ Documentation = "https://github.com/minglong51/woolroom/blob/main/docs/packs.md"
21
+ Issues = "https://github.com/minglong51/woolroom/issues"
22
+ Repository = "https://github.com/minglong51/woolroom"
23
+ "Pack index" = "https://github.com/minglong51/woolroom-packs"
24
+
25
+ [project.scripts]
26
+ woolpack = "woolpack.cli:main"
27
+
28
+ [build-system]
29
+ requires = ["setuptools>=77"]
30
+ build-backend = "setuptools.build_meta"
31
+
32
+ [tool.setuptools.packages.find]
33
+ where = ["src"]
34
+
35
+ [tool.setuptools.package-data]
36
+ "woolpack.resources" = [
37
+ "style.css",
38
+ "pebble/*.yaml",
39
+ "pebble/phrases/*.yaml",
40
+ "pebble/quirks/*.yaml",
41
+ "pebble/species/*.svg",
42
+ "pebble/species/*.yaml",
43
+ ]
44
+
45
+ [tool.ruff]
46
+ line-length = 100
47
+ target-version = "py311"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,4 @@
1
+ from woolpack.contract import DEFAULT_ENVIRONMENT, PackEnvironment
2
+ from woolpack.validation import ValidatedPack, validate_pack
3
+
4
+ __all__ = ["DEFAULT_ENVIRONMENT", "PackEnvironment", "ValidatedPack", "validate_pack"]
@@ -0,0 +1,39 @@
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ from importlib.metadata import PackageNotFoundError, version
5
+
6
+ from woolpack import lint, render, scaffold
7
+
8
+
9
+ def _package_version() -> str:
10
+ try:
11
+ return version("woolpack")
12
+ except PackageNotFoundError:
13
+ return "0.1.0"
14
+
15
+
16
+ def main(argv: list[str] | None = None) -> int:
17
+ parser = argparse.ArgumentParser(prog="woolpack", description="Woolpack author tools")
18
+ parser.add_argument("--version", action="version", version=f"%(prog)s {_package_version()}")
19
+ commands = parser.add_subparsers(dest="command")
20
+ commands.add_parser("new", add_help=False, help="scaffold a pack from the Pebble template")
21
+ commands.add_parser("render", add_help=False, help="render a static visual review board")
22
+ commands.add_parser("lint", add_help=False, help="validate and lint a pack")
23
+ args, command_argv = parser.parse_known_args(argv)
24
+
25
+ if args.command == "new":
26
+ return scaffold.main(command_argv, prog="woolpack new")
27
+ if args.command == "render":
28
+ return render.main(command_argv, prog="woolpack render")
29
+ if args.command == "lint":
30
+ return lint.main(command_argv, prog="woolpack lint")
31
+ parser.print_help()
32
+ return 2
33
+
34
+
35
+ __all__ = ["main"]
36
+
37
+
38
+ if __name__ == "__main__":
39
+ raise SystemExit(main())
@@ -0,0 +1,94 @@
1
+ from __future__ import annotations
2
+
3
+ from dataclasses import dataclass
4
+
5
+
6
+ @dataclass(frozen=True)
7
+ class PackEnvironment:
8
+ fx_vocab_version: int
9
+ fx_modes: frozenset[str]
10
+ quirk_emit_types: frozenset[str]
11
+ action_ids: frozenset[str]
12
+ spot_ids: frozenset[str]
13
+ condition_ids: frozenset[str]
14
+ pose_keys: frozenset[str]
15
+ pose_write_ops: frozenset[str]
16
+ species_ids: frozenset[str]
17
+ overlay_ids: frozenset[str]
18
+ quirk_ids: frozenset[str]
19
+ coat_label_ids: frozenset[str]
20
+
21
+
22
+ DEFAULT_ENVIRONMENT = PackEnvironment(
23
+ fx_vocab_version=1,
24
+ fx_modes=frozenset(
25
+ {
26
+ "greet",
27
+ "petting",
28
+ "kibble",
29
+ "leash_tug",
30
+ "call_ring",
31
+ "message_ping",
32
+ "zoomie",
33
+ "flinch_away",
34
+ "petting_melt",
35
+ "head_tilt",
36
+ "sigh_settle",
37
+ "threshold_refusal",
38
+ "stash",
39
+ "carry",
40
+ "lean_in",
41
+ "side_eye",
42
+ "ignored",
43
+ "petting_head",
44
+ "petting_ear",
45
+ "petting_tail",
46
+ "petting_belly",
47
+ "warm_spot",
48
+ "brushed_coat",
49
+ "bowl",
50
+ "leash",
51
+ "phone_glow",
52
+ "rumpled_rug",
53
+ }
54
+ ),
55
+ quirk_emit_types=frozenset({"response"}),
56
+ action_ids=frozenset({"greet", "feed", "pet", "walk", "call", "message", "play"}),
57
+ spot_ids=frozenset({"body", "head", "ear", "tail", "belly"}),
58
+ condition_ids=frozenset(
59
+ {
60
+ "action_in",
61
+ "state_in",
62
+ "state_not_in",
63
+ "valence_gte",
64
+ "valence_lt",
65
+ "arousal_gte",
66
+ "arousal_lt",
67
+ "old_arousal_lt",
68
+ "old_valence_lt",
69
+ "enters_state",
70
+ "fact_day_gate",
71
+ "fact_exists",
72
+ "any",
73
+ }
74
+ ),
75
+ pose_keys=frozenset(
76
+ {"body_lean", "head_shift_y", "ear_angle", "eye_style", "tail_motion", "focus_target"}
77
+ ),
78
+ pose_write_ops=frozenset({"set", "min", "set_if_default"}),
79
+ species_ids=frozenset({"cat"}),
80
+ overlay_ids=frozenset(),
81
+ quirk_ids=frozenset(
82
+ {
83
+ "hides_small_things",
84
+ "threshold_refuser",
85
+ "one_eye_napper",
86
+ "lean_in_greeter",
87
+ "content_sigher",
88
+ "fixated_watcher",
89
+ "zoomie_initiator",
90
+ "side_eye_judge",
91
+ }
92
+ ),
93
+ coat_label_ids=frozenset({"tuxedo", "marmalade", "ash"}),
94
+ )