Skip to main content

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-dnd

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,
  "printer": "screen [TODO]",
  #
  This
  determins
  the
  screen
  type
  "<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
      in
      certain
      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 in the command line as follows

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyquest_dnd-0.1.1.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyQuest_dnd-0.1.1-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file pyquest_dnd-0.1.1.tar.gz.

File metadata

  • Download URL: pyquest_dnd-0.1.1.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pyquest_dnd-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4067f0701cc742dc7ccf7d25dd7c0ad1a8fdb887fcf6a3e35d0ea8cb2d48c0bb
MD5 2892786825e7bb44e2679a862f484c1a
BLAKE2b-256 767867154e90360080937ac5e80a895695f13a35c818d9db8c1ffe6ac593665c

See more details on using hashes here.

File details

Details for the file PyQuest_dnd-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: PyQuest_dnd-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for PyQuest_dnd-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48a1670920712df40f3cbe629c7e93a191b5c1e1762149ee2044bf2a52aed008
MD5 55489f759274596a6e42ee11d23c7cc6
BLAKE2b-256 2924222d7c6279cee13a8eae9f310d22b0a4e5f5814b18388b4b95c76421ccd0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page