sgarrity / levees

Create HTML, JSON+LD, GeoJSON and iCalendar files from an SQLite data source for Charlottetown New Years Levees.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

levees

For the last 14 years I've been maintaining a web schedule of the New Years Day levees held annually in Charlottetown, Prince Edward Island, Canada and area on my blog, ruk.ca.

This year's version is online at:

https://ruk.ca/levee-2019

In the early days, I maintained the data for the levees as a simple HTML table. As the list grew to include more levees than ever, and with a desire to emit the schedule data in a variety of forms, I began to maintain the schedule in an SQLite database, and to use a simple PHP script, included here, to generate derivatives:

  • HTML for the web page itself.
  • GeoJSON for mapping the levees.
  • GeoJSON for mapping the levees for Charlottetown-area only.
  • JSON+LD for embedded in the web page for Google Structured Data purposes.
  • iCalendar to allow the schedule to be imported into desktop and mobile calendars.

Dependencies

PHP v5.x-7.x with support installed for SQLite3

For making iCalendar files, eluceo/ical

Changelog

New for 2019

  • Added a column to the SQLite table to record whether levees are "all ages" (accessible to all people) not.
  • Code cleanup to support PHP 7.1.
  • Generate a GeoJSON file for Charlottetown-area levees only, in addition to the one that includes all levees.

License

This code is released under the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

About

Create HTML, JSON+LD, GeoJSON and iCalendar files from an SQLite data source for Charlottetown New Years Levees.


Languages

Language:HTML 72.4%Language:PHP 27.6%