module Transcriptic

require 'transcriptic/downloader'

Some parts adapted from golang.org/src/pkg/json/decode.go and golang.org/src/pkg/utf8/utf8.go

Constants

AUTOPROTOCOL_VERSION
VERSION

Attributes

ui[RW]

Public Class Methods

find_labfile(path = Dir.pwd) click to toggle source
# File lib/transcriptic.rb, line 37
def find_labfile(path = Dir.pwd)
  path = Pathname.new(path)
  path.ascend do |potential_root|
    if potential_root.entries.collect(&:to_s).include?('Labfile')
      return potential_root.join('Labfile')
    end
  end
end
home_directory() click to toggle source
# File lib/transcriptic.rb, line 46
def home_directory
  running_on_windows? ? ENV['USERPROFILE'].gsub("\\","/") : ENV['HOME']
end
logger() click to toggle source
# File lib/transcriptic.rb, line 66
def logger
  Celluloid.logger
end
mktmpdir() click to toggle source
# File lib/transcriptic.rb, line 74
def mktmpdir
  FileUtils.mkdir_p(tmp_dir)
  Dir.mktmpdir(nil, tmp_dir)
end
root() click to toggle source
# File lib/transcriptic.rb, line 33
def root
  @root ||= Pathname.new(File.expand_path('../', File.dirname(__FILE__)))
end
running_on_a_mac?() click to toggle source
# File lib/transcriptic.rb, line 54
def running_on_a_mac?
  RUBY_PLATFORM =~ /-darwin\d/
end
running_on_windows?() click to toggle source
# File lib/transcriptic.rb, line 50
def running_on_windows?
  RUBY_PLATFORM =~ /mswin32|mingw32/
end
tmp_dir() click to toggle source
# File lib/transcriptic.rb, line 70
def tmp_dir
  File.join(transcriptic_path, 'tmp')
end
transcriptic_path() click to toggle source
# File lib/transcriptic.rb, line 58
def transcriptic_path
  ENV['TRANSCRIPTIC_PATH'] || File.expand_path('~/.transcriptic')
end