CSV to iCal (Generic) Update
Well I found some free time today and its been sitting in the back of my mind to write this little program. So far so good. I have the uploader working to my satisfaction as far as bouncing back bad files. Now I need to tie it in with users for security. The next thing I need to do is add the column configuration to the uploader. This is so that users can set what columns are what for differently formatted CSV files. Right now it is generically setup very similar to the CSV to iCal converter I wrote for my school’s calendar system. I hope to have everything but the security done tonight, although I’ve been known to surprise myself with how fast I can code sometimes. But right now I’ve got some useless Economics Homework to do. So we shall see.
Read more
CSV to iCal (Generic)
So I’ve decided I am going to write a csv to iCal(ics) converter for everybody to use. It is going to require a bit of input from the user to define what columns are what but I think its possible. If you are looking for one immediately please drop me a line and I’ll work on it all that much faster. Otherwise its gonna hang on the back burner for a while. Right now I’m a bit worried about security and anonymous file uploads. Maybe I’ll link it to users here so I can track who has access to it and control any problems there might be. I need to design a decent web interface for it too so it will be usable to the average user. Otherwise there isn’t much of a point to making it ifi people can’t use it. Gotta figure something out for this one. Get to me if you need it fast.
No commentsCSV to iCal Update 3
So right now I am trying to come up with a good name for this. I think I might actually sell it to other schools if I can get it working well enough. I have tried it against a few other school’s calendars and it works great.
I added better handling for malformed events, now instead of ignoring them, they get changed to an all day event and “****” gets added to the front of the title with a message at the end of the title telling the user to verify event details manually the old fashioned way on the web calendar.
I also added a lot of debugging code, logging code, and statistics code and the ability to turn them on and off. So now the admin can turn the logging code on and off so they don’t end up with tons of logs they don’t need. Why create a debug log with 4+ lines per event when you aren’t debugging? Most of the logs will be completely disabled in the production release anyway.
I also changed the way parameters get passed to the program through the URL. Instead of just calendar.php?Calendar_name, its now calendar.php?cal=Calendar_name. This will allow me to easily add other parameters and the order of them wont matter. Been thinking of adding a manual start and end dates but I’m not sure I should even bother.
Maybe I should add some way of turning logging on and off through the URL and some sort of username/password. We’ll see. A few more features to add before I go live like that.
I feel that I have made it far enough to call this a release. Each file was given a release version of 1.0 while the overall program has gotten a release of 0.1 Beta. I hope to be at 1.0 Beta by the end of May. Though I expect it to be sooner. Right now (as I’ve said earlier) it only works for Stevens Institute of Technology, however, since I do plan on selling it, it could be coming to your school one day. If you like the idea of subscribing to your school’s calendar, let me know and I’ll see if they would be interested.
No commentsCSV to iCal Update 2
Well, I can finally say, its done. About as done as it is going to get. I fixed the problems with the time zones, it is subscribable in Google Calendar, Thunderbird, and any other program that supports the iCalendar specification. (Basically if it allows you to import ics files) I wrote it with a cache function just in case the server gets hammered it wont be converting the csv to an ics file each time it is requested, only if the ics file is more then a certain age. If it is under a certain age, it will simply serve up the old ics file. This shouldn’t be a problem since the calendar doesn’t change that often, and when it does, it isn’t life or death that it updates right away. Maybe I’ll code in a “force update” ability to it, but we’ll see. My next project is to get a general csv to ical converter going for anybody out there. Need to work on upload file security and dealing with differently formed csv files. Not sure how I will do that, maybe have the user specify the column number of the required columns. However I will run into the problem with how to create a UID that is constant so when an event changes it doesn’t just appear as a new event on the importing calendar but rather updates the old event. I haven’t seen any csv files other then the crappy WebEvents format that Stevens uses, I will have to look around in case others include the added information for repeating events and such. My next trick will be to automatically change the dates the program grabs from WebEvents, but I think that is for another day. Right now, the converter is located at http://www.thegreatco.com/stevenscalendar/calendar.php Adding that link will get you the regular Student Life calendar (RSO Events mainly). Read more
No commentsCSV to iCal Update
So I wasted a bit more time on this today and decided to make a big change. I decided to eliminate the whole file upload, file download and then import stuff. I got the program to pull the calendar down automatically with some nice CURL work, then processed the calendar and output it automatically. What does this mean? It means you can put the url directly into something like Google Calendar and it autoupdates. This eliminates the need for the UID as well since with each update comes a complete reload of all events on the calendar. The problem I am running into now is time zone crap. The time in the CSV is GMT, but I need to account for daylight savings time. This might end up being another abandoned project to add to my list since I think it will require a complete rewrite of how times are handled. Maybe I’ll pick this up another time… I hope I do, otherwise its a shit load of wasted time.
No comments