Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: PH reading Calandar on webdav Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: August 10 2014 at 05:09 | IP Logged Quote krommetje

Hi all,

I write my OUTLOOK Calandar to a WEBDAV map on my Netgear NAS. The format used is *.ICS

Can PH be used to read the ICS on a webdav map so that e.g. certain appointments can be imported into PH?
It would be nice that certain appointments could be 'converted' into a TE or trigger a macro?

Here is an example from the microsoft website:
Code:

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;CN=outlook2002@company.com;ROLE=REQ-PARTICIPANT;RSV P=TRUE:MAILTO:outlook2002@company.com
ORGANIZER:MAILTO:outlook2000@company.com
DTSTART:20010823T023000Z
DTEND:20010823T030000Z
LOCATION:my office
TRANSP:OPAQUE
SEQUENCE:0
UID:040000008200E00074C5B7101A82E00800000000903FC6413F2BC101 000000000000000010000000D05E59B078F19941AD2E25FCACF8BD60
DTSTAMP:20010823T021842Z
DESCRIPTION:When: Wednesday\, August 22\, 2001 7:30 PM-8:00 PM (GMT-08:00)
Pacific Time (US & Canada)\; Tijuana.\nWhere: my
office\n\n*~*~*~*~*~*~*~*~*~*\n\n\n
SUMMARY:Important Business Meeting with 15 minute reminder
PRIORITY:5
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR


This is an example from my outlook for a late shift:

Code:

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VEVENT
CATEGORIES:Connexxion-Laat
CLASS:PUBLIC
CREATED:20140810T102821Z
DESCRIPTION:Dienstduur: 7:32 uur\nLoonuren: 7:32 uur\nDagsoort: Zondag\nDie
     nstsoort: Rijdienst\n\n
DTEND:20140810T223100Z
DTSTAMP:20140810T102821Z
DTSTART:20140810T145900Z
LAST-MODIFIED:20140810T102821Z
LOCATION:ehvgas\, Einhoven garage streek    Omschrijving:  L
PRIORITY:5
SEQUENCE:0
SUMMARY;LANGUAGE=nl:L2914
TRANSP:OPAQUE
UID:040000008200E00074C5B7101A82E0080000000060C9209CE9B3CF01 000000000000000
        010000000C6A54E7A8 40D3C4 BBBE15 6B403F8AF86
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//E
        N">\n<HTML&g t;\n&l t;HEAD >\n<META NAME="Generator" CONTENT="MS Exchange Server ve
     rsion 08.00.0681.000">\n<TITLE></TITLE>\n</HEAD& gt;\n<BODY>\n<!-- Converted f
     rom text/rtf format -->\n\n<P><FONT FACE="Calibri">Dienstduur: 7:32 uur</F
     ONT>\n\n<BR><FONT FACE="Calibri">Loonuren: 7:32 uur</FONT>\n\n<BR><FONT FA
     CE="Calibri">Dagsoort: Zondag</FONT>\n\n<BR><FONT FACE="Calibri">Dienstsoo
     rt: Rijdienst</FONT>\n</P>\n\n</BODY>\n</HT ML>
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-DISALLOW-COUNTER:FALSE
X-MS-OLK-ALLOWEXTERNCHECK:TRUE
X-MS-OLK-AUTOFILLLOCATION:FALSE
X-MS-OLK-AUTOSTARTCHECK:FALSE
X-MS-OLK-CONFTYPE:0
END:VEVENT
END:VCALENDAR

.
The event above descibes a shift starting 16:59 (4:59pm) on 10th august 2014 and ends 00:31 (12:31am) on 11th august 2014 with code L2914. In this case, the timezone should be added to DTSTART:20140810T145900Z

Could sometyhing like this work?

ph_regexdiff('DTSTART:','LAST-MODIFIED:',"[LOCAL1]",1,0)
where "[LOCAL1]" contains the entire ICS or ICS part...

Edited by krommetje - August 10 2014 at 06:33
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: August 18 2014 at 19:36 | IP Logged Quote dhoward

Peter,

I don't think your example above will give consistent results since the 'LAST-MODIFIED:' parameter doesnt necessarily always follow the 'DTSTART' parameter.

I would instead use the new ph_regexdiff2 function which uses the VB regular expression engine and allows for searching on carriage return/line feed characters. The code would look like this:

Code:
ph_regexdiff2("DTSTART:","\r\n",ph_getvar_s(1,1),1,1,0,0,0)


Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: August 19 2014 at 09:45 | IP Logged Quote krommetje

I'll look into it Dave....thanks
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum