-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: import location from icalendar file #9
Comments
Any plans for this? Would to be able to import the location of my lectures. |
I would very much appreciate this feature. Should I subscribe to the mailing list and ask there or has @luukvbaal asked already? Is anyone working on this? |
I don't think so. No need to report on the ML if already reported here. Writing a patch and filing a FR would be appreciated, though! |
I cloned the repo and will play a bit with it, don't expect anything just yet though, I've never contributed code to FOSS before. |
I started looking into implementing this missing feature... Adding the location field seems to churn the spaghetti a bit, but I thought we might get away with appending info like the location to the note. |
Adding it to the note sounds fine. It might even make sense to add more generic support for additional headers to the note format. Suggestion:
Everythin following the separator |
There are some tacit assumptions, so I will elaborate a little ("header" is called property in RFC 5545 parlance).
Only properties of value type TEXT are taken into account. This is fine, and there is no doubt that it can be implemented. But there are several complications.
At present, calcurse creates the note file when a DESCRIPTION is encountered. It will require a major rewrite to implement the suggested note format. As a simpler (easier implemented) format I suggest the following:
The note file is created on first encounter of one of the supported properties. If more follows, each are appended to the file preceded by a separator. Single line properties are kept on a single line. The properties of interest for events and todos are CATEGORIES, CLASS, COMMENT, DESCRIPTION, LOCATION, RESOURCES, STATUS, TRANSP, CONTACT, RELATED-TO. |
Properties of type INTEGER could also be imported in this way: PRIORITY (in events), PERCENT-COMPLETE (in todos), SEQUENCE. |
I would like to change the format to
The note file is created on first encounter of one of the supported properties. If more follow, each is appended to the file. Single line properties are kept on a single line, while multi-line properties have a separator appended. If DESCRIPTION comes first, the result is (almost) as originally proposed by @lfos. |
Thanks for all the suggestions! How about, instead of using the separator multiple times, having continuation lines indented (by, say, two or four spaces)?
One issue with separators is that we need to take special care of (i.e. escape) separator sequences in property values. We do not have the same issue with indentation. The main reasons for me originally suggesting that the description be a special field above the separator are:
|
??? why?
In other words, DESCRIPTION is the main contents of the note file and must come first? Or? Proporties can appear in any order in an iCalendar object, and the solution I have in mind just appends them to the note file as they are are encountered. If that is not acceptable, I will just drop the issue. |
I'm having second thoughts about this approach. It's too constrained. |
Because with indentation, we can simply detect whether the line is a continuation line by checking whether the first character is a space, then remove the fixed predefined number of prefix spaces. If any line starts with spaces already, it will just have even more spaces in the prefixed version. With a separator, we actively need to do something about a property value that contains a line that looks like the separator.
That was one of the suggestions, yes.
As I mentioned before, that is okay, too. But it that case, the file should not longer be called "note file" because that's not a good description. I suggested "meta data" instead.
Could you please elaborate? |
I am talking about my own approach only (appending properties to the note file as they are encountered in the ical file). Aiming at an "email look" is OK with me. |
Back to start #9 (comment). Here is my interpretation with more of the boring details.
We have to decide which additional properties to support. The property name is written in lower case, but capitalized, followed by How should an empty property be handled (a property that is present in the ical file, but has no value)? The question came up recently for DESCRIPTION (#274). I am inclined to treat it as any other case (the property value is a single, empty line) unless RFC 5545 prescribes fixed values as for STATUS. Most properties may appear only once, but COMMENT may appear several times. |
Yes, I think that's a great solution, except for the fact that we cannot guarantee that the description will come in the same order when performing an import followed by an export (as you noted above). Not sure whether that's an issue, though. |
I have a PR coming up. |
Icalendar import to an item note file is extended from DESCRIPTION to LOCATION, COMMENT and STATUS for both events and todos. Addresses GitHub issue lfos#9. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Icalendar import to an item note file is extended from DESCRIPTION to LOCATION, COMMENT and STATUS for both events and todos. Addresses GitHub issue lfos#9. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
iCal import to an item note file is extended from DESCRIPTION to LOCATION, COMMENT and STATUS for both events and todos. Addresses GitHub issue #9. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
iCal import to an item note file is extended from DESCRIPTION to LOCATION, COMMENT and STATUS for both events and todos. Addresses GitHub issue #9. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Hello, I've been wondering if it's possible to amend the separator. My editor has a setting to remove all the trailing spaces. I can make it ignoring the setting for the files with the mask |
when using the
--import
option, it would be nice if location info from the ics file (if it's there) could be appended to the event description. without this I still have to go back into my outlook calendar to check where I'm going for appointments, but with that info in calcurse I'd never have to look at outlook again.is this possible?
edit: just realized that this doesn't seem to be the main place to report bugs or request features so I'll send this to the mailing list as well
The text was updated successfully, but these errors were encountered: