<commit_before><commit_msg>Create newsite.cmd<commit_after>@ECHO OFF

REM -- Configuration
SET ROOT_FOLDER=D:\WWW-servers\LocalUser
SET APPCMD=%SYSTEMROOT%\System32\inetsrv\appcmd.exe

REM -- Banner
ECHO Create new site script
ECHO Copyright (c) <NAME> - Altairis, 2010-2016
ECHO.

REM -- Validate
IF .%1.==.. GOTO HELP
IF .%2.==.. GOTO HELP

IF NOT EXIST %ROOT_FOLDER%\%2 (
  ECHO ERROR: Folder %ROOT_FOLDER%\%2 not found!
  EXIT /B
)

REM -- Perform operations

ECHO Creating folder "%ROOT_FOLDER%\%2\%1"...
MKDIR %ROOT_FOLDER%\%2\%1

ECHO Creating web site "%2-%1"...
%APPCMD% ADD SITE /name:"%2-%1" /bindings:"http://%1:80" /physicalPath:"%ROOT_FOLDER%\%2\%1"
%APPCMD% SET APP "%2-%1/" /applicationPool:"AP_%2"
EXIT /B

:HELP
ECHO USAGE:
ECHO newsite site_url user_name
ECHO.
ECHO EXAMPLE:
ECHO newsite www.contoso.com contoso
{'fraction_non_alphanumeric': 0.163855421686747, 'fraction_numerical': 0.03614457831325301, 'mean_word_length': 4.161490683229814, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '3565933', 'n_tokens_mistral': 379, 'n_tokens_neox': 344, 'n_words': 86}