Skip to content

README before creating an issue or asking by email #31

@Arg0s1080

Description

@Arg0s1080

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:
aaa

  • Check that MRZ is installed (Yes, sometimes it happens xD!)

  • See distribution fields image:

fields_distribution

  • Search examples folder for a similar case:
    • [Mmmhm... this could be used!]
#!/usr/bin/python3
# -*- coding: UTF-8 -*-

from mrz.generator.td1 import *
from examples.functions.functions import open_image


print(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 default
            dictionary.cyrillic_serbian()))       # Transliteration Dictionary (latin by default)
open_image("id_cards", "Serbia.png")
  • Modify the example and run it:
from mrz.generator.td1 import TD1CodeGenerator

print(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions