Skip to content

write-entities: nicer progress status#51

Merged
stchris merged 1 commit into
alephdata:mainfrom
arp242:prog
Aug 1, 2024
Merged

write-entities: nicer progress status#51
stchris merged 1 commit into
alephdata:mainfrom
arp242:prog

Conversation

@arp242

@arp242 arp242 commented Jul 26, 2024

Copy link
Copy Markdown
Contributor

This makes two changes to make a progress status a bit nicer:

  • Print the number with thousands separator, e.g. "150_000" instead of 150000".

  • For interactive terminals it will also replace the current line rather than printing a new one. "\r" moves the cursor to the first column, and "\x1b[K" clears the line. This works on all current terminals ( where "current" means "since the 90s").

This makes two changes to make a progress status a bit nicer:

- Print the number with thousands separator, e.g. "150_000" instead of
  150000".

- For interactive terminals it will also replace the current line rather
  than printing a new one. "\r" moves the cursor to the first column,
  and "\x1b[K" clears the line. This works on all current terminals (
  where "current" means "since the 90s").

@stchris stchris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like this quite a bit, thanks for the change!

@stchris stchris merged commit dfd37b7 into alephdata:main Aug 1, 2024
@arp242 arp242 deleted the prog branch August 1, 2024 14:58
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