{"id":17485814,"url":"https://github.com/p-gw/citrusbuilder.jl","last_synced_at":"2026-01-20T12:33:30.859Z","repository":{"id":37095283,"uuid":"489649478","full_name":"p-gw/CitrusBuilder.jl","owner":"p-gw","description":"Construct LimeSurveys in Julia","archived":false,"fork":false,"pushed_at":"2022-11-28T10:12:50.000Z","size":251,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T00:38:52.013Z","etag":null,"topics":["julia","limesurvey"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p-gw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-07T11:03:05.000Z","updated_at":"2022-11-29T19:58:29.000Z","dependencies_parsed_at":"2022-08-18T06:41:46.474Z","dependency_job_id":null,"html_url":"https://github.com/p-gw/CitrusBuilder.jl","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-gw%2FCitrusBuilder.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-gw%2FCitrusBuilder.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-gw%2FCitrusBuilder.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-gw%2FCitrusBuilder.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-gw","download_url":"https://codeload.github.com/p-gw/CitrusBuilder.jl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535087,"owners_count":20954570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["julia","limesurvey"],"created_at":"2024-10-19T02:08:49.369Z","updated_at":"2026-01-20T12:33:30.853Z","avatar_url":"https://github.com/p-gw.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CitrusBuilder.jl\n\n[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://p-gw.github.io/CitrusBuilder.jl/stable)\n[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://p-gw.github.io/CitrusBuilder.jl/dev)\n[![Build Status](https://github.com/p-gw/CitrusBuilder.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/p-gw/CitrusBuilder.jl/actions/workflows/CI.yml?query=branch%3Amain)\n[![Coverage](https://codecov.io/gh/p-gw/CitrusBuilder.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/p-gw/CitrusBuilder.jl)\n\nThis Julia package provides utilities to construct surveys that can be uploaded to a running [LimeSurvey](https://www.limesurvey.org/) server. \n\n## Getting started\nA minimal survey must contain a survey id and a title.\n\n```julia\nmy_survey = survey(100000, \"my survey title\")\n```\n```\nSurvey with 0 groups and 0 questions.\nmy survey title (id: 100000)\n```\n\nTo add question groups and questions to a survey the `do ... end` syntax can be used. Note that LimeSurvey requires that questions must be nested within question groups. \n\nIf we want to create a basic survey asking for the name (using a short text question) and gender of the survey participants (using a dropdown select) we can use the following constructor,\n\n```julia\ngender_options = response_scale([\n    response_option(\"f\", \"female\"),\n    response_option(\"m\", \"male\")\n])\n\nbasic_survey = survey(123456, \"A basic survey\") do\n    question_group(1, \"Basic participant information\") do\n        short_text_question(\"name\", \"Please state your full name.\", mandatory=true),\n        dropdown_list_question(\"gender\", \"Please select a gender.\", gender_options, other=true, mandatory=true)\n    end\nend\n```\n\nwhich will yield \n\n```\nSurvey with 1 group and 2 questions.\nA basic survey (id: 123456)\n└── Basic participant information (id: 1)\n    ├── Please state your full name. (id: name)\n    └── Please select a gender. (id: gender)\n```\n\nTo export your survey simply call `write`,\n\n```julia\nwrite(\"my_basic_survey.lss\", basic_survey)\n```\n\nThe resulting xml file can be imported on the server using the [LimeSurvey import function](https://manual.limesurvey.org/Surveys_-_introduction#Import_a_survey) or [CitrusAPI.jl](https://github.com/p-gw/CitrusAPI.jl).\n\nFor more details on how to use this package, please refer to the [documentation](https://p-gw.github.io/CitrusBuilder.jl/dev).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-gw%2Fcitrusbuilder.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-gw%2Fcitrusbuilder.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-gw%2Fcitrusbuilder.jl/lists"}