Skip to content

Instantly share code, notes, and snippets.

Created August 28, 2017 16:27
Show Gist options
  • Select an option

  • Save anonymous/eccabf6bd687242cb4b4dc154b004aaa to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/eccabf6bd687242cb4b4dc154b004aaa to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist Aug 28, 2017.
    32 changes: 32 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    ## ADDED.
    require 'net/http'

    ## What they gave me.

    # Get the job-related command line arguments. FOR DEMO
    params = Hash.new
    if ARGV[0].is_int?
    jobId = ARGV.shift
    input = ARGV.shift
    mode = ARGV.shift
    numOutputs = ARGV.shift

    # Setup the params hash. FOR DEMO.
    params = {
    "job_type" => "Job", # default to Job, since Live has used JSON for a while, so "fallback" is more likely to be Server
    "script_type" => "#{mode}",
    "id" => jobId,
    "output_groups" => [],
    "inputs" => [{'uri' => "#{input}", 'type' => "FileInput"}]
    }​






    #### WHAT I THINK I NEED:
    thefilename = ARGV.shift

    http = Net::HTTP.new('https://recording.music.unt.edu/elementalupdate.php?filename='.thefilename)
    response = http.request_get('/')