[PR #16] [MERGED] Added feature to limit line widths printed to screen to avoid line wrapping #28

Closed
opened 2026-02-27 20:07:47 +03:00 by kerem · 0 comments
Owner

📋 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: devHead: truncate


📝 Commits (5)

  • f1ce05a Added feature to limit line widths printed to screen to avoid line wrapping
  • 6fbbda1 Added TRUNCATE_CHARS to comment block with instructions
  • e90452b Changed print_to_log() to print()
  • 1d33fe6 Print error information when screen width cannot be determine automatically
  • 9e8dd16 Change 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.

## 📋 Pull Request Information **Original PR:** https://github.com/misiektoja/spotify_monitor/pull/16 **Author:** [@tomballgithub](https://github.com/tomballgithub) **Created:** 7/3/2025 **Status:** ✅ Merged **Merged:** 7/6/2025 **Merged by:** [@misiektoja](https://github.com/misiektoja) **Base:** `dev` ← **Head:** `truncate` --- ### 📝 Commits (5) - [`f1ce05a`](https://github.com/misiektoja/spotify_monitor/commit/f1ce05a7bd7c3a6c7bfdfd8d0b95201cb4a692ee) Added feature to limit line widths printed to screen to avoid line wrapping - [`6fbbda1`](https://github.com/misiektoja/spotify_monitor/commit/6fbbda1695903e99cd2cf5b186d2111d635cc7f0) Added TRUNCATE_CHARS to comment block with instructions - [`e90452b`](https://github.com/misiektoja/spotify_monitor/commit/e90452ba60822b6e4086cf215f3bfdcb8a3ae0f6) Changed print_to_log() to print() - [`1d33fe6`](https://github.com/misiektoja/spotify_monitor/commit/1d33fe6fb52a33c14636774fd94e09acaa3f805b) Print error information when screen width cannot be determine automatically - [`9e8dd16`](https://github.com/misiektoja/spotify_monitor/commit/9e8dd1601f8acca69982d24108741efb8ef49d08) Change argument flag to match spotify_profile_monitor ### 📊 Changes **1 file changed** (+42 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `spotify_monitor.py` (+42 -2) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:07:47 +03:00
Sign in to join this conversation.
No labels
Stale
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify_monitor#28
No description provided.