# Path: kiwixbuild/_global.py
# def neutralEnv(what):
#     return getattr(_neutralEnv, what)
# 
# def option(what):
#     return getattr(_options, what)


import os.path
import hashlib
import tarfile, zipfile
import tempfile
import shutil
import os, stat, sys
import urllib.request
import urllib.error
import ssl
import subprocess
from collections import namedtuple, defaultdict
from kiwixbuild._global import neutralEnv, option
        key = key_function(elem)
        if key in seen:
            continue
        seen.add(key)
        yield elem


def get_sha256(path):
    progress_chars = "/-\|"
    current = 0
    batch_size = 1024 * 8
    sha256 = hashlib.sha256()
    with open(path, 'br') as f:
        while True:
            batch = f.read(batch_size)
            if not batch:
                break
            sha256.update(batch)
            print_progress(progress_chars[current])
            current = (current+1)%4
    return sha256.hexdigest()


def colorize(text, color=None):
    if color is None:
        color = text
    return "{}{}{}".format(COLORS[color], text, COLORS[''])


def print_progress(progress):

# Path: kiwixbuild/_global.py
# def neutralEnv(what):
#     return getattr(_neutralEnv, what)
# 
# def option(what):
#     return getattr(_options, what)


# Path: kiwixbuild/utils.py
import os.path
import hashlib
import tarfile, zipfile
import tempfile
import shutil
import os, stat, sys
import urllib.request
import urllib.error
import ssl
import subprocess
from collections import namedtuple, defaultdict
from kiwixbuild._global import neutralEnv, option

        key = key_function(elem)
        if key in seen:
            continue
        seen.add(key)
        yield elem


def get_sha256(path):
    progress_chars = "/-\|"
    current = 0
    batch_size = 1024 * 8
    sha256 = hashlib.sha256()
    with open(path, 'br') as f:
        while True:
            batch = f.read(batch_size)
            if not batch:
                break
            sha256.update(batch)
            print_progress(progress_chars[current])
            current = (current+1)%4
    return sha256.hexdigest()


def colorize(text, color=None):
    if color is None:
        color = text
    return "{}{}{}".format(COLORS[color], text, COLORS[''])


def print_progress(progress):

    if option('show_progress'):