Skip to content

Commit

Permalink
Merge pull request #48 from ablejec/develop
Browse files Browse the repository at this point in the history
display metadata in two columns
  • Loading branch information
ablejec authored Nov 17, 2018
2 parents e5175fd + edc2994 commit 077826a
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ Temporary Items
.apdisk
Metadata.md
xCheckMetadata.md
README.RMD
25 changes: 19 additions & 6 deletions Templates/makeAssay.bat
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,9 @@ rem type README.MD
rem dir .
cls
echo ======================================
echo Assay METADATA
echo Assay METADATA
echo ======================================
rem call:showDesc %descFile%
type %descFile%
call:showDesc %descFile%
cd ..
rem copy existing files from nonversioned tree (if any)
rem robocopy X-%ID% %ID% /E
Expand Down Expand Up @@ -879,7 +878,21 @@ rem -------------------------------------------------------------------
::
:: Example: call:showDesc %descFile%
::
setlocal
For /F "TOKENS=1,2" %%A In (%~1) echo %%A %%B
SETLOCAL EnableDelayedExpansion
For /F "TOKENS=1-2 delims= " %%A In (%~1) do (
call:showTwoCol "%%A" "%%B"
)
endlocal
goto :EOF
goto :EOF
rem -------------------------------------------------------------------
:showTwoCol --- show one line
:: --- %~1 first column
:: --- %~2 second column
::
:: Example: call:showTwoCol "Item name" "Item value"
::
set "_sp= "
set "iname=%~1%_sp%"
set "iname=%iname:~0,30%"
echo %iname% %~2
goto:eof
24 changes: 19 additions & 5 deletions Templates/makeInvestigation.bat
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ copy ..\common.ini . /b > NUL
rem Display metadata
cls
echo ======================================
echo Investigation METADATA
echo Investigation METADATA
echo ======================================
type %descFile%
call:showDesc %descFile%
cd ..
rem copy existing files from nonversioned tree (if any)
rem robocopy X-%ID% %ID% /E
Expand Down Expand Up @@ -355,7 +355,21 @@ rem -------------------------------------------------------------------
::
:: Example: call:showDesc %descFile%
::
setlocal
For /F "TOKENS=1,2" %%A In (%~1) echo %%A %%B
SETLOCAL EnableDelayedExpansion
For /F "TOKENS=1-2 delims= " %%A In (%~1) do (
call:showTwoCol "%%A" "%%B"
)
endlocal
goto :EOF
goto :EOF
rem -------------------------------------------------------------------
:showTwoCol --- show one line
:: --- %~1 first column
:: --- %~2 second column
::
:: Example: call:showTwoCol "Item name" "Item value"
::
set "_sp= "
set "iname=%~1%_sp%"
set "iname=%iname:~0,30%"
echo %iname% %~2
goto:eof
30 changes: 27 additions & 3 deletions Templates/makeStudy.bat
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ copy ..\common.ini . /b > NUL
rem Display metadata
cls
echo ======================================
echo Study METADATA
echo Study METADATA
echo ======================================
type %descFile%
call:showDesc %descFile%
cd ..
rem copy existing files from nonversioned tree (if any)
rem robocopy X-%ID% %ID% /E
Expand Down Expand Up @@ -272,4 +272,28 @@ setlocal enableextensions disabledelayedexpansion
rem echo Selected file is "%my_file%"
(endlocal
set "%~2=%my_file%")
goto :eof
goto :eof
rem -------------------------------------------------------------------
:showDesc --- show description file in columns
:: --- %~1 file name
::
:: Example: call:showDesc %descFile%
::
SETLOCAL EnableDelayedExpansion
For /F "TOKENS=1-2 delims= " %%A In (%~1) do (
call:showTwoCol "%%A" "%%B"
)
endlocal
goto :EOF
rem -------------------------------------------------------------------
:showTwoCol --- show one line
:: --- %~1 first column
:: --- %~2 second column
::
:: Example: call:showTwoCol "Item name" "Item value"
::
set "_sp= "
set "iname=%~1%_sp%"
set "iname=%iname:~0,30%"
echo %iname% %~2
goto:eof
30 changes: 27 additions & 3 deletions makeProject.bat
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ copy ..\common.ini . /b > NUL
rem Display metadata
cls
echo ======================================
echo project METADATA
echo project METADATA
echo ======================================
type %descFile%
call:showDesc %descFile%
cd..
rem copy existing files from nonversioned tree (if any)
rem robocopy X-%ID% %ID% /E
Expand Down Expand Up @@ -282,4 +282,28 @@ setlocal enableextensions disabledelayedexpansion
rem echo Selected file is "%my_file%"
(endlocal
set "%~2=%my_file%")
goto :eof
goto :eof
rem -------------------------------------------------------------------
:showDesc --- show description file in columns
:: --- %~1 file name
::
:: Example: call:showDesc %descFile%
::
SETLOCAL EnableDelayedExpansion
For /F "TOKENS=1-2 delims= " %%A In (%~1) do (
call:showTwoCol "%%A" "%%B"
)
endlocal
goto :EOF
rem -------------------------------------------------------------------
:showTwoCol --- show one line
:: --- %~1 first column
:: --- %~2 second column
::
:: Example: call:showTwoCol "Item name" "Item value"
::
set "_sp= "
set "iname=%~1%_sp%"
set "iname=%iname:~0,30%"
echo %iname% %~2
goto:eof

0 comments on commit 077826a

Please sign in to comment.