Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ParseResult(
ai='7032',
description='Number of processor with three-digit ISO country code',
data_title='PROCESSOR # 2',
fnc1_required=True,
separator_required=True,
format='N3+X..27'
),
value='069804988',
Expand Down Expand Up @@ -285,7 +285,7 @@ GS1Message(
ai='00',
description='Serial Shipping Container Code (SSCC)',
data_title='SSCC',
fnc1_required=False,
separator_required=False,
format='N2+N18'
),
value='157035381410375177',
Expand Down Expand Up @@ -381,7 +381,7 @@ And we can dig into the parsed Element Strings to get all the details:
ai='01',
description='Global Trade Item Number (GTIN)',
data_title='GTIN',
fnc1_required=False,
separator_required=False,
format='N2+N14'
),
value='07032069804988',
Expand All @@ -400,7 +400,7 @@ And we can dig into the parsed Element Strings to get all the details:
ai='15',
description='Best before date (YYMMDD)',
data_title='BEST BEFORE or BEST BY',
fnc1_required=False,
separator_required=False,
format='N2+N6'
),
value='210526',
Expand All @@ -412,7 +412,7 @@ And we can dig into the parsed Element Strings to get all the details:
ai='10',
description='Batch or lot number',
data_title='BATCH/LOT',
fnc1_required=True,
separator_required=True,
format='N2+X..20'
),
value='0329',
Expand Down Expand Up @@ -471,7 +471,7 @@ GS1ApplicationIdentifier(
ai='10',
description='Batch or lot number',
data_title='BATCH/LOT',
fnc1_required=True,
separator_required=True,
format='N2+X..20'
)
```
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_gs1_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def parse(json_content: bytes) -> list[GS1ApplicationIdentifier]:
description=row["description"],
format=row["formatString"],
data_title=row["title"],
fnc1_required=row["fnc1required"],
separator_required=row["separatorRequired"],
pattern=rf"^{row['applicationIdentifier']}{_fix_pattern(row['regex'])}$",
)
)
Expand Down
4 changes: 2 additions & 2 deletions src/biip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ai='96',
description='Company internal information',
data_title='INTERNAL',
fnc1_required=True,
separator_required=True,
format='N2+X..90'
),
value='385074',
Expand Down Expand Up @@ -59,7 +59,7 @@
ai='15',
description='Best before date (YYMMDD)',
data_title='BEST BEFORE or BEST BY',
fnc1_required=False,
separator_required=False,
format='N2+N6'
),
value='210527',
Expand Down
8 changes: 4 additions & 4 deletions src/biip/gs1_application_identifiers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
ai='01',
description='Global Trade Item Number (GTIN)',
data_title='GTIN',
fnc1_required=False,
separator_required=False,
format='N2+N14'
)
>>> ai.pattern
Expand Down Expand Up @@ -54,8 +54,8 @@ class GS1ApplicationIdentifier:
data_title: str
"""Commonly used label/abbreviation for the AI."""

fnc1_required: bool
"""Whether a FNC1 character is required after element strings of this type.
separator_required: bool
"""Whether a separator character is required after element strings of this type.

This is the case for all AIs that have a variable length.
"""
Expand Down Expand Up @@ -87,7 +87,7 @@ def extract(cls, value: str) -> GS1ApplicationIdentifier:
ai='01',
description='Global Trade Item Number (GTIN)',
data_title='GTIN',
fnc1_required=False,
separator_required=False,
format='N2+N14'
)
"""
Expand Down
Loading
Loading