Skip to content

Instantly share code, notes, and snippets.

@hhhenry
Last active September 22, 2023 15:45
Show Gist options
  • Save hhhenry/c9437fed0ecad011593a936370c768a5 to your computer and use it in GitHub Desktop.
Save hhhenry/c9437fed0ecad011593a936370c768a5 to your computer and use it in GitHub Desktop.
bat
@echo off
:menu
echo 1. mojo_data
echo 2. mojo_activity
echo 3. android_data
echo 4. ci_mojo_data
echo 5. ci_mojo_activity
echo 6. ci_android
echo 7. add image
echo 8. Quit
echo.
CHOICE /C 12345678 /M "Input a number"
if %errorlevel%==1 goto mojo_data
if %errorlevel%==2 goto mojo_activity
if %errorlevel%==3 goto android_data
if %errorlevel%==4 goto ci_mojo_data
if %errorlevel%==5 goto ci_mojo_activity
if %errorlevel%==6 goto ci_android
if %errorlevel%==7 goto image
if %errorlevel%==8 goto quit
:mojo_data
cd ..
move /y i.xls "Program Files"
cd "Program Files"
for /f "delims= " %%i in ('dir /tw^|findstr mojo_data.sql') do (set str=%%i)
del mojo_data%str:~5,2%%str:~8,2%.sql
ren mojo_data.sql mojo_data%str:~5,2%%str:~8,2%.sql
python excel-2-sql-script-converter.py i.xls mojo_data.sql
start "" "d:\Software\Beyond Compare\BCompare.exe"
echo.
goto menu
:mojo_activity
cd ..
move /y ia.xls "Program Files"
cd "Program Files"
for /f "delims= " %%i in ('dir /tw^|findstr mojo_data_activity.sql') do (set str=%%i)
del mojo_data_activity%str:~5,2%%str:~8,2%.sql
ren mojo_data_activity.sql mojo_data_activity%str:~5,2%%str:~8,2%.sql
python excel-2-sql-script-converter.py ia.xls mojo_data_activity.sql
start "" "d:\Software\Beyond Compare\BCompare.exe"
echo.
goto menu
:android_data
cd ..
move /y a.xlsx "Program Files"
cd "Program Files"
for /f "delims= " %%i in ('dir /tw^|findstr android_data.sql') do (set str=%%i)
del android_data%str:~5,2%%str:~8,2%.sql
ren android_data.sql android_data%str:~5,2%%str:~8,2%.sql
python excel-2-sql-script-converter.py a.xlsx android_data.sql
start "" "d:\Software\Beyond Compare\BCompare.exe"
echo.
goto menu
:ci_mojo_data
e:
cd code\mojo\protected\data
svn up
copy /y "d:\Program Files\mojo_data.sql" e:\code\mojo\protected\data
svn ci -m sql mojo_data.sql
"d:\Document\QA_UP.au3"
d:
echo.
goto menu
:ci_mojo_activity
e:
cd code\mojo\protected\data
svn up
copy /y "d:\Program Files\mojo_data_activity.sql" e:\code\mojo\protected\data
svn ci -m sql mojo_data_activity.sql
"d:\Document\QA_UP.au3"
d:
echo.
goto menu
:ci_android
e:
copy /y "d:\Program Files\android_data.sql" e:\
del mojo_data.sql
ren android_data.sql mojo_data.sql
cd code\gf\protected\data
svn up
copy /y "e:\mojo_data.sql" e:\code\gf\protected\data
svn ci -m sql mojo_data.sql
"D:\Document\android stage.au3"
d:
echo.
goto menu
:image
e:
set /p type=Input entity type
set /p id=Input entity id
cd E:\code\gf\resources\classic\mobile\image\entity\%type%
svn up
copy "E:\code\mojo\resources\classic\mobile\image\entity\%type%\large\%id%.png" E:\code\gf\resources\classic\mobile\image\entity\%type%\large\
copy "E:\code\mojo\resources\classic\mobile\image\entity\%type%\small\%id%.png" E:\code\gf\resources\classic\mobile\image\entity\%type%\small\
svn add large\%id%.png small\%id%.png
svn ci -m "image" large\%id%.png small\%id%.png
d:
echo.
goto menu
:quit
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment