<commit_before>#coding: utf-8
import os

import importlib
import time

import subprocess

from glyphNameFormatter import GlyphName, __version__
from glyphNameFormatter.unicodeRangeNames import getAllRangeNames, getRangeByName, rangeNameToModuleName
from glyphNameFormatter.data.scriptPrefixes import SCRIPTSEPARATOR, SCRIPTASPREFIX
from glyphNameFormatter.exporters.analyseConflicts import findConflict


def getExportVersionNumber():
    commitNumber = subprocess.check_output(["git", "rev-list", "HEAD", "--count"], cwd=os.path.dirname(__file__))
    commitNumber = commitNumber.strip()
    return "%s - git commit: %s" % (__version__, commitNumber)


def getGithubLink():
    commithash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'],  cwd=os.path.dirname(__file__))
    return "https://github.com/LettError/glyphNameFormatter/tree/%s" % commithash


def generateFlat(path, onlySupported=True, scriptSeparator=None, scriptAsPrefix=None):
    data = [
        "# Glyph Name Formatted Unicode List - GNFUL",
        "# GlyphNameFormatter version %s" % getExportVersionNumber(),
        "# Generated on %s" % time.strftime("%Y %m %d %H:%M:%S"),<commit_msg>adding github link to export<commit_after>#coding: utf-8
import os

import importlib
import time

import subprocess

from glyphNameFormatter import GlyphName, __version__
from glyphNameFormatter.unicodeRangeNames import getAllRangeNames, getRangeByName, rangeNameToModuleName
from glyphNameFormatter.data.scriptPrefixes import SCRIPTSEPARATOR, SCRIPTASPREFIX
from glyphNameFormatter.exporters.analyseConflicts import findConflict


def getExportVersionNumber():
    commitNumber = subprocess.check_output(["git", "rev-list", "HEAD", "--count"], cwd=os.path.dirname(__file__))
    commitNumber = commitNumber.strip()
    return "%s - git commit: %s" % (__version__, commitNumber)


def getGithubLink():
    commithash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'],  cwd=os.path.dirname(__file__))
    return "https://github.com/LettError/glyphNameFormatter/tree/%s" % commithash


def generateFlat(path, onlySupported=True, scriptSeparator=None, scriptAsPrefix=None):
    data = [
        "# Glyph Name Formatted Unicode List - GNFUL",
        "# GlyphNameFormatter version %s" % getExportVersionNumber(),
        "# Source code: %s" % getGithubLink(),
        "# Generated on %s" % time.strftime("%Y %m %d %H:%M:%S"),
{'fraction_non_alphanumeric': 0.1214759535655058, 'fraction_numerical': 0.0008291873963515755, 'mean_word_length': 5.333333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '921120', 'n_tokens_mistral': 747, 'n_tokens_neox': 714, 'n_words': 169}