# Path: shmaplib/constants.py
# DIR_SOURCES = os.path.normpath(os.path.join(DIR_ROOT, "sources"))


import sys
import os
import glob
import logging
import argparse
import shmaplib
from shmaplib.constants import DIR_SOURCES
    exporter.parse()
    if not test_mode:
        exporter.export()


def main():
    parser = argparse.ArgumentParser(description="Converts intermediate json data files to the web application data format.")
    parser.add_argument('-t', '--test', action='store_true', required=False, help="Run in test mode. This does not output any file")
    parser.add_argument('-v', '--verbose', action='store_true', required=False, help="Verbose output")
    parser.add_argument('-a', '--all', action='store_true', required=False, help="Convert all raw files to our json format")
    parser.add_argument('-e', '--explicit-numpad-keys', action='store_true', required=False, help="Numpad keys don't have the same action as main keys")
    parser.add_argument('file', nargs='?', help="File to convert (Ignored if -a flag is set)")

    args = parser.parse_args()
    if not args.all and args.file is None:
        print("Missing arguments file and outputfile, use -h flag for help")
        return
    if args.file is not None:
        args.file = os.path.abspath(args.file)

    # Verbosity setting on log
    log.setLevel(logging.INFO)
    if args.verbose:
        log.setLevel(logging.DEBUG)

    # Test mode
    test_mode = args.test

    # If --all flag is set, convert all application intermediate data
    if args.all:

# Path: shmaplib/constants.py
# DIR_SOURCES = os.path.normpath(os.path.join(DIR_ROOT, "sources"))


# Path: utils/export_intermediate_data.py
import sys
import os
import glob
import logging
import argparse
import shmaplib
from shmaplib.constants import DIR_SOURCES

    exporter.parse()
    if not test_mode:
        exporter.export()


def main():
    parser = argparse.ArgumentParser(description="Converts intermediate json data files to the web application data format.")
    parser.add_argument('-t', '--test', action='store_true', required=False, help="Run in test mode. This does not output any file")
    parser.add_argument('-v', '--verbose', action='store_true', required=False, help="Verbose output")
    parser.add_argument('-a', '--all', action='store_true', required=False, help="Convert all raw files to our json format")
    parser.add_argument('-e', '--explicit-numpad-keys', action='store_true', required=False, help="Numpad keys don't have the same action as main keys")
    parser.add_argument('file', nargs='?', help="File to convert (Ignored if -a flag is set)")

    args = parser.parse_args()
    if not args.all and args.file is None:
        print("Missing arguments file and outputfile, use -h flag for help")
        return
    if args.file is not None:
        args.file = os.path.abspath(args.file)

    # Verbosity setting on log
    log.setLevel(logging.INFO)
    if args.verbose:
        log.setLevel(logging.DEBUG)

    # Test mode
    test_mode = args.test

    # If --all flag is set, convert all application intermediate data
    if args.all:

        search_dir = os.path.join(DIR_SOURCES, '*', 'intermediate', '*.json')