Last active
December 31, 2015 15:39
-
-
Save bobismijnnaam/8008770 to your computer and use it in GitHub Desktop.
Creation script I use often at the start of my projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
IF "%1"=="header" GOTO HeaderFile | |
IF "%1"=="source" GOTO SourceFile | |
IF "%1"=="class" GOTO Class | |
GOTO DisplayHelp | |
:DisplayHelp | |
ECHO Usage: | |
ECHO create ^<FILETYPE^> ^<CLASSNAME^> | |
EXIT /B | |
:HeaderFile | |
ECHO // Author: Bob Rubbens - Knights of the Compiler>>%2.hpp | |
ECHO // Creation date: %DATE:~4, 10%>>%2.hpp | |
ECHO // Contact: http://knightsofthecompiler.worpress.com - @broervanlisa - gmail (bobrubbens)>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO|SET /p=#ifndef>>%2.hpp | |
CALL uppercase %2_HPP>>%2.hpp | |
ECHO|SET /p=#define>>%2.hpp | |
CALL uppercase %2_HPP>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO // Includes I didn't make myself>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO. // Includes I did make myself>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO #endif>>%2.hpp | |
EXIT /B | |
:SourceFile | |
ECHO // Author: Bob Rubbens - Knights of the Compiler>>%2.cpp | |
ECHO // Creation date: %DATE:~4, 10%>>%2.cpp | |
ECHO // Contact: http://knightsofthecompiler.worpress.com - @broervanlisa - gmail (bobrubbens)>>%2.cpp | |
ECHO.>>%2.cpp | |
ECHO // Includes I didn't make myself>>%2.cpp | |
ECHO.>>%2.cpp | |
ECHO. // Includes I did make myself>>%2.cpp | |
ECHO.>>%2.cpp | |
EXIT /B | |
:Class | |
:: Header part | |
ECHO // Author: Bob Rubbens - Knights of the Compiler>>%2.hpp | |
ECHO // Creation date: %DATE:~4, 10%>>%2.hpp | |
ECHO // Contact: http://knightsofthecompiler.worpress.com - @broervanlisa - gmail (bobrubbens)>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO|SET /p=#ifndef>>%2.hpp | |
CALL uppercase %2_HPP>>%2.hpp | |
ECHO|SET /p=#define>>%2.hpp | |
CALL uppercase %2_HPP>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO // Includes I didn't make myself>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO. // Includes I did make myself>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO.>>%2.hpp | |
:: Create a class too! | |
ECHO class %2 {>>%2.hpp | |
ECHO public:>>%2.hpp | |
ECHO %2();>>%2.hpp | |
ECHO ~%2();>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO private:>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO };>>%2.hpp | |
ECHO.>>%2.hpp | |
ECHO #endif>>%2.hpp | |
:: Source part | |
ECHO // Author: Bob Rubbens - Knights of the Compiler > %2.cpp | |
ECHO // Creation date: %DATE:~4, 10% >> %2.cpp | |
ECHO // Contact: http://knightsofthecompiler.worpress.com - @broervanlisa - gmail (bobrubbens) >> %2.cpp | |
ECHO.>> %2.cpp | |
ECHO // Includes I didn't make myself >> %2.cpp | |
ECHO.>> %2.cpp | |
ECHO. // Includes I did make myself >> %2.cpp | |
ECHO #include "%2.hpp" >> %2.cpp | |
EXIT /B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET STRING=%1 | |
IF [%STRING%]==[] GOTO:EOF | |
SET STRING=%STRING:a=A% | |
SET STRING=%STRING:b=B% | |
SET STRING=%STRING:c=C% | |
SET STRING=%STRING:d=D% | |
SET STRING=%STRING:e=E% | |
SET STRING=%STRING:f=F% | |
SET STRING=%STRING:g=G% | |
SET STRING=%STRING:h=H% | |
SET STRING=%STRING:i=I% | |
SET STRING=%STRING:j=J% | |
SET STRING=%STRING:k=K% | |
SET STRING=%STRING:l=L% | |
SET STRING=%STRING:m=M% | |
SET STRING=%STRING:n=N% | |
SET STRING=%STRING:o=O% | |
SET STRING=%STRING:p=P% | |
SET STRING=%STRING:q=Q% | |
SET STRING=%STRING:r=R% | |
SET STRING=%STRING:s=S% | |
SET STRING=%STRING:t=T% | |
SET STRING=%STRING:u=U% | |
SET STRING=%STRING:v=V% | |
SET STRING=%STRING:w=W% | |
SET STRING=%STRING:x=X% | |
SET STRING=%STRING:y=Y% | |
SET STRING=%STRING:z=Z% | |
ECHO %STRING% | |
EXIT /B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment