<commit_before>@PUSHD  %~dp0
@setlocal enabledelayedexpansion

@IF "%LUA_SRC%" == "" @(
    ECHO	please define LUA_SRC first, unix seperator, no quotes.
	ECHO	eg. SET LUA_SRC=E:\path\to\lua\src
    EXIT    /B  1
)

:: clean
@IF EXIST lua\$.*.h		DEL /Q /F lua\$.*.h		2> nul
@IF EXIST lua\$.*.c		DEL /Q /F lua\$.*.c		2> nul
@IF EXIST lua\*.swig	DEL /Q /F lua\*.swig	2> nul
@IF EXIST lua\*.swig.*	DEL /Q /F lua\*.swig.*	2> nul

@IF NOT EXIST lua MD lua

:: gen files
@SET	CUR_DIR=%CD%
@CD		"%LUA_SRC%"

:: h
@SET	HEADERS=luaconf.h lua.h lualib.h lauxlib.h lua.hpp
@FOR	%%F IN (%HEADERS%)	DO	@(
	@ECHO   #include "%LUA_SRC%/%%F"	>	"%CUR_DIR%\lua\$.%%F"
)

:: c
@FOR %%F in (*.c) do @(
	@ECHO	#include "%LUA_SRC%/%%F"	>	"%CUR_DIR%\lua\$.%%F"
)
@CD  %CUR_DIR%
@DEL /Q /F lua\$.lua.c
@DEL /Q /F lua\$.luac.c

:: swig.i
@gcc -E -P -dD   "%CUR_DIR%/gen-lua-swig.h" | findstr "_MAX _MIN _BIT" > "%CUR_DIR%/lua/lua.swig.i"

:: swig
@for /F "delims=" %%i in (gen-lua-swig.tpl) do @(
	@set var=%%i
	@echo !var:${LUA_SRC}=%LUA_SRC%!	>>	lua/lua.swig
)

@POPD<commit_msg>windows optimize.<commit_after>@PUSHD  %~dp0
@setlocal enabledelayedexpansion

@IF "%LUA_SRC%" == "" @(
    ECHO	please define LUA_SRC first, unix seperator, no quotes.
	ECHO	eg. SET LUA_SRC=E:\path\to\lua\src
    EXIT    /B  1
)

@SET LUA_SRC=%LUA_SRC:\=/%

:: clean
@IF EXIST lua\$.*.h		DEL /Q /F lua\$.*.h		2> nul
@IF EXIST lua\$.*.c		DEL /Q /F lua\$.*.c		2> nul
@IF EXIST lua\*.swig	DEL /Q /F lua\*.swig	2> nul
@IF EXIST lua\*.swig.*	DEL /Q /F lua\*.swig.*	2> nul

@IF NOT EXIST lua MD lua

:: gen files
@SET	CUR_DIR=%CD%
@CD		"%LUA_SRC%"

:: h
@SET	HEADERS=luaconf.h lua.h lualib.h lauxlib.h lua.hpp
@FOR	%%F IN (%HEADERS%)	DO	@(
	@ECHO   #include "%LUA_SRC%/%%F"	>	"%CUR_DIR%\lua\$.%%F"
)

:: c
@FOR %%F in (*.c) do @(
	@ECHO	#include "%LUA_SRC%/%%F"	>	"%CUR_DIR%\lua\$.%%F"
)
@CD  %CUR_DIR%
@DEL /Q /F lua\$.lua.c
@DEL /Q /F lua\$.luac.c

:: swig.i
@gcc -E -P -dD   "%CUR_DIR%/gen-lua-swig.h" | findstr "_MAX _MIN _BIT" > "%CUR_DIR%/lua/lua.swig.i"

:: swig
@for /F "delims=" %%i in (gen-lua-swig.tpl) do @(
	@set var=%%i
	@echo !var:${LUA_SRC}=%LUA_SRC%!	>>	lua/lua.swig
)

@POPD

{'fraction_non_alphanumeric': 0.2251566696508505, 'fraction_numerical': 0.005371530886302597, 'mean_word_length': 2.5141509433962264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, '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': '4072645', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1162, 'n_words': 266}