-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
File harvester and audio modification
removed some gems added tests for wvunpack and other console apps harvester is almost working for geting info from a file, sending it to a REST api, then moving it to the correct folder
- Loading branch information
Showing
14 changed files
with
258 additions
and
106 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,4 @@ | ||
require './lib/external/original_audio_harvester' | ||
|
||
class HomeController < ApplicationController | ||
include OriginalAudioHarvester | ||
|
||
def index | ||
=begin | ||
topdir = File.join(Rails.root,'media','harvestwaiting') | ||
harvest_paths = OriginalAudioHarvester.directory_list topdir | ||
config_files = harvest_paths.collect {|dir| OriginalAudioHarvester.config_file_path dir } | ||
file_lists = harvest_paths.collect {|dir| OriginalAudioHarvester.file_list dir} | ||
config_file_objects = config_files.collect { |file| OriginalAudioHarvester.read_config_file file } | ||
result = {} | ||
file_lists.each do |files| | ||
files.each do |file| | ||
result[file] = OriginalAudioHarvester.file_info file | ||
end | ||
end | ||
params[:testing] = result | ||
raise RuntimeError | ||
=end | ||
end | ||
end |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
# From http://stackoverflow.com/questions/170956/how-can-i-find-which-operating-system-my-ruby-program-is-running-on | ||
module OS | ||
def self.windows? | ||
|
||
def OS.windows? | ||
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil | ||
end | ||
|
||
def self.mac? | ||
def OS.mac? | ||
(/darwin/ =~ RUBY_PLATFORM) != nil | ||
end | ||
|
||
def self.unix? | ||
def OS.unix? | ||
!OS.windows? | ||
end | ||
|
||
def self.linux? | ||
def OS.linux? | ||
OS.unix? and not OS.mac? | ||
end | ||
end |
This file contains 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
Oops, something went wrong.