mirror of
https://github.com/misiektoja/spotify_monitor.git
synced 2026-04-25 22:55:52 +03:00
[PR #16] [MERGED] Added feature to limit line widths printed to screen to avoid line wrapping #28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/misiektoja/spotify_monitor/pull/16
Author: @tomballgithub
Created: 7/3/2025
Status: ✅ Merged
Merged: 7/6/2025
Merged by: @misiektoja
Base:
dev← Head:truncate📝 Commits (5)
f1ce05aAdded feature to limit line widths printed to screen to avoid line wrapping6fbbda1Added TRUNCATE_CHARS to comment block with instructionse90452bChanged print_to_log() to print()1d33fe6Print error information when screen width cannot be determine automatically9e8dd16Change argument flag to match spotify_profile_monitor📊 Changes
1 file changed (+42 additions, -2 deletions)
View changed files
📝
spotify_monitor.py(+42 -2)📄 Description
I developed some simple code to limit the line widths printed to the screen to avoid line wrapping.
I find this useful when running a vertical split screen with two instances running.
I've tested it under Windows in both a standard command window and Terminal with a split screen.
The code is operating system independent.
A value of 999 will autodetect the screen width and use that width for the truncation
Note: Logging is not impacted, and the full strings are written to the log file.
I realize that this PR may not be of general interest for you to merge. No issue if so. I'm just sharing some code that might improve someone's experience.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.