Grenadine once had an API for use with KonOpas, but now has a more generic JSON API. These are some scripts we wrote for Boskone to convert between the two formats. Your mileage may vary.
Node. You don't need to run a webserver, just use command-line Node.
There's sample input (*.json) and output (*.js) in the examples directory.
If you want to do the conversion manually, you can install Node on any machine that will run it and convert there.
- Check out this project as well.
- Open the Grenadine data in your browser from the URLs for Program and Participants listed in Grenadine under Your Event | Publishing | Publish On Your Own Web Site | JSON APIs | Type 1.
- Save the data to two files named
program.jsonandparticipants.jsonin the konopas subdirectory of this project. - Change to the konopas subdirectory.
- Type the command
node participants2people.js. - Type the command
node program2program.js.
Barring errors, this will write the output files, people.js and program.js respectively, in the same directory. You can then move them to the data directory of your KonOpas instance.
Bash. There are a few bash scripts included to do one or more of: fetching the Grenadine data (hourly, or whenever), checking if it has changed, converting it, writing it to the KonOpas data directory, and updating the KonOpas cache manifest.
To install any of these, you should have access to and understand the crontab.
cron-convert.shonly does the retrieval, difference check, and conversioncron-convert-update-manifest.shdoes the conversion and manifest updatecron-check-update-manifest.shonly does the retrieval and manifest updatecron-check-update-manifest-old.shis how it used to work, for the record
A short list of possible suffixes is included in konopas/participants2people.js; you may want to add more manually if your participants' suffixes are being misread as surnames.
There is no build process and there are no requirements; the scripts should run as-is as long as Node itself is installed.