monich / sailfish-barcode

Barcode reader for Sailfish OS.
https://openrepos.net/content/slava/barcode
13 stars 12 forks source link

[Feature suggestion] Support import to calendar #15

Closed amaretzek closed 4 years ago

amaretzek commented 4 years ago

Codereader recognizes a vcard. But not a calendar event. I pasted it to an editor and saved as a.vcs file. In file browser opened it and got imported to calendar. How much work is it for you to implement direct import to calendar? The long way isn't for my wife... ;)

monich commented 4 years ago

Yeah, it would definitely make sense to automate that process.

monich commented 4 years ago

See commit e2fce07 - is that what you had in mind?

amaretzek commented 4 years ago

First glance: ".ics" didn't work as a file, ".vcs" did. Guess I didn't get the picture, will look at it on the WE

monich commented 4 years ago

Hmm... for me .ics seems to work. I add BEGIN:VCALENDAR in case if it's missing - could that do the trick? BTW there's a fresh build here, you can try it out.

amaretzek commented 4 years ago

Installed, verified version, but it seems not to work. After scan the clipboard icon is the default and not like for vcard, which has then a special apearance. ICS: it has this beginning. Short in time right now, continue later on. Thanks

monich commented 4 years ago

I guess I need an example of what you're trying to import. I was experimenting with something like this.

monich commented 4 years ago

.vcs does work better, indeed. And that's the suffix which the Calendar app is using when it's sharing an event e.g. via Bluetooth. I'm surprised, though - in Unix world file names shouldn't matter that much. Anyway, I have replaced .ics with .vcs in b0dd3fa. You can try the new build from OBS and see if it helps.

amaretzek commented 4 years ago

Hmm, I guess I missed something in last version, was expecting something else, and was in a hurry... I think it works as expected. What mislead me is that the clipboard icon doesn't change as for vcard and doesn't start the import... Nice! :)

monich commented 4 years ago

Submitted version 1.0.21 to Jolla Store.