diff --git a/Makefile.yaml b/Makefile.yaml index 364e913..cd8e6b2 100644 --- a/Makefile.yaml +++ b/Makefile.yaml @@ -213,8 +213,8 @@ mkdir -p ${pandoc_template_dir} git clone https://github.com/ryangrose/easy-pandoc-templates ${pandoc_template_dir} fi - mkdir ${app_dir}/dist - pandoc README.md -f markdown -o ansible_taskrunner/build/README.html --template=${pandoc_template_dir}/html/clean_menu.html --toc + if ! test -d ${app_dir}/dist;then mkdir ${app_dir}/dist;fi + pandoc README.md -f markdown -o ansible_taskrunner/build/README.html --template=${pandoc_template_dir}/html/easy_template.html --toc cd ${app_dir} python setup.cx_freeze.py bdist_msi zipapp: diff --git a/ansible_taskrunner/files/macros/default.mac b/ansible_taskrunner/files/macros/default.mac index 46ee940..4b82aed 100644 --- a/ansible_taskrunner/files/macros/default.mac +++ b/ansible_taskrunner/files/macros/default.mac @@ -27,6 +27,5 @@ pwd = cd qq=exit rm = del $* rmr = echo 'Recursively Deleting $* ... $T rmdir /s /q $* $T echo Finished deleting $* -start-tutorial = (explorer C:\PROGRA~2\ANSIBL~1\README.html && tasks --help) sudo = runas /user:administrator $* yum="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -sta -ExecutionPolicy Unrestricted -File "%~dp0scripts\$1.ps1" -package $2 \ No newline at end of file diff --git a/ansible_taskrunner/files/start-tutorial.bat b/ansible_taskrunner/files/start-tutorial.bat new file mode 100644 index 0000000..d3b1e8d --- /dev/null +++ b/ansible_taskrunner/files/start-tutorial.bat @@ -0,0 +1,45 @@ +@echo off +:: Ghost typer +setlocal enableextensions enabledelayedexpansion + +set lines=3 + +set "line1=tasks --help" +set "line2=." +set "line3=." + +echo Enter in 'tasks --help' to display basic usage +ping localhost -n 1 >NUL + +call :example +tasks --help + +call :wait 1 + +echo Launching README in 5 seconds ... +call :wait 5 +explorer C:\PROGRA~2\ANSIBL~1\README.html + +goto :EOF + +:wait +ping localhost -n %~1 >NUL +goto :EOF + +:example +for /f %%a in ('"prompt $H&for %%b in (1) do rem"') do set "BS=%%a" +for /L %%a in (1,1,%lines%) do set num=0&set "line=!line%%a!"&call :type +goto :EOF + +:type +set "letter=!line:~%num%,1!" +set "delay=%random%%random%%random%%random%%random%%random%%random%" +set "delay=%delay:~-2%" +if not "%letter%"=="" set /p "=a%bs%%letter%" nul 1> nul || echo Error: %~1 not found!\n!1. Install via %~2 %~3 +where "%~1" 2> nul 1> nul || echo Error: %~1 not found!\n!1. Install via %~2 echo. goto:eof \ No newline at end of file diff --git a/ansible_taskrunner/setup.cx_freeze.py b/ansible_taskrunner/setup.cx_freeze.py index c806e4a..714be4b 100644 --- a/ansible_taskrunner/setup.cx_freeze.py +++ b/ansible_taskrunner/setup.cx_freeze.py @@ -21,6 +21,7 @@ # Include support files include_files = [ 'build/README.html', +'files/start-tutorial.bat', 'files/tasks-console.bat', 'files/cfg', 'files/macros'