Last active
August 29, 2015 14:18
-
-
Save xatier/f2671dea9b7f1aaea12b to your computer and use it in GitHub Desktop.
Revisions
-
xatier revised this gist
Apr 9, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ## ## a little script to grab pronunciations from Oxford online dictionary ## ## Usage: ./oxford meteorological ## ## Author: @xatierlikelee ## License: GPL -
xatier revised this gist
Apr 9, 2015 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -34,3 +34,12 @@ say "=> http://www.oxforddictionaries.com/definition/american_english/$word"; system "mplayer -really-quiet -nolirc -user-agent chrome -prefer-ipv4 $base$query"; =foo $ oxford meticulous => http://www.oxforddictionaries.com/definition/american_english/meticulous $ oxford fledgling => http://www.oxforddictionaries.com/definition/american_english/fledgling $ oxford egoism => http://www.oxforddictionaries.com/definition/american_english/egoism =cut -
xatier created this gist
Apr 9, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #!/usr/bin/env perl use 5.018; ##################################################### ## ## How does Oxford pronounce the word ## ## a little script to grab pronunciations from Oxford online dictionary ## ## Usage: ./oxford.pl meteorological ## ## Author: @xatierlikelee ## License: GPL ###################################################### # # the uri of the pronunciation should be like this: # # http://www.oxforddictionaries.com/media/american_english/us_pron/e/ent/entre/entrepreneur__us_2.mp3 # http://www.oxforddictionaries.com/media/american_english/us_pron/r/rem/remon/remonstrate__us_1.mp3 # http://www.oxforddictionaries.com/media/american_english/us_pron/l/lau/laud_/laud__us_1.mp3 # # note, there're still some exceptions don't follow the above format :( my $base = "http://www.oxforddictionaries.com/media/american_english/us_pron/"; my $word = $ARGV[0]; my $query = (join "/", ((substr $word, 0, 1), (substr $word, 0, 3), (length $word < 5 ? $word . "_"x(5 - length $word) : substr $word, 0, 5), $word)) . "__us_1.mp3"; say "=> http://www.oxforddictionaries.com/definition/american_english/$word"; system "mplayer -really-quiet -nolirc -user-agent chrome -prefer-ipv4 $base$query";