Last active
December 22, 2015 12:59
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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