papyru 2.11.0.dev99__tar.gz → 2.11.0.dev108__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.
- {papyru-2.11.0.dev99/papyru.egg-info → papyru-2.11.0.dev108}/PKG-INFO +1 -1
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/constants.py +13 -1
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/manufacturer_address.py +2 -1
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/resi.py +4 -2
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/utils.py +0 -17
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108/papyru.egg-info}/PKG-INFO +1 -1
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/setup.py +1 -1
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/LICENSE.txt +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/README.md +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/bin/generate_jsonschema.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/__init__.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/auth.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/context.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/__init__.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/component.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/__init__.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/ean.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/motive.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/render_text.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/title.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/xml.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/logger.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/logger_stdout.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/logger_types.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/middleware.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/problem.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/profiler.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/resource.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/serializer.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/stack_context.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/static/__init__.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/static/apps.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/static/urls.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/static/views.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/validation.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/varspool/__init__.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/varspool/assets/Job.json +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/varspool/assets/JobStatusHistory.json +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/varspool/command/__init__.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/varspool/command/config.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/varspool/command/types.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/varspool/serializers.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/varspool/types.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/xml_helper.py +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru.egg-info/SOURCES.txt +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru.egg-info/dependency_links.txt +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru.egg-info/requires.txt +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru.egg-info/top_level.txt +0 -0
- {papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/setup.cfg +0 -0
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Constants for specific templates
|
|
3
|
+
|
|
4
|
+
These constants are used in specific templates to ensure that SVG
|
|
5
|
+
components are generated correctly, e.g.:
|
|
6
|
+
|
|
7
|
+
- https://masa.productdesignerd.puzzleandplay.de/
|
|
8
|
+
templates/single-image-4-3-landscape/structure/original
|
|
9
|
+
- https://masa.productdesignerd.puzzleandplay.de/
|
|
10
|
+
templates/box_small_500_landscape_grey/structure/original
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from .edit_template.render_text import (Alignment, HorizontalAlignment,
|
|
2
14
|
RGBAColor, VerticalAlignment)
|
|
3
15
|
|
|
4
|
-
# Preview types can be overwritten by ShopAttributes.
|
|
16
|
+
# Preview types can be overwritten by ShopAttributes in Masa.
|
|
5
17
|
PREVIEW_TYPE_BOX = 'box'
|
|
6
18
|
PREVIEW_TYPE_PARTS = 'pieces'
|
|
7
19
|
|
|
@@ -56,7 +56,8 @@ def _create_text_manufacturer_address(address: str,
|
|
|
56
56
|
alignment=MANUFACTURER_ADDRESS_ALIGNMENT,
|
|
57
57
|
font_name=MANUFACTURER_ADDRESS_FONT,
|
|
58
58
|
fg_color=MANUFACTURER_ADDRESS_COLOR_FOREGROUND,
|
|
59
|
-
bg_color=MANUFACTURER_ADDRESS_COLOR_BACKGROUND)
|
|
59
|
+
bg_color=MANUFACTURER_ADDRESS_COLOR_BACKGROUND),
|
|
60
|
+
resi_instance)
|
|
60
61
|
|
|
61
62
|
return import_into_resi(
|
|
62
63
|
text_bytes,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
from os import getpid
|
|
2
2
|
from typing import Optional
|
|
3
3
|
|
|
4
|
+
import resi
|
|
5
|
+
|
|
4
6
|
|
|
5
7
|
def import_into_resi(data: bytes,
|
|
6
|
-
resi_instance:
|
|
8
|
+
resi_instance: resi.Instance,
|
|
7
9
|
resi_url: str,
|
|
8
|
-
properties: Optional[
|
|
10
|
+
properties: Optional[resi.VersionProperties] = None,
|
|
9
11
|
disposition: Optional[str] = None
|
|
10
12
|
) -> str:
|
|
11
13
|
|
|
@@ -233,23 +233,6 @@ def delete_in_chunks(query: QuerySet,
|
|
|
233
233
|
return delete_in_chunks(query, chunk_size, chunks_to_delete)
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
def update_in_chunks(query: QuerySet,
|
|
237
|
-
chunk_size: int = 1024,
|
|
238
|
-
chunks_to_update: int = 512,
|
|
239
|
-
**update_kw_args):
|
|
240
|
-
chunks_to_update -= 1
|
|
241
|
-
rows_matched = (
|
|
242
|
-
query.model
|
|
243
|
-
.objects
|
|
244
|
-
.filter(pk__in=list(
|
|
245
|
-
query.only('pk').values_list('pk', flat=True)[:chunk_size]))
|
|
246
|
-
.update(**update_kw_args))
|
|
247
|
-
|
|
248
|
-
if rows_matched > 0 and chunks_to_update > 0:
|
|
249
|
-
return update_in_chunks(
|
|
250
|
-
query, chunk_size, chunks_to_update, **update_kw_args)
|
|
251
|
-
|
|
252
|
-
|
|
253
236
|
def cursor_to_dict(cursor) -> List[Dict[str, Union[str, int]]]:
|
|
254
237
|
columns = [col[0] for col in cursor.description]
|
|
255
238
|
return [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{papyru-2.11.0.dev99 → papyru-2.11.0.dev108}/papyru/create_variant/edit_template/render_text.py
RENAMED
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|