Skip to content

escherize/nqq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Novel Question Queue

Usage:

nqq questions out-file(optional)

Ask questions from a declarative script.

Arguments:
  - questions
    edn string representing a single or collection of maps which get processed by enquire.js as prompts.
  - out-file (optional)
    [optional, answers.edn by default]

References for enquirer js:
  - for the enquire.js prompt types:
    https://github.com/enquirer/enquirer#-built-in-prompts
  - the names of `type`s:
    https://github.com/enquirer/enquirer/blob/8d626c206733420637660ac7c2098d7de45e8590/lib/prompts/index.js

Examples:
  1.
    Run:
      nqq '{:type :input :name :toy :message "Favorite toy?" :initial "top"}' && cat answers.edn
    Then hit return and nqq will print: {:toy "top"}
  2.
    Run:
      nqq '{:type :autocomplete :name :state? :message "Favorite state?" :choices ["Ca" "Tx" "Id" "Ak" "Ny"]}' && cat answers.edn
    Then hit return and nqq will print: {:toy "top"}

Dev

nbb -cp src -m nqq.core '{:type :autocomplete :name :flavor :limit 10 :initial 2 :choices ["Ca" "Tx" "Id" "Ak" "Ny"]}'

Building

# install depdencies
npm install

#run caxa to build
npx caxa@2.1.0 --input . --output nqq -- \
    "{{caxa}}/node_modules/.bin/nbb" \
    "-cp" "{{caxa}}/src" \
    "-m" "nqq.core"

Thanks

Thanks to [Michiel Borkent](https://github.com/borkdude) for [nbb](https://github.com/babashka/nbb), and the documentation about how to package a binary with it!

About

Ask and answer declarative questions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors