IRC log of #schooltool for Thursday, 2004-07-01

**** BEGIN LOGGING AT Thu Jul 1 11:42:19 2004
-->You are now talking on #schooltool11:42
---SteveA|way is now known as SteveA12:20
---You are now known as mgedmin|lunch14:55
---Disconnected (Connection timed out).16:12
**** ENDING LOGGING AT Thu Jul 1 16:12:30 2004
**** BEGIN LOGGING AT Thu Jul 1 17:44:00 2004
-->You are now talking on #schooltool17:44
-->th1a (~hoffman@pool-64-222-39-13.prov.east.verizon.net) has joined #schooltool18:20
th1aMaurius, what's the timeframe for finishing the current SchoolTool contract?18:52
SteveAth1a: I asked them to hold off on it until you'd come on board.  (They've had other stuff to do).  But, it turns out there's not much left to do.19:01
SteveAI'll dig out that information about schooltool budgets19:01
th1aThanks.19:02
-->spacedman (~rowlings@fyb028000002.lancs.ac.uk) has joined #schooltool19:08
spacedmanhi guys19:08
th1aHello.19:09
SteveAhi19:09
spacedmanis there code in the schooltool release that can build ical files from events?19:15
spacedmani think that sums up what i've been trying to do today :)19:15
th1aTrying to do it with SchoolTool or in something you're writing?19:15
spacedmanin something i'm writing.19:15
spacedmanthe ical format looks easy enough to sort out anyway...19:15
th1aI think the answer is yes.  Have you poked around the SchoolTool source?19:15
*SteveA pings mgedmin19:15
spacedmanfound the VEvent class in cal.py.. and there's some stuff in views/cal.py as well...19:15
mgedminpong19:18
mgedminiirc views/cal.py does that19:19
th1aI'm not one of the developers (yet), but I need to learn this stuff, too, so I'll play along here...19:21
th1aSo you have an event object in your app that you want to output in iCal?19:21
spacedmanmmm kinda, i may have a folder of events, or a catalog search that returns a bunch of events, and i'd like a url that returns and ical file of them. this is all in plone, but the guys on #plone are in a funny mood at the moment... steve pointed me here...19:24
th1aOh.  Plone events.19:24
th1aWell, it looks like do_GET under CalendarReadView uses pretty straightforward string replacement to build the iCal file.19:30
spacedmanmm yeah, but probably customised plone events...19:30
th1aI think views/cal.py should get you started writing a Python script for Plone.19:32
SteveAth1a: maybe you should register #schooltool with ChanServ19:32
spacedmanyeah, i'm surprised so much schooltool-specific stuff is coded in there, thought the ics functionality might have been abstracted out.19:32
th1aI'm an IRC newbie.  What's ChanServ?19:34
th1aIt looks like actually building the iCal file is so simple there isn't much point in abstracting it out.19:35
SteveA  /msg ChanServ HELP19:36
SteveA /msg ChanServ help register19:36
spacedmanfairynuff19:36
SteveAyou'll probably want to register you name with NickServ first, though, so you can be authenticated on irc19:36
spacedmanbut spose someone decides they want a different calendar format... how many things need editing? oh well, you've got to have something to refactor i spose :)19:37
th1aOne thing I haven't figured out is how SchoolTool handles requests for different content-type views of the same object.19:38
th1aWhich is what you're asking about, right?19:39
spacedmanummm not sure....19:40
th1aI'm expecting an actual BOOK in the mail about IRC today.  That should get me up to speed on these IRC issues.19:40
th1aWell, it isn't directly relevant to your immediate needs anyhow.19:40
spacedmanindeed :)19:47
spacedmani shall go look for python/libical bindings or something...19:48
SteveAspacedman: if you get something working, can you post a brief message to the schooltool list?19:52
SteveAit will be good to tell others about using parts of schooltool outside of schooltool itself.19:52
spacedmanmm okay19:55
spacedmannot sure it will use any schooltool code though, i can probably do it with ZPTs19:55
SteveAyou don't have to actually sign up to the list.  I or tom will arrange for the post to get through.19:55
SteveAok, only if you actually use schooltool code.19:55
spacedmani see the schooltool code is being used in the PloneiCalendar product, but thats the ics parser19:56
SteveAoh, cool.  I spoke to alan runyan about that a while ago, but I didn't know if they were actually using it or not19:57
th1aCan you use a page template for something that isn't XML?20:00
spacedmanhmmm i think you can... i think i wrote a product that spits out a CSV file for some data....20:02
mgedminyou can if you're careful enough20:03
spacedmanyeah, the page template just spits out whatever you want it to.20:03
spacedmanblank lines are a problem...20:03
spacedmanand you have to set the content type: <metal:block tal:define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/plain')" /><20:03
th1aSo a Python script might be easier.20:06
mgedminit was ;)20:07
mgedminthe reason we did it in a very schooltool-specific way was because we were using XP20:07
mgedminwrite the simplest thing that works, refactor it into more abstract and reusable code later20:07
spacedmanyou guys are the experts :) i guess if i want to use the code in a slightly different guise i'd have to refactor it for you first! We all win!20:09
mgedmin;)20:13
th1aIf we did need another view, say for the XML version of iCal, where would that be added?20:14
*spacedman leaves the schooltool ppl and wishes them well....20:32
<--spacedman (~rowlings@fyb028000002.lancs.ac.uk) has left #schooltool ("Client Exiting")20:32
mgedminviews/cal.py I think20:36
th1aIt would be a new class implementing a new interface?20:48
mgedminprobably20:56
mgedminon hindsight I decided that switching representations according to the HTTP accept: header wasn't a very good idea20:56
th1aSo what is the better way?21:13
mgedmindifferent urls for different representations21:14
th1aYeah.21:14
th1aDifferent URL's for different representations can become confusing when you're identifying everything by a URL, however.21:15
mgedminyes21:16
mgedminstill, /path/to/object?format=xml is more explicit than http headers21:16
th1aOh.  Using a query string.21:16
mgedminexpecially when mozilla says that it prefers text/xml to text/html21:16
th1aHm...21:17
th1aRight now, it the accept: stuff handled by Twisted code?21:18
th1aI could never track that down when I was thinking about doing RDF views.21:19
mgedminno, we handle accept: by ourselves21:20
mgedminin schooltool.main21:20
th1aAha.  There it is.21:21
<--SteveA has quit (bear.freenode.net irc.freenode.net)21:30
th1aIf Mozilla prefers text/xml to text/html, that's a pretty serious problem, isn't it?21:31
mgedminwe have a workaround21:31
th1aA Mozilla-specific workaround?  Detect the user-agent?21:32
-->SteveA (~steve@adsl-213-190-44-43.takas.lt) has joined #schooltool21:32
mgedminues21:33
mgedmincertain views have a method called chooseRepresentation21:33
mgedmine.g.21:33
mgedminlook at TimetableContentNegotiation class21:34
th1aSo it sends Mozilla the html_template, if it exists?21:57
mgedminit sends Mozilla the html_template21:59
mgedminI do not remember any checking if it exists in the code21:59
mgedminhtml_template always exists in that context21:59
th1aBut if you ask for the root resource, for example, what you get is XML.22:09
mgedminyes22:12
mgedminthat class is only used for timetable views22:13
mgedminit is up to the do_GET method of a view to decide if content type negotiation will happen or not22:13
th1aOK.  But it is going to end up being necessary throughout once more HTML views are written22:24
mgedminthat is likely22:30
mgedminbut I think it largely depends on the kind of html views that we do22:30
mgedminIf we want to make schooltool a web app, I think it would be better to create a new view package22:31
mgedminand not fix RESTful xml views with unRESTful web app22:31
---Disconnected ().22:37
**** ENDING LOGGING AT Thu Jul 1 22:37:35 2004

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!