Quick start

Step 2: create a bot

  1. If you've installed the Turbot client from source, you'll also need to install the libraries we provide in the Turbot production system. It may take some time. If you used the installer, you can skip this step. gem install turbot-ruby-gems Because turbot executes bots in a restricted environment, you can't install your own dependencies, e.g. using bundler (though you can install turbot and turbot-ruby-gems via a Gemfile if you wish. Read more about the restricted environment we provide.)
  2. Create a blank project, replacing <bot_name> with something unique. If you're writing a bot based on the Missions website, please follow a naming convention like this: mission_[mission_number][optional_suffix], where the mission number can be found in the URL on the mission page. turbot bots:generate --bot <bot_name> --language ruby
  3. Have a look at the bot that's been created for you. It shows the minimum required to meet the Turbot specification. A valid bot simply outputs lines of JSON when executed, so you can develop and test it by running: tbruby scraper.rb Why `tbruby`? It's the ruby interpreter we bundle with the turbot installer, which includes all the gems we provide in our execution environment. If you've installed the turbot client from source, you can use your vanilla ruby: ruby scraper.rb

These instructions assume you have pip installed.

  1. Install the libraries you'll have access to in the Turbot production system. It may take some time. pip install -r https://raw.githubusercontent.com/openc/morph-docker-python/master/pip_requirements.txt (Unfortunately, you can't install your own dependencies. Read more about the restricted environment we provide here)
  2. Create a blank project, replacing <bot_name> with something unique. If you're writing a bot based on the Missions website, please follow a naming convention like this: mission_[mission_number][optional_suffix], where the mission number can be found in the URL on the mission page. turbot bots:generate --bot <bot_name> --language python
  3. Have a look at the bot that's been created for you. It shows the minimum required to meet the Turbot specification. A valid bot simply outputs lines of JSON when executed, so you can develop and test it by running (try it): python scraper.py
Back Next