-
Notifications
You must be signed in to change notification settings - Fork 23
feat: Add colours to the calendar output. #20
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
base: main
Are you sure you want to change the base?
Conversation
|
This is cool! Thank you! Yes please, make a release and we can upgrade. |
aoc-client/src/lib.rs
Outdated
| pub fn show_calendar(&self) -> AocResult<()> { | ||
| let calendar_html = self.get_calendar_html()?; | ||
| let calendar_text = from_read_with_decorator( | ||
| let calendar_text = from_read_coloured( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is probably just a quick hack for testing but ideally we'd want this behind an optional colour flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could even make coloured output as the default with a flag to revert to uncoloured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a --no-colour-calendar option. Happy to rename etc. to anything you prefer.
|
I've made a release of html2text and updated Cargo.toml to point to that. |
|
Just at that point, the calendar started displaying with extra |
|
The workaround doesn't affect the non-coloured version - depending on how you feel about it I can apply it there too. |
* Use CSS as suggested by Eric Wastl to ignore the calendar animations. * Update to html2text 0.8.0 which supports that CSS.
|
FWIW I've updated this MR to the latest html2text. |
I was sad that
aoc-cli calendarwas quite plain looking, and that motivated me to implement enough CSS support inhtml2textto fix this.Currently the Cargo.toml in this PR points to an html2text git branch; if you're otherwise happy with this change I will merge the
html2textbranch, make a release, and make another update.