A question and answer plaform that supports multiple(WIP!) terminal Q&A interactions and navigation.
Project description
PyQuest
PyQuest is a linked list based question and answer platform for your terminal. This acts very similar to quest lines where each answer correlates to specific paths Ever find yourself in need of a Q&A loop for your program? Here's the solution! Build out a JSON or YAML file with your questions and answers, choose a display and get back the answers.
Coming Features
In no particular order here are some addtional features I plan to implement. If you have a feature please request it in the issues section.
- Standard I/O based modules
- New Question and Answer Types:
- Free Text
- Select all that apply
- Optional Questions
- Second Screen for Cruses based modules to print info to
- Encrypted answer templates
- Scored quests
- PyQuest Builder, to aid in mapping your quest I know the current config is messy to make manually, but I plan to make a builder to assist and visualize
Installation
It is highly recommended to install from Pip.
From pip
pip install pyquest
Build from source
git clone https://github.com/causeImCloudy/PyQuest.git
cd PyQuest
python -m build
pip install dist/PyQuest<>.whl
Configuration
The base configuration is a JSON or YAML file.
{
"first_question": "1",
"timed": false,
"scored": false,
"<ID>": {
"question": {
"viewable_text": "What is your name?",
"next_question": "<NEXT_QUESTION_ID>",
#
Null
means
disabled
"previous_question": "<PREV_QUESTION_ID>",
#
Null
means
disabled
"validator": {
#
This
is
only
used
with
some
printer
formats
"type": "REGEX/DIGIT/MATH",
"regex": "/d"
}
},
"answers": [
{
"viewable_text": "John"
},
{
"viewable_text": "Bob",
"value": 2
},
{
"viewable_text": "Fred",
"value": 2,
"validator": {
}
}
]
},
"<ID2>": {
}
}
Usage
PyQuest can be used in the command line or from within your application.
Command Line
PyQuest can be used u
usage: PyQuest.py [-h] [-q QUESTIONS] [-D] -i CONFIG [-t] [-p]
options:
-h, --help show this help message and exit
-q QUESTION, --question QUESTION
Question to ask first
-D, --debug Enable debug logging of the command line. This is logged to log.txt
-i CONFIG, --config CONFIG
Path to the configuration file.
-t, --timed WIP!!! Force timed completion of the quest.
-p, --scored WIP!!! Scored completion of the quest.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyquest_dnd-0.1.0.tar.gz.
File metadata
- Download URL: pyquest_dnd-0.1.0.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf862f82799f484c6c271596779b8e23ebec024ecdede0669e08b3a28c47b225
|
|
| MD5 |
fa2b417a35297a0a9bb2a857dfa0234d
|
|
| BLAKE2b-256 |
bfd3aa015ec5e8fe969df13847f2a83f4bd232d46849e92f0b4ac28ec291f05a
|
File details
Details for the file PyQuest_dnd-0.1.0-py3-none-any.whl.
File metadata
- Download URL: PyQuest_dnd-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83ac77c51342b851e640455cf96ed6fa17bfc26749be2a6dcaf8cf07c68e2498
|
|
| MD5 |
c9e15930fbc8ad0ee0fc4e51052c4464
|
|
| BLAKE2b-256 |
b9395ed87a9257091fb54c116fc011332ef3389b721a2add882acea11353f9b4
|