 
 
 scraperwiki.shellEscape = (command) ->
-  # useful for making variables "safe" for inclusion in exec commands.
+  ###
+  Useful for making variables "safe" for inclusion in exec commands.
+  ###
   "'#{command.replace(/'/g,"'\"'\"'")}'"
 
 



scraperwiki.alert = (title, message, level=0) ->
  # [title] and [message] should be html strings. The first is displayed in bold.
  # If [level] is a truthful value, the alert is printed in red.
  $a = $('<div>').addClass('alert').prependTo('body')
  $a.addClass('alert-error') if level
  $a.html """<button type="button" class="close" data-dismiss="alert">&times;</button> <strong>#{title}</strong> #{message}"""


scraperwiki.readSettings = ->
  # returns dataset and tool settings from the current tool's URL hash
  return null if window.location.hash is ''
  hash = window.location.hash.substr(1)
  try



scraperwiki.tool.sql.meta = (success, error) ->
  ###
  Get info about this tool's internal SQL database.
  [success] and [error] callbacks are optional,
  since this returns a jQuery deferred object on which
  you can chain .done() and .fail() handlers.
  ###
  settings = scraperwiki.readSettings()
  options =
    url: "#{settings.source.url}/sql/meta"
