Giter Site home page Giter Site logo

calfileparser's People

Contributors

bb-ricardo avatar koroban avatar lukaskaplan avatar mmottola24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

calfileparser's Issues

Multiple ATTENDEE

return one record of attendee only ?
input
ORGANIZER;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:123@456com
ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:[email protected]
ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:[email protected]
ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:[email protected]

output
[organizer;rsvp=true;partstat=accepted;role=chair] => mailto:[email protected]
[attendee;rsvp=true;partstat=needs-action;role=req-participant] => mailto:[email protected]

json output foreach

I am having trouble creating a 2-dimentional array from converted json data as structure appear to be missing parent "data".
Trying to output only "dtstart" and "summary" fields
Any suggestions would be greatly appreciated. Thanks

Timezone string contains VALUE=DATE and returns error

One of .ics cals I tried to import had this line inside VEVENT:
DTSTART;TZID=Europe/Bratislava;VALUE=DATE:20060101
which caused
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (Europe/Bratislava;VALUE=DATE)
A workaround is add a line after 309. After:
$timezone = substr($strstr, 5);
i added
$timezone=explode(";",$timezone)[0];

parse url UTF8 problems

I've just want to share something I've added to the code because when I was trying to parse an ical from an URL that has special characters, some fields where broken after saving them in my DB.

In CalFileParser.php, line 101:
Original:
return data
Improvement (found in Stack Overflow):
return mb_convert_encoding($data, 'UTF-8', mb_detect_encoding($data, 'UTF-8, ISO-8859-1', true));

If you want to add it it will be great ^-^
Thanks for your work!

Support Apple Calendars EXDATE problem

Apples Calendar app (formerly known as iCal) works very well except for one problem with the parser. It seems to skip the "extra" EXDATEs that come with the calendar. Apple composes them like this when there are several EXDATEs:

EXDATE;TZID=Europe/Stockholm:20160401T140000
EXDATE;TZID=Europe/Stockholm:20160408T140000
EXDATE;TZID=Europe/Stockholm:20160325T140000

Instead of the standard iCal way:

EXDATE:20160401T140000,20160408T140000,20160325T140000

(Dont worry about the TZID part, i regex that away)
I am not very experienced with PHP yet so that is why I need help with this small problem.
Hope you (or somebody) still are active and caring enough to help me with this. Thanks!

remote ics sometimes needs to set user agent

Sometimes the .ics file doesn't give access unless you behave like a browser. It works to replace line 106
$data = file_get_contents($file);

with something like the following:

$options = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"Cookie: foo=bar\r\n" . // check function.stream-context-create on php.net
"User-Agent: CalFileParser/1.0"
)
);

$context = stream_context_create($options);
$data = file_get_contents($file, false, $context);

Thank you!

Not an issue really. I had a vcal feed that I needed to add UIDs to before importing and this script did the heavy lifting. Thanks a ton.

Default Timezone when no X-WR-TIMEZONE is set in ics file

I'm confronted with a ics file which don't have any timezone values in it

VERSION:2.0
PRODID:xy
METHOD:PUBLISH
BEGIN:VEVENT
UID:20140925T175944CEST-0480Sdk86c@xy
DTSTAMP:20140925T155944Z
DESCRIPTION:This is a test
DTSTART:20140727T150000
DTEND:20140727T170000
SUMMARY:This is the summary
END:VEVENT

Such ics files can't be processed with your parses because

Warning: DateTime::createFromFormat() expects parameter 3 to be DateTimeZone, null given in /kunden/277447/url/CalFileParser.php on line 258

How to handle that?

Can you integrate a "default timezone" paramater which is used in such cases when the ics file has no timezone in it?

Composer

Hello,

Would you mind registering this library on packagist.org?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.