This is Google's cache of http://vapid.dhs.org/research/ldoce-0.0.2-cmd-exec.txt. It is a snapshot of the page as it appeared on 12 May 2013 19:41:59 GMT. The current page could have changed in the meantime. Learn more
Tip: To quickly find your search term on this page, press Ctrl+F or ⌘-F (Mac) and use the find bar.

Text-only version
 
Remote command execution ldoce 0.0.2
Larry W. Cashdollar
3/28/2013


Ldoce

Easily interface with the Longman Dictionary of Contemporary English API from Ruby:

NB currently mac only as it depends on the afplay command.

https://github.com/markburns/ldoce

Ldoce passes an mp3 url to commandline for audio output of the pronunciation of a dictonary word:

If the URL or filename for the mp3 files contain shell metacharacters
code can be executed remotely as the client:

[./ldoce-0.0.2/lib/ldoce/word.rb]

      if mp3?
        unless File.exists? filename
          command = "curl #{mp3_url} -silent > {filename}"
          `{command}`
        end
        `afplay #{filename}`
      end