Arg0s1080 / mrz

Machine Readable Zone generator and checker for official travel documents sizes 1, 2, 3, MRVA and MRVB (Passports, Visas, national id cards and other travel documents)
GNU General Public License v3.0
328 stars 122 forks source link

README before creating an issue or asking by email #31

Open Arg0s1080 opened 3 years ago

Arg0s1080 commented 3 years ago

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

fields_distribution

#!/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")

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](https://github.com/Arg0s1080/mrz/tree/master/mrz/special_cases) (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
ganeshkumarmachint commented 9 months ago

Im getting error no module found mrz, what to do ? importing errors how to resolve this issue