pry-media is a plugin for the Pry repl. The plugin adds the option to play media items through Pry with an external media player. The media player chosen by default varies from platform to platform, although it is configurable and it can be changed to what is optimal for your personal preferences.
Despite the title and all descriptions up until this point making reference to "media" in the same sense as a music video or film, the plugin is also suitable for audio books.
The default playlist
pry-media ships with a large default playlist with topics ranging from music to religion. It is not intended to cause offense, but offer food for the brain and soul. It might not be your cup of tea. It covers Islam, which in todays climate is a touch-y topic given how widespread Islamophobia has become.
For this reason and because Pry always offers choice, there is an --import option which can import a custom playlist instead, effectively replacing the default until you choose a new playlist or revert to the default. Keep the doors of your mind open, please.
Note: "hey-dj" command is also aliased as recall-memory, hey-tiesto, hey-armin-van-buuren, and hey-piano-man.
Start with a summary of the help menu:
 pry(main)> hey-dj --help
Play media items in sequence, repeating the sequence when the end is reached:
 pry(main)> hey-dj-seq # Alternative to the above:  pry(main)> hey-dj --sequential
Play a random media item:
 pry(main)> hey-dj
Find and play a media item through a pattern match:
 pry(main)> hey-dj --match "Gift Of Love"
Find and print all media items that match a pattern:
 pry(main)> hey-dj --find "Love" ....
The --import option can be used to fetch the latest changes to the default playlist.
 pry(main)> hey-dj --import default Please wait while playlist is fetched across the wire …  pry(main)>
It can also be used to import your own playlist.
 pry(main)> hey-dj --import "https://www.mydomain.com/myplaylist.yml" Please wait while playlist is fetched across the wire …  pry(main)>
Local disk playlists are supported through the
 pry(main)> hey-dj --import "file:/home/myname/myplaylist.yml" Please wait while playlist is fetched across the wire …  pry(main)>
For more information on the
--import option, see the doc/
directory. For more information while using Pry, refer to step 1.
pry-media ships with its own alternative playlists, but you can add your own in the format described here to "~/.pry/media/user-playlists/" and they will be picked by the "hey-dj --alternative" (or "hey-dj -a" for short) command.
0. Africa And Carribean
recall-memory --import 0
recall-memory --import 1
2. Barack Hussein Obama
recall-memory --import 2
recall-memory --import 3
recall-memory --import 4
recall-memory --import 5
recall-memory --import 6
7. Islamic Ayatollah
recall-memory --import 7
8. John Fitzgerald Kennedy (JFK)
recall-memory --import 8
recall-memory --import 9
10. Poems (Rumi)
recall-memory --import 10
11. Trap Nation
recall-memory --import 11
12. Tupac Amaru Shakur
recall-memory --import 12
recall-memory --import 13
System Install (Recommended, Easiest method)
If you're using Windows, please install Ruby before going further. Then open powershell.exe (MS Windows) and enter the following:
gem install pry pry-media --no-rdoc --no-ri pry
Or open Terminal.app(Mac OS X), and enter the following:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install ruby PATH=/usr/local/bin:$PATH gem install pry pry-media --no-rdoc --no-ri pry
Local Install (Optional, Experience Required)
As long as you have a local install of 'rake', & 'bundler', at a shell:
git clone https://github.com/pry/pry-media.git cd pry-media ruby -S rake start