luxifer / ical Goto Github PK
View Code? Open in Web Editor NEW๐ Golang iCalendar lexer/parser implementing RFC 5545
License: MIT License
๐ Golang iCalendar lexer/parser implementing RFC 5545
License: MIT License
Sorry for creating that many issues. I don't expect you to fix them. :P
The parser chokes on inputs which use LF instead of CRLF. While this isn't RFC-compliant (and a formatter should really use CRLF), some existing iCal files in the wild using LF already exist. It would be nice to make the parser more lenient to be able to parse them.
Integrate work from https://github.com/iswangwenbin/ical
The whole blob is loaded in memory: https://github.com/luxifer/ical/blob/master/parse.go#L71
While this isn't an issue for files with a single event, this might be an issue for big exports/archives.
hi,
i got a panic on http://rpayc.com.au/news-events/event-calendar-list?format=raw&type=ical
panic: time: missing Location in call to Date
goroutine 26 [running]:
time.Date(0x7e2, 0x8, 0x16, 0xe, 0x0, 0x0, 0x0, 0x0, 0xc8f1, 0x15, ...)
/opt/go1.10.2/src/time/time.go:1313 +0x659
time.parse(0x6da4da, 0xf, 0xc420238759, 0xf, 0x0, 0x0, 0x4, 0x0, 0x70ce60, 0xc420096e50, ...)
/opt/go1.10.2/src/time/format.go:1094 +0x2ab8
time.ParseInLocation(0x6da4da, 0xf, 0xc420238759, 0xf, 0x0, 0x1, 0xed307259e, 0x854460, 0xc420069320, 0xc420069320)
/opt/go1.10.2/src/time/format.go:783 +0x62
github.com/luxifer/ical.parseDate(0xc4200997d0, 0x854460, 0x6d93a6, 0xb, 0xc4200693b8, 0x0, 0x0)
/home/andreas/go/src/github.com/luxifer/ical/parse.go:523 +0x10e
github.com/luxifer/ical.(*parser).validateEvent(0xc420249980, 0xc4200e02c0, 0xc4201ce000, 0x4)
/home/andreas/go/src/github.com/luxifer/ical/parse.go:426 +0x723
github.com/luxifer/ical.(*parser).scanDelimiter(0xc420249980, 0xf, 0x229, 0xc420238829, 0xa, 0xc4200a6480, 0x4)
/home/andreas/go/src/github.com/luxifer/ical/parse.go:227 +0x76
github.com/luxifer/ical.(*parser).scanContentLine(0xc420249980, 0x0, 0x0)
/home/andreas/go/src/github.com/luxifer/ical/parse.go:276 +0x9b6
github.com/luxifer/ical.(*parser).parse(0xc420249980, 0x25ce, 0xc4200a6440, 0x25ce)
/home/andreas/go/src/github.com/luxifer/ical/parse.go:193 +0xd2
github.com/luxifer/ical.Parse(0x70d320, 0xc42011e5c0, 0x0, 0x4, 0xc4201ee800, 0x26d9)
/home/andreas/go/src/github.com/luxifer/ical/parse.go:85 +0x1f6
main.parse(0xc4201ec000, 0x26db, 0x26db, 0x3e00, 0xc4201ec000, 0x26db, 0x0)
/home/andreas/t/crawler.go:182 +0x131
main.handle(0x688d, 0xc4200200a0, 0x48)
/home/andreas/t/crawler.go:99 +0x47a
main.main.func1()
/home/andreas/t/crawler.go:45 +0x9c
created by main.main
/home/andreas/t/crawler.go:56 +0x19e
exit status 2
Would you be interested in a patch adding an encoder?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.