A simple tool for generating Amazon Echo skill JSON files from any API/JSON.
Amazon Echo JSON generator
What is the project about?
This project is a revised, open source friendly & easy editable version of the script I used in early development of my Steem Assistant for Amazon Echo. This simple script allows the user to use any public APIs that respond with a standard HTTP response to easily gather any sort of data and put it directly in the JSON file responsible for adding and customization of slots to the skill without any editing by hand necessary.
While this can be a cool little tool to reduce the amount of effort required for adding small data sets, in cases like mine, when over 5000 lines of JSON were required, this tool is all but necessary.
I personally believe that every developer working on a Amazon Echo skill with a big data set will sooner or later develop this tool for himself to automate the process. As such, I've created an easily editable and scalable script that will create JSON files for the user with truly minimal effort. The script is written in the most simple way possible, extending the length of code slightly & making it less beautiful, but allowing even newbies to programming and people who've never worked with Python to use this tool successfully to its full potential by just reading the README
file and my few comments I left in the code.
The tool requires the user to only replace 3 (optionally 4) of the present arguments with their own, and the script will, in return, create a file called by default "output.txt" in the same folder the script is in. This file contains the entire JSON output formatted correctly to be copy-pasted directly into the Amazon Echo Building tool.
Before you use it - it's important to mention that this tool does not generate the entire JSON file. It simply generates the section containing the single slot you choose to create. You need to carefully paste it in the correct section, either directly below or above your current slots. If you don't yet have any slots, I suggest adding one via the provided builder to see an example of where and how they should be located.
How does it work?
It utilizes a single function, in this case create_json()
, to allow the user to interact with the script by editing only one line of code. By supplying 3 or 4 custom arguments to the function (3 strings and potentially one list) the user can manipulate the HTTP request query and the way the script will interact with the data it received. This is shown in great detail by the example set on line 38.
The output of the example on line 38 can be seen here when used with the coinmarketcap API, asking for it's id
value as the value
of our slot, as well as adding name
and symbol
as synonyms. This script can gather data and generate over 5000 lines of code in just under one second.
Technology Stack
Python 3.4 or newer (older versions should work, but were not tested for).
Roadmap
The project is finished aside from adding potential future polish and potential new options/updates to the JSON file as the Amazon Echo product evolves and changes the way this data is stored (which has happened in the past). I'll be more than happy to keep developing it if the situation presents itself or if great suggestions are submitted.
How to contribute?
To contribute to this project, please contact me via comments under this post or contribute directly via a pull request to the project's repository.
Posted on Utopian.io - Rewarding Open Source Contributors
This post has been upvoted and picked by Daily Picked #23! Thank you for the cool and quality content. Keep going!
Don’t forget I’m not a robot. I explore, read, upvote and share manually ☺️
Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 7 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.
I upvoted your contribution because to my mind your post is at least 9 SBD worth and should receive 36 votes. It's now up to the lovely Steemit community to make this come true.
I am
TrufflePig
, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!Have a nice day and sincerely yours,
TrufflePig
Thank you for the contribution. It has been approved.
A nice little tool for Amazon Echo devs.
You can contact us on Discord.
[utopian-moderator]
Hey @jestemkioskiem I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x