Hashpoll CLI is a handy tool to extend and supplement Hashpoll. It allows you to seamlessly create polls from the command line. The tool automatically gives you the code to place in the widgets section of Hashnode.
To install Hashpoll CLI, run the following command in your terminal:
pip install hashpoll-cli
This will install the tool globally on your system. You can then run the
tool by typing
hashpoll in your terminal. If it doesn't
work, then try running
python -m hashpoll.
Hashpoll CLI has many commands for you to use. Some of them are:
This is the command to create polls from the CLI.
hashpoll create [question] --option1 [option1] --option2 [option2] --option3 [option3] --option4 [option4]
- Put the question or options (if multiple words) in quotes to avoid the terminal registering this as multiple arguments.
- If you miss adding one of the options, the program will prompt you for entering them.
This is a command for viewing all details of a particular poll.
hashpoll view [Poll ID]
This is a command to vote on a specific poll.
hashpoll vote [Poll ID] [Option Number]
This is a simple command to open a poll in the default browser.
hashpoll open-poll [Poll ID]
This is a command to fetch the current data from poll responses.
hashpoll results [Poll ID]
This is handy commad to generate the Hashnode Widget Code for a particular poll.
hashpoll code [Poll ID]