Skip to content

Instantly share code, notes, and snippets.

@brandonpittman
Last active December 22, 2015 12:59
Show Gist options
  • Save brandonpittman/6476250 to your computer and use it in GitHub Desktop.
Save brandonpittman/6476250 to your computer and use it in GitHub Desktop.
Here's a script I wrote to import a long list of movies into the great movie database "Coin". https://github.com/hkaju/coin-rb
#!/usr/bin/env ruby
# Change "f" to a list of movies you want to watch.
f = "/Users/brandonpittman/Dropbox/Documents/Markdown/- Movies.md"
# Change "coin_db" to your coin(.rb) script.
coin = "/Users/brandonpittman/Dropbox/Documents/Code/Shell Scripts/coin"
# Import to coin.
coin_output = File.readlines(f).each { |line| `"#{coin}" a "#{line}"` }
# Wipes the original movie list.
File.truncate(f,0)
puts "Import to Coin completed!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment