Skip to content

Add colouration via Click#27

Open
trombonehero wants to merge 3 commits into
dmedvinsky:masterfrom
trombonehero:master
Open

Add colouration via Click#27
trombonehero wants to merge 3 commits into
dmedvinsky:masterfrom
trombonehero:master

Conversation

@trombonehero

Copy link
Copy Markdown

No description provided.

Reduce duplication of logic between this script and the icalendar
package.
This simplifies some I/O handling, but more importantly, it sets us up
to do fancier output (e.g., colour).

@dmedvinsky dmedvinsky left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Thanks for the contribution. Frankly, I haven't been using this for a long time, and I don't really mind a basically complete rewrite. But looking at the code, I have a couple of questions.

Comment thread mutt_ics/mutt_ics.py
Comment on lines -107 to -112
max_width = max(len(k) for k, v in vals)
for k, v in vals:
pad = u' ' * (max_width + 1 - len(k))
line = u'%s:%s%s' % (k, pad, v)
res.append(line)
return u'\n'.join(res)

@dmedvinsky dmedvinsky Feb 13, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There used to be a pretty table-like padding here. Can this be kept intact?

Comment thread mutt_ics/mutt_ics.py


@click.command()
@click.argument("ics_file", type=click.File('r', encoding='utf-8'), default='-')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't used click for years... This preserves the old filename/stdin behaviour, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants