Getting Started

Welcome to the CitrusBuilder Getting Started section! CitrusBuilder is a Julia package that allows you to construct LimeSurveys within Julia export their XML structure. The exported .lss files can then be imported into a running LimeSurvey instance.

Surveys can be imported by using

  1. LimeSurveys import functionality, or
  2. the RemoteControl 2 API.

If you are interested in calling the LimeSurvey RemoteControl 2 API from Julia, you can take a look at LimeSurveyAPI.jl.

Installation

At the current stage CitrusBuilder is under development and is not registered in the Julia General repository. In order to install the package you have to install it from GitHub.

To install the package open a Julia REPL and execute the following commands, which will install CitrusBuilder from the main branch of the GitHub repository.

using Pkg
Pkg.add(url="https://github.com/p-gw/CitrusBuilder.jl", rev="main")
Note

Please note that CitrusBuilder.jl is currently under active development. Therefore the provided API is subject to change. Keep this in mind if you wish to use CitrusBuilder in your project.

Now what?

Now that you have installed CitrusBuilder you can start building your surveys!

Just call

using CitrusBuilder

from the Julia REPL. You can now define your survey structure by calling the survey function. In this simple example we construct an empty survey with the survey id 123456 and the title "Getting started with CitrusBuilder".

my_survey = survey(123456, "Getting started with CitrusBuilder")
Survey with 0 groups and 0 questions.
Getting started with CitrusBuilder (id: 123456)

We can then construct question groups and questions and append! them to the survey.

group1 = question_group(1, "first question group")
append!(my_survey, group1)

question1 = short_text_question("q1", "My first question")
append!(group1, question1)

my_survey
Survey with 1 group and 1 question.
Getting started with CitrusBuilder (id: 123456)
└── first question group (id: 1)
    └── My first question (id: q1)

For a more detailed introduction to survey construction you can start by working through the tutorial on constructing a basic survey. This should give you the basic toolset to create your own surveys as fast as possible.

Once you are familiar with the basic syntax, you can continue depending on how you want to use this package. Either,