aa-vimeo-downloader
A gem for App Academy students which downloads the day's videos and places them into a folder, labeled in their intended order, to be viewed without an internet connection.
Install
gem install aavimeodl
Usage
aavimeodl [week+day] [url to readme raw]
"<week+day>" could be w4d1, w2d2, etc.
To get the url for the readme raw, simply navigate to the README.md file and select raw. Once your screen is filled with plain, unformatted text, grab the url.
Here's an example where the user wants to download all the week 2, day 4 videos (with the url truncated):
aavimeodl w2d4 https://raw.githubusercontent.com/appacademy/curriculum/.......
The program will make a folder called W2D4_videos and place all the day's videos in that folder. It might be smart to navigate to the user's Videos directory before running this script!
Offline Video Playback
If you don't have a video player which allows the playback speed to be adjusted, consider giving VLC a try. https://www.videolan.org/vlc/index.html
How I Turned this Into a Gem:
http://robdodson.me/how-to-write-a-command-line-ruby-gem/
http://guides.rubygems.org/specification-reference/#add_runtime_dependency
Example of an executable gem: https://github.com/qrush/hola, and the directions: http://guides.rubygems.org/make-your-own-gem/#requiring-more-files
The 1st parts here are helpful: https://bundler.io/v1.13/guides/creating_gem
How to Update this Gem
- Update the version in
lib/aavimeodl/version.rb
using major/minor - Run
rake build
gem push pkg/newest_version
Old Readme
Install
via copy-pasting this shell script into your terminal:
cd && \
git clone https://github.com/candyapplecorn/aa-vimeo-downloader.git && \
mv aa-vimeo-downloader .aa-vimeo-downloader && \
cd .aa-vimeo-downloader && \
bash install.sh && \
exec bash
Manual:
After cloning this repository, run the install shell script like so:
bash install.sh
This will add an alias to your .profile
, .bashrc
, .asliases
or .zshrc
, whichever one is found first.
The alias will allow the user to run getaavids.rb by entering getaavids
in the command line.
Troubleshooting:
If the script fails and you're using a Mac, try installing youtube-dl through brew. Once that's done, restart bash and try using the alias again (you can list all your aliases with alias -p
).
brew install youtube-dl
exec bash
getaavids ...
Dependencies
This program requires youtube-dl. I've added an automatic installer to the program, so the user doesn't have to install it manually. If you'd like to install it manually, refer to its website: https://rg3.github.io/youtube-dl/