-
Notifications
You must be signed in to change notification settings - Fork 126
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: Provide an ical CLI script #226
Comments
Some further possible ideas
The conversion between different formats can also be helpful for testing that we actually correctly parse data (e.g. in unit tests comparing the actual conversion result with some pre-defined / hand-made / externally-converted expectation). If you want to see all these operations / subcommands in a very generic way, this kind of gives you a directed acyclic graph of operations to be applied on one or multiple streams of events / todos / availability slots. But that might be over-engineering. 馃槈 To get to something more practical; in addition to running the operations once as a command line script, one could use a website to do these automatically. This way, you can generate a simple link that points to an always up-to-date ics calendar generated based on the operations you configured. This is the use-case I'm currently following, as I eventually want to be able to merge all my different calendars into a single link, that has categories applied depending on the source of an event. Then, instead of setting up each calendar on all of my devices, I just need to add this single file. Moreover, I can derive a further calendar from this merged one, that publicly shows my availability without publishing any private information. |
Can anyone provide a sample script which can search an ics for an event that contains a given string in the title or an event on a specific date? |
for event in calendar.events:
if "Party" in event.name:
print("馃帀", event) The answer to your second question is in the API docs: Timeline.on PS: using a discussion would be a better place for such "how do I" questions than hijacking a semi-related issue. |
Niko, that's a great list! 馃憤 I'm sure we will find other helpful use cases. To sort with, maybe we could group them into essential and advanced commands? Just to make the implementation easier. With additional PRs we could enhance this functionality. Would that work? 馃檪 |
This isn't quite everything you want, but |
Situation
Actually I'm not sure if this is really something which could be addressed in this project. Maybe there are already other tools which does that. So it's just an crazy idea. 馃槈
From a user perspective, it could be convenient, to have a script (name it
ical
if you wish) which could print, search, or query all events.I think, it might still be useful as the
ical
script uses this library; the user can see, if the ics file can be successfully parsed and all events are correctly recognized. Could also help developers as they don't have to start an interactive Python session or write a separate script to parse their calendar files.Proposed Solution
If you think, this is an interesting idea, the
ical
script could support several subcommands:ical validate ICALFILE
: validates the ical file or show all the errors.ical view ICALFILE
: pretty-prints the ical fileical merge ICALFILE1 ICALFILE2
: combines two ical files into oneical search CONDITION ICALFILE
: searches for a event and expects a condition (for example, list all events which are between January and February).The text was updated successfully, but these errors were encountered: