discourse/script/import_scripts/quandora
Jarek Radosz 52e872961a
DEV: Clean up requires (#34946)
1. remove unnecessary `.rb` filename suffixes from `require_relative`
calls
2. replace `require File.expand_path(File.dirname(__FILE__) + …` with
`require_relative`
3. remove `./` prefixes from `require_relative` calls
2025-09-24 12:00:22 +02:00
..
test DEV: Clean up requires (#34946) 2025-09-24 12:00:22 +02:00
export.rb DEV: Apply syntax_tree formatting to script/* 2023-01-09 11:13:22 +00:00
import.rb DEV: Clean up requires (#34946) 2025-09-24 12:00:22 +02:00
quandora_api.rb DEV: Apply syntax_tree formatting to script/* 2023-01-09 11:13:22 +00:00
quandora_question.rb DEV: Apply syntax_tree formatting to script/* 2023-01-09 11:13:22 +00:00
README.md

To get started, copy the config.ex.yml to config.yml, and then update the properties for your Quandora instance.

domain: 'my-quandora-domain'
username: 'my-quandora-username'
password: 'my-quandora-password'

Create the directory for the json files to export: mkdir output Then run ruby export.rb /path/to/config.yml

To import, run ruby import.rb

To run tests, include id's for a KB and Question that includes answers and comments

kb_id: 'some-kb-id'
question_id: 'some-question-id'