CodeLanka / codeLanka-Proposals

18 stars 12 forks source link

Sri Lanka Holiday Calendar Feed #14

Open pathumego opened 9 years ago

pathumego commented 9 years ago

This is a really small project, but will be really really useful.. a Public Google Calendar could be used I guess.

Or can this be on GitHub pages and serve the iCal (https://github.com/budparr/jekyll-calendar)

pasindud commented 9 years ago

Yea this should be interesting mini project

pathumego commented 9 years ago

i will do the input if someone can set up the site :)

pasindud commented 9 years ago

I'll setup the site https://github.com/CodeLanka/sri-lanka-calendar

dhammikamare commented 9 years ago

I am maintaining a public calender of Sri Lanka holidays for my use. Hope we can use it. :) XML: https://www.google.com/calendar/feeds/kr9fgv9anqi01er9aua1a8bd3s%40group.calendar.google.com/public/basic ICAL: https://www.google.com/calendar/ical/kr9fgv9anqi01er9aua1a8bd3s%40group.calendar.google.com/public/basic.ics HTML: https://www.google.com/calendar/embed?src=kr9fgv9anqi01er9aua1a8bd3s%40group.calendar.google.com&ctz=Asia/Colombo

Reference: Ministry of Public Administration and Home Affairs, Sri Lanka

pasindud commented 9 years ago

@dhammika-marasinghe can you make a small script that fetch data from that xml and writes to https://github.com/budparr/jekyll-calendar/blob/master/_data/events.yaml

ishan-marikar commented 9 years ago

This might be of interest to you: https://db.tt/5S4dVa54 .. I use it with my outlook.

ishan-marikar commented 9 years ago

I'll do a bit of research on the structure of ical files and then try my hand at coding a parser for it.

ishan-marikar commented 9 years ago

Well, instead of parsing it, I just converted it into a csv file and then converted that into JSON/XML.

pasindud commented 9 years ago

That works too, the JSON schema must be bit agile, can guys post a example JSON with one event and the metadata.

ishan-marikar commented 9 years ago
[
    {
         "title"  : "National Day",
         "description" : "Independence day of Sri Lanka",
         "start-date" : "2015-02-04",
         "end-date" : "2015-02-04",
         "type" : [
              "Mercantile",
              "Bank"
          ]
    }
] 

What about this?

EDIT: Included start/end data and type

pasindud commented 9 years ago

Start date end Date ( for incase ) Type - Mercantile || Bank (important)

I think this is ok for a base :+1:

pathumego commented 9 years ago

Hi Guys!

I think rather than maintaining a Google calendar its better to have this on GH with GH pages serving the website and the iCal feed, if possible. That way anyone can fork the repo add a calendar days and send a PR. Or can use issues.

And options to modify the feed to include the needed days would be awesome.

Other educational and recreational calendars

These can be important for apps and blogs.

pasindud commented 9 years ago

The only reason for Google Calendar is to allow non tech people to contribute too, and google kind dose the work of generating xml, json and Ical

pasindud commented 9 years ago

JSON google calendar https://www.google.com/calendar/feeds/kr9fgv9anqi01er9aua1a8bd3s%40group.calendar.google.com/public/basic?&alt=json

pasindud commented 9 years ago

https://github.com/CodeLanka/common-data-sri-lanka/pull/6

pathumego commented 9 years ago

ok I agree, how about rest of the suggestions?

Options to modify the feed to include the needed days would be awesome.

- Holidays Public
- Holidays Bank
- Holidays Merc.

Other educational and recreational calendars

- Important National Days / Weeks
- Important birthdays
- History
ishan-marikar commented 9 years ago

@pathumego @pasindud What about an API that basically does that? Something like:

../calendar?calendar_type=history&holiday_type=public&from=01011992&to=31122015

(Show all public holidays from the History calendar within the range of 01st of January, 1992 until 31st December, 2015)

pasindud commented 9 years ago

Lets keep holidays file and history as two (separation of concerns)

/history 

from
to
/holiday

from
to
holiday_type

API should also have paging to deal with large set of data.

ishan-marikar commented 9 years ago

calendar/holidays/?from=01011992&to=31122015 calendar/history/?from=01011992&to=31122015

pathumego commented 9 years ago

@pasindud @ishan-marikar guys Im not very well informed about technology, but I can comment on the users angle or UX of the project :)

pathumego commented 9 years ago

ok so to be clear I think there should be 3 kinds (or even more custom kinds?) of events on the non-holiday section as mentioned above.

pasindud commented 9 years ago

you mean something called "other calendar", where stuff that is not a holiday or history goes to ?. if so Good Idea works well :+1:

pathumego commented 9 years ago

well, not really, The definition/contents of 'history' is not clear here i guess.

What is clear (and a separate calendar for sure) is - Important National Days / Weeks calendar.( ie: National Dengue Day week, Scouts Job Week)

Rest could be other calendar/ calendars as @pasindud suggests

pasindud commented 9 years ago

Let's maybe work on the holiday and history first to see how this works out.

pasindud commented 9 years ago

@dhammika-marasinghe @ishan-marikar can you guys look into the tech side of this think u have a commit access to the repo's, if not let me know

prasadsw commented 9 years ago

@pasindud What's the status of this project? do we have a proper iCal calendar in place? are we regularly updating it?

pathumego commented 9 years ago

@pahans @pasindud What do we do about this?

pasindud commented 9 years ago

I think @ishan-marikar was going to do something about this

ishan-marikar commented 9 years ago

Yes, I was going to do something about this, but I don't really know what I should do. .___.