본문 바로가기

SCRIPT

나만의 유튜브 영상 다운로더 by using bash YOUTUBE DOWNLOADER 만들기 원도우즈를 사용하거나, 맥, 하물며 리눅스를 사용하는 유저들을 위한 유튜브 동영상 다운로드 유틸은 널려있다. 그러나 일부는 유료이고, 또 어떤 프로그램은 잘 작동하는 듯 하더니, 예기치 않은 오류나 에러를 뱉어내곤하여 사용자들로 하여금 불만의 목소리를 듣곤한다. 이번에는 CLI(Command Line Interface)를 이용해 누구나 쉽게 유튜브에 올라와 있는 동영상을 자신의 컴퓨터로 다운받을 수 있는 방법을 알아보고자 한다. 우선 설명은 맥(MAC) 기준으로 설명을 하려고 한다. 그러나 리눅스는 물론이거니와 윈도우즈 사용자도 크게 다르지 않으니 쉽게 익힐 수 있는 방법이다.1. 준비 맥을 사용하는 사용자라면 Spotlight Search 를 눌러 'termin.. 더보기
[MAC TIP] Key Press Action with AppleScript This is an AppleScript to act like a keyboard action. Run a script like this in AppleScript Editor: activate application "Firefox" repeat 100times tell application "System Events" to keystroke "a" using command down delay (random number from 0.5 to 5) end repeat - More examples:tell application "System Events" key code 123 using {shift down, command down} -- shift-command-left endset old to (pat.. 더보기
[Applescript] How to detect page loading status using applescript and chrome This is far from rocket science but I haven’t seen it posted so I’m going to put it here for posterity. This is how you can detect if a page is loaded in chrome with applescript. This is a subroutine, so you can put it at the end of your program and call it with this line checkForLoading() Ok, here’s the subroutine. on CheckForLoading() # checks chrome to see if the frontmost tab is loaded tell .. 더보기
[MAC TIP] Mac에 Homebrew 설치하기 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" OSX 용 패키기 관리자인 Homebrew를 맥에 설치하는 것을 알아보고자 합니다. 위의 코드를 터미널에 붙여넣기 하면 됩니다. 설치 과정중 만약 애플의 개발도구인 Xcode 가 설치되어 있지 않으면 아래와 같은 경고창이 뜨게 됩니다. 그러면 그냥 인스톨 하면 됩니다. 잘 다운되고 있네요. 다운이 끝나면 설치가 이루어 집니다. 잘 설치 되었다고 나오네요. 다시 터미널로 돌아온 후 엔터(RETURN)키를 쳐줍니다. 관리자 패스워드를 물어보는데, 이는 사용자 계정의 패스워드를 넣어주면 Homebrew 설치가 계속 진행됩니다. 네.. 설치가 잘 되었다.. 더보기
[Bash] Photos, Files auto sorting script on Windows,Linux,Mac by dates setlocal enabledelayedexpansion set /p input=Enter the target directory:%=% set RawData=!input!\*.* set target_folder=x:\ for %%a in ("%RawData%") do ( echo Processing %%~nxa ... set File=%%~fa for /f "tokens=1* delims=," %%a in ('wmic datafile where "name='!File:\$ echo %%~nxa: !LastModified! set cYear=!LastModified:~0,4! set cMonth=!LastModified:~4,2! set cDay=!LastModified:~6,2! set TimeStamp.. 더보기