On 3 Oct 2002 at 10:59, Bill Nalen wrote:

> I've successfully hooked up my Java conduit (on Windows) to the JPluck
> parser code.  This is what it does:
> 
>       user hits hotsync button
>       read plucker.ini and grab all the section headings from plucker desktop
>       run JPluck parser with the info (url, doc name, etc.) from the ini section
>       sync the resulting records to the palm

Hi Bill,

This sounds great.

> To do:
>       find some way to select which channel should run automatically using
> the conduit (Robert?)

There is an autoupdate_mode= key in the PLUCKER_DAEMON section that was decided to ba 
a good 
generic place to put the mode of what to do to update. There is a current_mode=3 for 
update due 
channels when I hit the hotsync button. Perhaps there should be one more also, 
autoupdate_mode=4 for update all channels when I hit the hotsync button. 

[PLUCKER_DAEMON]
autoupdate_mode=3

You may wish to check to see if autoupdate_mode =0, =1, or =2 and not do updates on 
syncs if 
the key is set to one of those, so that your users don't do a double update, (an 
earlier pre-
sync update of the channel, and then also an update when press hotsync button).

For deciding on whether a channel is due, there are 4 keys, similar to the RSS 
standard.

update_enabled=1

update_frequency=1

update_period=daily

update_base=2002-10-02T22:57:00

update_enabled means it is scheduled to become due at some point. 0 would mark it as 
never due.

The update_base, frequency, and period are the components to describe a due behaviour. 
The base 
date in this case is oct 02 at 22:57, and it becomes due every 1 day from that time. 
The 
update_base uses the recommended W3C spec for time (it has a capital T in the middle, 
between 
end of date and start of time).

So to decide if a channel is due, just have to read an update_base, and add on the 
frequency * 
period, then compare that calculated time to current time and see if it thus due. 

After the channel is updated, the update_base gets advanced by update_periods until 
its next 
calculated due date is in the future. (The update_base doesn't just advance one 
update_period 
alone, to handle the case where the computer has been abandoned for awile).
So the conduit would just write the new update_base key and it wouldn't be due.

Best wishes,
Robert


_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev

Reply via email to