Do you have long build time in xCode? Do you want to learn German language? This script is for you. It allows developer to learn german words during the building time, 10 new words (German-English) a day.
- Xcode 6.3+
Install gems
:
gem install pry
gem install uri
Install mpg123
:
brew install mpg123
- Create a folder in your Mac, where you will copy
script.rb
,script_runner.sh
,script_ender.sh
- Open
script_runner.sh
and change path to your local path to ruby script in line
ruby HERE_SHOULD_BE_YOUR_PATH/ruby_1.rb
- Open
script_ender.sh
and do the same with path in line
process_id=`ps aux|grep "ruby HERE_SHOULD_BE_YOUR_PATH/ruby_1.rb"|grep -v grep | awk '{ print $2 }'`
- Open
XCode
- Go to
Preferences
- Select
Behaviours
tab and inBuild
section selectStart
. Check checkboxRun
and selectscript_runner.sh
- In
Build
section selectSucceeds
. Check checkboxRun
and selectscript_ender.sh
. Do the same forFails
.
Than run the project and enjoy German words.
##Note
It is possible also translate to such languages:
- german-english
- german-chinese
- german-french
- german-italian
- german-polish
- german-portuguese
- german-russian
- german-spanish
- german-swedish
- german-turkish
To translate to differnt language do the following:
Open script.rb
and paste in line 23
version of tranlation you need instead of german-english
url = 'http://en.bab.la/dictionary/german-english/' + word
Other languages will be supported soon.
##Important
If script does not stop when you expected, go to terminal and run the script_ender.sh
script there.
##Acknowledgements
Scripton is using amasing website http://bab.la to get translation to all words that are used in the application. Great thanks to contributor Yunus Eren Guzel who made a server side of the project.