poc: format event html descriptions #1283
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HTML event descriptions are difficult to read, especially when originating from marketing or tech firms.
This PoC proposes transforming event description text through a filter that strips the tag soup and formats text for easier reading on a console displays.
An alternative to my PR would be for users to configure their own formatters, and have subprocess pipe the event descriptions into the process. For example, the user could configure
~/.config/khal/config
like so:To my knowledge there's no way of knowing if an event description is going to be html, so another feature goal could be to have some kind of heuristics and only format if a number of html tags are detected.
This PoC is something I hacked together in an afternoon; as per your suggestion, I didn't want to burn too much time on it in case you reject the feature proposal. Thank you for all the work on khal, I'd love to contribute back as its worked wonders for my smooth ADHD brain.