You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/python3# -*- coding: UTF-8 -*-frommrz.generator.td1import*fromexamples.functions.functionsimportopen_imageprint(TD1CodeGenerator(
"ID", # Document type Normally 'I' or 'ID' for id cards"Serbia", # Country 3 letters code or country name"955555546", # Document number Special characters will be transliterated"680229", # Birth date YYMMDD"F", # Genre Male: 'M', Female: 'F' or Undefined 'X'"130724", # Expiry date YYMMDD"Serbia", # Nationality"ТЕСТ", # Surname Special characters will be transliterated"МИЛИЦА", # Given name(s) Special characters will be transliterated"2902968000000", # Optional data 1 empty string by default"", # Optional data 2 empty string by defaultdictionary.cyrillic_serbian())) # Transliteration Dictionary (latin by default)open_image("id_cards", "Serbia.png")
Modify the example and run it:
frommrz.generator.td1importTD1CodeGeneratorprint(TD1CodeGenerator("CA", # Document type Normally 'I' or 'ID' for id cards"CAN", # Country 3 letters code or country name"9B0002562", # Document number"750625", # Birth date YYMMDD"F", # Genre Male: 'M', Female: 'F' or Undefined"201029", # Expiry date YYMMDD"MOZ", # Nationality"SPECIMEN SUMBI", # Surname Special characters will be transliterated"GEESHNIKUT", # Given name(s) Special characters will be transliterated"<00185978<<<<<5", # Optional data 1"<151106<01", # Optional data 2
)) # It's not necessary to transliterate .. I can ignore it
Lets get the output:
If the output is correct: No problem. FINISH
If the output is incorrect:
I check all the steps again:
If output is correct: Nothing happens.. I had a typo or something like that. No problem. FINISH
If the output is not correct: Oops! There is probably a bug or a special case. Then preferably create an issue or alternatively ask by email
If the output is correct but i would like it to work differentely
Think if it only affects my own needs or everyone's needs (or that of many)
If it only affects me: Modify the code or write a class that overrides originals. Tip: See what's done in special cases folder (Note: Due a desing problem the name of the class must start with TD1, TD2, TD3 or Passport and must end with CodeGenerator or CodeChecker)
If it benefits to everyone (or many): Open a new issue requesting a enhancement or make a Pull Request
I understand that errors happen (I make a lot everyday), but please... I demand a minimum of effort before asking.
Thank you very much and best regards
The text was updated successfully, but these errors were encountered:
Right now I'm very busy and have very little free time. Please, before creating an issue or consulting by email, follow the following steps:
For example, If i have the following sample and i want to generate MRZ Code with MRZ Generator:
Check that MRZ is installed (Yes, sometimes it happens xD!)
See distribution fields image:
TD1
,TD2
,TD3
orPassport
and must end withCodeGenerator
orCodeChecker
)I understand that errors happen (I make a lot everyday), but please... I demand a minimum of effort before asking.
Thank you very much and best regards
The text was updated successfully, but these errors were encountered: