Skip to content

Modify the psiTurk templates

Kathryn Schuler edited this page Jul 6, 2016 · 35 revisions

The next step is to modify the psiTurk templates for use with your experiment.

  1. Anatomy of a psiTurk project
  2. Modifying the psiTurk templates

Anatomy of a psiTurk project

Every turkAGL experiment template is a psiTurk project. When you open a psiTurk project, you will see the following files and folders:

What is in the main template

Each of these files and folders contains important aspects of your psiTurk experiment, described here:

  • config.txt
  • a local configuration file that contains the unique settings for an individual experiment.
  • participants.db
  • a SQLLite database created by psiTurk for storing data (automatically created the first time you run)
  • server.log
  • a sever process log created by psiTurk the first time you run the server. It contains error messages and warnings (the psiTurk web server process will not print to the Terminal).
  • static
  • a folder that holds files which are not dynamically altered by the psiTurk server (e.g. images, fonts, javascript libraries, css sheets, etc)
  • templates
  • a folder that holds the HTML templates for different parts of your experiment, which are dynamically updated by the psiTurk server.

What is in the static folder

We can take a closer look inside the static folder to see exactly what it contains.

  • css
  • a folder containing the css style-sheets that describe how the HTML should be presented (e.g. layout, color, font, etc)
  • favicon.ico
  • the little icon that appears next to the URL in the browser window.
  • fonts
  • a folder containing the fonts that are used.
  • js
  • a folder containing the javascript libraries required for the experiment. util.js are some functions that support psiTurk and jsPsych is the javascript library for building psychology experiments.
  • lib
  • a folder containing all of the external javascript libraries needed by psiTurk.
  • stimuli
  • a folder containing all of the stimuli that will be used by your experiment.

With the exception of the stimuli folder, you will not need to make changes to anything in the static folder.

What is in the templates folder

We can take a closer look inside the templates folder to see exactly what it contains.

Modifying the psiTurk templates

  1. config.txt
  2. ad.html
  3. consent.html
  4. complete.html
  5. default.html
  6. error.html
  7. thanks.html

config.txt

Clone this wiki locally