mcruft-designcraft 0.1.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.
- mcruft_designcraft-0.1.2/.gitignore +230 -0
- mcruft_designcraft-0.1.2/PKG-INFO +9 -0
- mcruft_designcraft-0.1.2/pyproject.toml +35 -0
- mcruft_designcraft-0.1.2/src/mcruft_designcraft/__init__.py +76 -0
- mcruft_designcraft-0.1.2/src/mcruft_designcraft/__version__.py +24 -0
- mcruft_designcraft-0.1.2/tests/test_designcraft.py +80 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
|
|
222
|
+
# OMC runtime state
|
|
223
|
+
.omc/
|
|
224
|
+
.superpowers/
|
|
225
|
+
|
|
226
|
+
# Generated by hatch-vcs; keep the release helper under lib/.
|
|
227
|
+
packages/*/src/*/__version__.py
|
|
228
|
+
!/lib/
|
|
229
|
+
/lib/*
|
|
230
|
+
!/lib/guard.sh
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: mcruft-designcraft
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: DesignCraft engine for mcruft
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Requires-Dist: mcruft
|
|
8
|
+
Provides-Extra: bundled
|
|
9
|
+
Requires-Dist: mcruft-designcraft-bin; extra == 'bundled'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# this_file: packages/mcruft_designcraft/pyproject.toml
|
|
2
|
+
[project]
|
|
3
|
+
license = "Apache-2.0"
|
|
4
|
+
name = "mcruft-designcraft"
|
|
5
|
+
description = "DesignCraft engine for mcruft"
|
|
6
|
+
dynamic = ["version"]
|
|
7
|
+
requires-python = ">=3.12"
|
|
8
|
+
dependencies = ["mcruft"]
|
|
9
|
+
|
|
10
|
+
[project.optional-dependencies]
|
|
11
|
+
bundled = ["mcruft-designcraft-bin"]
|
|
12
|
+
|
|
13
|
+
[project.entry-points."mcruft.engines"]
|
|
14
|
+
designcraft = "mcruft_designcraft:engine"
|
|
15
|
+
|
|
16
|
+
[tool.uv.sources]
|
|
17
|
+
mcruft = { workspace = true }
|
|
18
|
+
|
|
19
|
+
[build-system]
|
|
20
|
+
requires = ["hatchling", "hatch-vcs"]
|
|
21
|
+
build-backend = "hatchling.build"
|
|
22
|
+
|
|
23
|
+
[tool.hatch.version]
|
|
24
|
+
source = "vcs"
|
|
25
|
+
fallback-version = "0.0.0"
|
|
26
|
+
|
|
27
|
+
[tool.hatch.version.raw-options]
|
|
28
|
+
root = "../.."
|
|
29
|
+
|
|
30
|
+
[tool.hatch.build.hooks.vcs]
|
|
31
|
+
version-file = "src/mcruft_designcraft/__version__.py"
|
|
32
|
+
|
|
33
|
+
[tool.uv]
|
|
34
|
+
# Rebuild editable installs when git state changes, so hatch-vcs metadata stays current.
|
|
35
|
+
cache-keys = [{ file = "pyproject.toml" }, { git = { commit = true, tags = true } }]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# this_file: packages/mcruft_designcraft/src/mcruft_designcraft/__init__.py
|
|
2
|
+
import json
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from mcruft.engines.base import Capability
|
|
6
|
+
from mcruft.engines.cli import CliEngine, page_indexes, pixel_scale
|
|
7
|
+
from mcruft.report import Loss, Policy, Report
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
from .__version__ import __version__ as __version__
|
|
11
|
+
except ImportError:
|
|
12
|
+
from importlib.metadata import version
|
|
13
|
+
|
|
14
|
+
__version__ = version("mcruft-designcraft")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
FORMATS = ("idml", "designcraft")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DesigncraftEngine(CliEngine):
|
|
21
|
+
PRODUCT = "designcraft"
|
|
22
|
+
MIN_VERSION = "0.12.0"
|
|
23
|
+
|
|
24
|
+
def capabilities(self) -> list[Capability]:
|
|
25
|
+
routes = [
|
|
26
|
+
("convert", src, dst, "editable")
|
|
27
|
+
for src in FORMATS
|
|
28
|
+
for dst in ("pdf", "pptx", "idml", "designcraft")
|
|
29
|
+
]
|
|
30
|
+
routes += [
|
|
31
|
+
("export_pages", src, dst, policy)
|
|
32
|
+
for src in FORMATS
|
|
33
|
+
for dst, policy in (("png", "fidelity"), ("pdf", "editable"))
|
|
34
|
+
]
|
|
35
|
+
routes += [("inspect", ext, ext, "editable") for ext in FORMATS]
|
|
36
|
+
return [Capability(*row, f"{self.PRODUCT}-cli {self.MIN_VERSION}") for row in routes]
|
|
37
|
+
|
|
38
|
+
def inspect(self, path: Path) -> list[tuple[float, float]]:
|
|
39
|
+
path = Path(path)
|
|
40
|
+
if path.suffix.lower()[1:] not in FORMATS:
|
|
41
|
+
return super().inspect(path)
|
|
42
|
+
info = json.loads(self.call(["run", "--in", path, "--cmd", "document.inspect"]))
|
|
43
|
+
pages = sorted(
|
|
44
|
+
(p for spread in info["spreads"] for p in spread["pages"]),
|
|
45
|
+
key=lambda page: page["index"],
|
|
46
|
+
)
|
|
47
|
+
return [(p["bounds"][2] - p["bounds"][0], p["bounds"][3] - p["bounds"][1]) for p in pages]
|
|
48
|
+
|
|
49
|
+
def run(self, op: str, src: Path, dst: Path, *, policy: Policy, **opts) -> Report:
|
|
50
|
+
src, dst = Path(src), Path(dst)
|
|
51
|
+
self.check_route(op, src, dst, policy)
|
|
52
|
+
report = self.report(op, policy, [dst])
|
|
53
|
+
args = ["run", "--in", src]
|
|
54
|
+
if op == "export_pages":
|
|
55
|
+
pages = page_indexes(opts.get("pages"), len(self.inspect(src)))
|
|
56
|
+
if dst.suffix.lower() == ".png":
|
|
57
|
+
scale = pixel_scale(opts.get("dpi", 150))
|
|
58
|
+
# PNG export always includes bleed; remove it in this unsaved session.
|
|
59
|
+
args += ["--cmd", 'layout.documentSetup={"bleed":0}']
|
|
60
|
+
report.outputs = []
|
|
61
|
+
for page in pages:
|
|
62
|
+
out = dst.with_name(f"{dst.stem}-{page:04d}.png")
|
|
63
|
+
# --page is 0-based: sample exports match --all-pages page-(N+1).
|
|
64
|
+
self.call(
|
|
65
|
+
[*args, "--page", str(page), "--scale", str(scale), "--export", out], report
|
|
66
|
+
)
|
|
67
|
+
report.outputs.append(out)
|
|
68
|
+
report.losses.append(Loss("raster", "pages rasterised"))
|
|
69
|
+
return report
|
|
70
|
+
# PDF options use 1-based page positions, preserving order and duplicates.
|
|
71
|
+
args += ["--pdf-options", json.dumps({"pages": [i + 1 for i in pages]})]
|
|
72
|
+
self.call([*args, "--export", dst], report)
|
|
73
|
+
return report
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
engine = DesigncraftEngine()
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.1.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 1, 2)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = None
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# this_file: packages/mcruft_designcraft/tests/test_designcraft.py
|
|
2
|
+
import pytest
|
|
3
|
+
from mcruft import UnsupportedRoute
|
|
4
|
+
from mcruft.engines.cli import run_cli
|
|
5
|
+
from mcruft_designcraft import engine
|
|
6
|
+
from PIL import Image
|
|
7
|
+
from pptx import Presentation
|
|
8
|
+
from pypdf import PdfReader
|
|
9
|
+
|
|
10
|
+
pytestmark = pytest.mark.skipif(not engine.available(), reason="designcraft-cli not installed")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def test_unknown_route(tmp_path):
|
|
14
|
+
with pytest.raises(UnsupportedRoute):
|
|
15
|
+
engine.run("convert", tmp_path / "in.unknown", tmp_path / "out.unknown", policy="editable")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_declared_routes_and_page_base(tmp_path):
|
|
19
|
+
idml = tmp_path / "in.idml"
|
|
20
|
+
run_cli([engine.binary(), "run", "--sample", "--export", idml])
|
|
21
|
+
original = idml.read_bytes()
|
|
22
|
+
native = tmp_path / "in.designcraft"
|
|
23
|
+
run_cli([engine.binary(), "run", "--in", idml, "--export", native])
|
|
24
|
+
inputs = {"idml": idml, "designcraft": native}
|
|
25
|
+
exercised = set()
|
|
26
|
+
for n, cap in enumerate(engine.capabilities()):
|
|
27
|
+
dst = tmp_path / f"route-{n}.{cap.dst}"
|
|
28
|
+
if cap.op == "inspect":
|
|
29
|
+
assert engine.inspect(inputs[cap.src]) == [(612, 792)] * 4
|
|
30
|
+
else:
|
|
31
|
+
report = engine.run(
|
|
32
|
+
cap.op, inputs[cap.src], dst, policy=cap.policy, pages=[2, 0, 2], dpi=36
|
|
33
|
+
)
|
|
34
|
+
assert all(p.stat().st_size > 0 for p in report.outputs)
|
|
35
|
+
if cap.dst == "pdf":
|
|
36
|
+
pdf = PdfReader(dst)
|
|
37
|
+
assert len(pdf.pages) == (3 if cap.op == "export_pages" else 4)
|
|
38
|
+
if cap.op == "export_pages":
|
|
39
|
+
assert "SPRING ISSUE · 3" in pdf.pages[0].extract_text()
|
|
40
|
+
assert pdf.pages[0].extract_text() == pdf.pages[2].extract_text()
|
|
41
|
+
assert pdf.pages[0].extract_text() != pdf.pages[1].extract_text()
|
|
42
|
+
if cap.dst == "pptx":
|
|
43
|
+
assert len(Presentation(dst).slides) == 4
|
|
44
|
+
if cap.dst in ("idml", "designcraft"):
|
|
45
|
+
assert engine.inspect(dst) == [(612, 792)] * 4
|
|
46
|
+
if cap.dst == "png":
|
|
47
|
+
assert report.outputs == [
|
|
48
|
+
dst.with_name(f"{dst.stem}-{i:04d}.png") for i in [2, 0, 2]
|
|
49
|
+
]
|
|
50
|
+
for path in report.outputs:
|
|
51
|
+
with Image.open(path) as image:
|
|
52
|
+
assert image.size == (306, 396)
|
|
53
|
+
assert report.outputs[0].read_bytes() != report.outputs[1].read_bytes()
|
|
54
|
+
exercised.add((cap.op, cap.src, cap.dst, cap.policy))
|
|
55
|
+
assert {
|
|
56
|
+
(c.op, c.src, c.dst, c.policy) for c in engine.capabilities() if c.verified_with
|
|
57
|
+
} <= exercised
|
|
58
|
+
# Compare the CLI's all-pages render with individual pages: --page is 0-based.
|
|
59
|
+
all_dir = tmp_path / "reference"
|
|
60
|
+
run_cli(
|
|
61
|
+
[
|
|
62
|
+
engine.binary(),
|
|
63
|
+
"run",
|
|
64
|
+
"--in",
|
|
65
|
+
idml,
|
|
66
|
+
"--cmd",
|
|
67
|
+
'layout.documentSetup={"bleed":0}',
|
|
68
|
+
"--scale",
|
|
69
|
+
"0.5",
|
|
70
|
+
"--all-pages",
|
|
71
|
+
all_dir,
|
|
72
|
+
]
|
|
73
|
+
)
|
|
74
|
+
report = engine.run("export_pages", idml, tmp_path / "all.png", policy="fidelity", dpi=36)
|
|
75
|
+
assert len(report.outputs) == 4
|
|
76
|
+
for i, path in enumerate(report.outputs):
|
|
77
|
+
assert path.read_bytes() == (all_dir / f"page-{i + 1:03d}.png").read_bytes()
|
|
78
|
+
pdf_report = engine.run("export_pages", native, tmp_path / "all.pdf", policy="editable")
|
|
79
|
+
assert len(PdfReader(pdf_report.outputs[0]).pages) == 4
|
|
80
|
+
assert idml.read_bytes() == original, "Removing export bleed must not modify the source"
|