Utilizing 'scdl' through Python.
I decided when I made the DOS file for a friend, to have an ASCII art look.
So I used ' for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A'
and stored my ASCII art at the bottom of the code with ':::' replacing echo.
When I came back to refining the code I ran into a bit of a wall that I am just baffled on, and would like some outside aide.
Any edit I do to the script breaks the code, where my echoed strings come out with my directory first. IE (IF 'ECHO HI', it would be "C:\location\of\file>ECHO HI")
For the most part the script works fine, but I wrote it in a rush, so some of the ends are kinda fukt.
For example.
I cant change my second condition with :2, and try to end it with goto 2.
I cant even add a MODE atop the script without it breaking.
https://gist.github.com/CristenPerret/9 ... 6342ac4d6e
Code: Select all
@echo off
SETLOCAL
@setlocal enableextensions enabledelayedexpansion
scdl --version
:: ASCII ART TRIGGER CHECK BOTTOM
:: for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
:start
cls
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
ECHO:
ECHO 1 - Download one track
ECHO 2 - Download all liked songs by a SC user
ECHO 3 - Download all songs posted by SC user
ECHO 4 - Download all posted, and liked songs by SC user
ECHO 5 - EXIT
:: the choice command
set pass=
choice /c 12345 /n /m ""
set pass=%errorlevel%
:: the choices
if errorlevel 1 set goto=1
if errorlevel 2 set goto=2
if errorlevel 3 set goto=3
if errorlevel 4 set goto=4
if errorlevel 5 set goto=exit
goto %goto%
pause
cls
:1
cls
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
Echo .
ECHO YOUR DOWNLOAD PATH WILL BEGIN FROM %cd%.
ECHO Open Batch in desired folder to change path.
Echo .
set /p URL=Paste the exact track URL Here:
IF [%URL%] == [] GOTO start
scdl -l %URL% --min-size "500k" --extract-artist --addtofile --download-archive archive.txt -c
ECHO You must face your enemies without the tools you've come to rely on.
pause
cls
goto 1
:2
cls
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
Echo .
ECHO YOUR DOWNLOAD PATH WILL BEGIN FROM %cd%.
ECHO Open Batch in desired folder to change path.
Echo .
set /p URL=Paste the SoundCloud User URL Here:
IF [%URL%] == [] GOTO start
scdl -l %URL% --min-size "500k" --extract-artist --addtofile --download-archive archive.txt -f -c
ECHO You must face your enemies without the tools you've come to rely on.
pause
goto all-likes
:3
cls
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
Echo .
ECHO YOUR DOWNLOAD PATH WILL BEGIN FROM %cd%.
ECHO Open Batch in desired folder to change path.
Echo .
set /p URL=Paste the SoundCloud User URL Here:
IF [%URL%] == [] GOTO start
scdl -l %URL% --min-size "500k" --extract-artist --addtofile --download-archive archive.txt -t -c
ECHO You must face your enemies without the tools you've come to rely on.
pause
cls
goto 3
:4
cls
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
Echo .
ECHO YOUR DOWNLOAD PATH WILL BEGIN FROM %cd%.
ECHO Open Batch in desired folder to change path.
Echo .
set /p URL=Paste the SoundCloud User URL Here:
IF [%URL%] == [] GOTO start
scdl -l %URL% --min-size "500k" --extract-artist --addtofile --download-archive archive.txt -m -c
ECHO You must face your enemies without the tools you've come to rely on.
pause
cls
goto 4
:exit
exit
:::
::: @@@@@@@@@@@@@@@@@@@@@@@@@@@@
::: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
::: @@@@@@@@SOUNDCLOUD DOWNLOADER@@@@@@@@@@@@
::: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
::: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
::: @@@@@@@@@@@@@@ '.@@@@@@@@@@@@@@@@@.--.@@@@@@@@@
::: @@@@@@@@\ @@ ¯ @@@@@@@@@@@ '¯¯ ___..@@@@@@
::: @@@@@@@@| @ .'@@@@@@@@@@
::: @@@@@@\ /@@@@@@@@
::: \ /
::: | .--'|__|'--. |
::: | /.--'/ \'--.\ |
::: __ ___ / /____\ \ ___
::: _( )( )_ | .' .''. '. | _( )__ __ __
::: ( )_| |__/ \__| |_( )( )_ (
::: / \__ )_(¯
::: _______.---./ .' COPY \_.--._ ___________
::: --''¯ _/ __ PASTA '--..
::: '' .' THE URL AND PRESS ENTER BELOW!!!
:::This trial shall test your courage to ensure you are worthy of this splendor.