Submission Form Scripts
Created by Hugo van Kemenade (@hugo)
The easiest way to submit a bot to Botwiki.org is using the Submit Your Bot submission form. Hugo created a Python script that hooks into the spreadsheet with submitted data, parses it, creates an image thumbnail from the URL associated with the bot and saves both the image and the information provided by the bot into a properly formatted
This significantly speeds up adding new bots, because the only things that need to be done manually are
- running the script
- compressing the image(s), ideally using Trimage (Windows, OSX, Linux) - this will be also be automated
- clean up the bot description, if necessary
You will need to download and install Python, if necessary (the script was tested with Python 2.7). Open your terminal inside the folder with the scripts and install the dependencies:
pip install -r requirements.txt
**Note:* On Linux, you will need to build PhantomJS from source, which...takes a while (30 minutes or more).*
Now, you will also need to obtain API keys:
- Head to Google Developers Console and create a new project.
- Under "API & auth", in the API enable "Drive API".
- Go to "Credentials" and select "Add credentials -> Service account". 3.b You might have to set a name for your app; can be anything, really.
- For key type, choose "JSON".
- A download will start, save the file as "botsheeter.json" in the folder with scripts.
- Copy the
client_emailvalue and send it to one of the core members of the Botwiki.org/Botmakers.org team so they can whitelist this email.
Finally, you will need
optipng to compress the screenshots (see #53). Installing these will vary depending on your OS, so please do a quick online search.
python botsheeter.py (or
python botsheeter.py -h for help). The generated content will be saved inside the