Table of contents
- A little widgety talk
- Repositories and URLs
- Services Diagram
- The CLI Commands
- Technologies Used
Hashpoll is a hashnode widget that enables seamless polls on any post. It is a lightweight tool that generates code for you to put in hashnode's widget field to create polls that just blend in with the rest of your content. You can use it directly from the command line or the Web interface, and use your poll as needed.
A little widgety talk
Wait, you can put polls in Hashnode now?
Yessss, that's what Hashpoll is all about. While Hashnode doesn't have an official poll option, it does have an amazing option to extend its functionality. This can be done through the use of an awesome feature called widgets.
So, how do I make a poll from this widget wizardry you speak of?
That's where Hashpoll comes in, when you create a poll on Hashpoll, it generates the required code for you to create a Hasnode widget. You just need to put this code into the required place in your blog settings as instructed here and you are golden.
Repositories and URLs
Let's get these out of the way for chaps who are just here for them.
The following diagram shows the flow of data and the underlying services used.
The whole backend with all the AWS services and the FastAPI service are created and provisioned by Amplify. Amplify handled data modelling, authentication, GraphQL API, and Docker-based deployments making the whole process a breeze.
Here is a screenshot of the data modelling process in the Amplify Studio.
The CLI Commands
The following are the commands for the Hashpoll CLI.
This is the command to create polls from the CLI.
hashpoll create [question] --option1 [option1] --option2 [option2] --option3 [option3] --option4 [option4]
python -m 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]
python -m hashpoll view [Poll ID]
This is a command to vote on a specific poll.
hashpoll vote [Poll ID] [Option Number]
python -m hashpoll vote [Poll ID] [Option Number]
This is a simple command to open a poll in the default browser.
hashpoll open-poll [Poll ID]
python -m hashpoll open-poll [Poll ID]
This is a command to fetch the current data from poll responses.
hashpoll results [Poll ID]
python -m hashpoll results [Poll ID]
This is handy command to generate the Hashnode Widget Code for a particular poll.
hashpoll code [Poll ID]
python -m hashpoll code [Poll ID]
Hashpoll is equipped with the following features as of now:
- Both CLI and Web interfaces
- Integrates seamlessly with Hashnode
- Easy to integrate with Hahsnode and other tools
- No trackers whatsoever
- Many new and exciting upcoming features
- AWS Amplify and provisioned AWS services
Following are the features we are trying to add to Hashpoll:
- Password Protection
- Ability to modify a poll
- In-depth analytics
Hashpoll has been released under the MIT License.
Hashpoll would like to thank the teams behind the following projects as they played a crucial part in enabling Hahpoll.
Please tell us if you like Hashpoll.
If you have any other suggestions, please drop an email over at email@example.com.
Thank you dear readers for reading this article, don't forget to try Hashpoll out. See you next time!