[hackerspaces] aggregating hs' icalendars
Jon Spriggs
jon at spriggs.org.uk
Tue Mar 16 11:47:58 CET 2010
On Tue, Mar 16, 2010 at 10:35 AM, Koen Martens <gmc at sonologic.nl> wrote:
> Anyway, just merging the ical files is step 1. Step 2 would be to have
> custom ical files generated based on preferences such as 'show me
> everything within 500km from The Hague, NL'. One problem with that is
> that not many ical files include machine-parseable location data. There
> is the GEO tag to add a lat/lon specification, but I don't think i've
> ever seen an ical file implementing it.
Wouldn't it be easier to merge the ical files on-the-fly, pulling the
geo data from the HS database entries? For example, see this
nearly-real-code : :)
hackerspaces = sql("SELECT hackerspace FROM hackerspaces WHERE
distance_from_my_location<50km")
foreach(hackerspaces as hackerspace) {
ical_source = array_merge(ical_from(hackerspace), ical_source)
}
sort_array(ical_source)
return(ical_source)
--
Jon "The Nice Guy" Spriggs LPIC-1 Certified
More information about the Discuss
mailing list