Giter VIP home page Giter VIP logo

whaaaaat's Issues

Looking for a maintainer?

Hey there - judging from the open PRs and non resolved issues, it seems like the project has been stalling for the better half of the year. As we are building a mission-critical internal CLI with whaaaaat, I was wondering whether you would welcome additional maintainers. E.g., migrating to prompt toolkit 2.0 etc.

Return list of selected items

I'd like to do a loop to prompt questions for each selected item in a list. How can I et the list, len etc of the current selected list items?

Undefined variable

At line 43 of rawlist.py there is a reference to key: as there's no examples of passing a plain string as a choice, I could not figure out a reasonable fix, or make sense of the following key += 1 instruction.

default function

hi, awesome package!

is a function supplied to "default" supposed to work?

>>> from whaaaaat import prompt
>>> prompt({'name':'test','type':'input','message':'test','default':lambda a: 'DEFAULT'})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/whaaaaat/prompt.py", line 57, in prompt
    application = getattr(prompts, type).question(message, **_kwargs)
  File "/Library/Python/2.7/site-packages/whaaaaat/prompts/input.py", line 47, in question
    **kwargs
  File "/Library/Python/2.7/site-packages/prompt_toolkit/shortcuts.py", line 500, in create_prompt_application
    initial_document=Document(default),
  File "/Library/Python/2.7/site-packages/prompt_toolkit/document.py", line 83, in __init__
    assert isinstance(text, six.text_type), 'Got %r' % text
AssertionError: Got <function <lambda> at 0x1055855f0>

Offer to join the contributer's team

Hey there!
I see that the project has been stagnating for quite some time now. As I've noticed a few small bugs and possible enhancements I've already developed and placed as a PR, I would like to offer to join you guys as a contributor to push those changes to production, as one of our internal cli applications depends on whaaaaat :)

Cheers,
Deniz

Support for new lines and tabs

Hi guys, great tool! I really like it. I was wondering if would be possible to include support for \t and \n, mostly in the choices.

I would like to be able to do something like this:

{
    'value': 'foo',
    'name': 'bar \t\t some description about this',
},

Thanks a lot!!

Dynamic Question Mark

Hey there, I was wondering whether your update mentioned on April 24th includes a dynamic question mark, which would allow me to pass a lambda function to conditionally change the question mark like so:

๐Ÿณ Your Docker username:
๐Ÿ“ Your location:
# and so on

I haven't looked into the code, but I could provide a PR if wanted.

Cheers,
D

List question: Choices jump down to window bottom

Hey there,
I'm working on a small CLI based on whaaaaat and am experiencing a minor glitch, when I utilize the list type. The enclosed GIF shows how my choices initially get rendered in the right place and then jump down towards the lower end of the terminal window. Any ideas where this comes from?
Cheers,
D

GIF

Incompatible with prompt_toolkit version 2.0

As prompt_toolkit 2.0 is not compatible with 1.0 (upgrade guide). whaaaaat can not be imported right now. Errors below.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/whaaaaat/__init__.py", line 6, in <module>
    from prompt_toolkit.token import Token
ImportError: cannot import name Token

Temporary fix:

pip uninstall prompt-toolkit
pip install -Iv prompt_toolkit==1.0.15

ImportError: cannot import name 'Token' from prompt_toolkit.token

Stacktrace below: I am trying to implement a basic checkbox just to play around with the functionality
from whaaaaat import prompt File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/whaaaaat/__init__.py", line 6, in <module> from prompt_toolkit.token import Token ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/prompt_toolkit/token.py)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.